summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--3rdparty/libconfig/Makefile.in17
-rw-r--r--3rdparty/libconfig/extra/gen/grammar.y13
-rw-r--r--3rdparty/libconfig/grammar.c182
-rw-r--r--3rdparty/mt19937ar/Makefile.in17
-rwxr-xr-xHercules-10.sln4
-rw-r--r--Hercules-12.sln4
-rw-r--r--Hercules-9.sln5
-rw-r--r--Makefile.in8
-rw-r--r--conf/help.txt2
-rw-r--r--conf/messages.conf1
-rw-r--r--conf/plugins.conf9
-rwxr-xr-xconfigure138
-rw-r--r--configure.in121
-rw-r--r--db/const.txt1
-rw-r--r--db/job_db2.txt2
-rw-r--r--db/pre-re/exp.txt4
-rw-r--r--db/pre-re/job_db1.txt2
-rw-r--r--db/pre-re/skill_db.txt26
-rw-r--r--db/pre-re/skill_require_db.txt28
-rw-r--r--db/pre-re/skill_tree.conf90
-rw-r--r--db/re/exp.txt4
-rw-r--r--db/re/job_db1.txt2
-rw-r--r--db/re/skill_db.txt28
-rw-r--r--db/re/skill_require_db.txt28
-rw-r--r--db/re/skill_tree.conf84
-rw-r--r--doc/item_db.txt1
-rw-r--r--doc/script_commands.txt11
-rw-r--r--src/char/Makefile.in12
-rw-r--r--src/char/inter.c101
-rw-r--r--src/char/inter.h1
-rw-r--r--src/common/HPM.c110
-rw-r--r--src/common/HPM.h8
-rw-r--r--src/common/HPMi.h23
-rw-r--r--src/common/Makefile.in17
-rw-r--r--src/common/db.c18
-rw-r--r--src/common/db.h13
-rw-r--r--src/common/mmo.h52
-rw-r--r--src/common/timer.h3
-rw-r--r--src/login/Makefile.in12
-rw-r--r--src/map/HPMmap.c31
-rw-r--r--src/map/Makefile.in12
-rw-r--r--src/map/atcommand.c310
-rw-r--r--src/map/battle.c156
-rw-r--r--src/map/battle.h10
-rw-r--r--src/map/battleground.c4
-rw-r--r--src/map/buyingstore.c4
-rw-r--r--src/map/chat.c2
-rw-r--r--src/map/chrif.c18
-rw-r--r--src/map/clif.c351
-rw-r--r--src/map/clif.h16
-rw-r--r--src/map/duel.c4
-rw-r--r--src/map/duel.h8
-rw-r--r--src/map/elemental.c102
-rw-r--r--src/map/elemental.h43
-rw-r--r--src/map/guild.c268
-rw-r--r--src/map/guild.h63
-rw-r--r--src/map/homunculus.h2
-rw-r--r--src/map/instance.c337
-rw-r--r--src/map/instance.h7
-rw-r--r--src/map/intif.c671
-rw-r--r--src/map/intif.h104
-rw-r--r--src/map/itemdb.c27
-rw-r--r--src/map/log.c102
-rw-r--r--src/map/log.h51
-rw-r--r--src/map/mail.c2
-rw-r--r--src/map/map.c2587
-rw-r--r--src/map/map.h200
-rw-r--r--src/map/mapreg_sql.c36
-rw-r--r--src/map/mercenary.c43
-rw-r--r--src/map/mercenary.h16
-rw-r--r--src/map/mob.c98
-rw-r--r--src/map/mob.h4
-rw-r--r--src/map/npc.c524
-rw-r--r--src/map/npc.h2
-rw-r--r--src/map/packets.h99
-rw-r--r--src/map/party.c342
-rw-r--r--src/map/party.h60
-rw-r--r--src/map/path.c12
-rw-r--r--src/map/pc.c709
-rw-r--r--src/map/pc.h249
-rw-r--r--src/map/pet.c2
-rw-r--r--src/map/script.c2676
-rw-r--r--src/map/script.h426
-rw-r--r--src/map/searchstore.c28
-rw-r--r--src/map/searchstore.h35
-rw-r--r--src/map/skill.c168
-rw-r--r--src/map/skill.h29
-rw-r--r--src/map/status.c1360
-rw-r--r--src/map/status.h137
-rw-r--r--src/map/storage.c52
-rw-r--r--src/map/storage.h10
-rw-r--r--src/map/trade.c16
-rw-r--r--src/map/trade.h3
-rw-r--r--src/map/unit.c32
-rw-r--r--src/plugins/HPMHooking.c173
-rw-r--r--src/plugins/HPMHooking/HPMHooking.GetSymbol.inc37
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc9751
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc2467
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc64199
-rw-r--r--src/plugins/HPMHooking/HPMHooking.sources.inc37
-rw-r--r--src/plugins/Makefile.in53
-rw-r--r--src/plugins/sample.c32
-rw-r--r--src/test/Makefile.in10
-rw-r--r--src/tool/Makefile.in20
-rw-r--r--vcproj-10/plugin-HPMHooking.vcxproj118
-rw-r--r--vcproj-12/plugin-HPMHooking.vcxproj120
-rw-r--r--vcproj-9/plugin-HPMHooking.vcproj187
107 files changed, 84973 insertions, 6093 deletions
diff --git a/3rdparty/libconfig/Makefile.in b/3rdparty/libconfig/Makefile.in
index 048a1b3b7..88c5eba96 100644
--- a/3rdparty/libconfig/Makefile.in
+++ b/3rdparty/libconfig/Makefile.in
@@ -8,19 +8,22 @@ CC = @CC@
export CC
#####################################################################
-.PHONY: all clean help
+.PHONY: all clean buildclean help
all: $(LIBCONFIG_OBJ)
-clean:
- @echo " CLEAN libconfig"
+buildclean:
+ @echo " CLEAN libconfig (build temp files)"
@rm -rf *.o
+clean: buildclean
+ @echo " CLEAN libconfig"
+
help:
- @echo "possible targets are 'all' 'clean' 'help'"
- @echo "'all' - builds $(LIBCONFIG_OBJ)"
- @echo "'clean' - deletes $(LIBCONFIG_OBJ)"
- @echo "'help' - outputs this message"
+ @echo "possible targets are 'all' 'clean' 'buildclean' 'help'"
+ @echo "'all' - builds $(LIBCONFIG_OBJ)"
+ @echo "'clean', 'buildclean' - deletes $(LIBCONFIG_OBJ)"
+ @echo "'help' - outputs this message"
#####################################################################
diff --git a/3rdparty/libconfig/extra/gen/grammar.y b/3rdparty/libconfig/extra/gen/grammar.y
index f578897cb..576241c01 100644
--- a/3rdparty/libconfig/extra/gen/grammar.y
+++ b/3rdparty/libconfig/extra/gen/grammar.y
@@ -118,6 +118,11 @@ setting_terminator:
| TOK_COMMA
;
+comma_optional:
+ /* empty */
+ | TOK_COMMA
+ ;
+
setting:
TOK_NAME
{
@@ -359,9 +364,13 @@ value_list_optional:
| value_list
;
-simple_value_list:
+simple_value_list_sub:
simple_value
- | simple_value_list TOK_COMMA simple_value
+ | simple_value_list_sub TOK_COMMA simple_value
+ ;
+
+simple_value_list:
+ simple_value_list_sub comma_optional
;
simple_value_list_optional:
diff --git a/3rdparty/libconfig/grammar.c b/3rdparty/libconfig/grammar.c
index 0331c1854..47fb7b5dd 100644
--- a/3rdparty/libconfig/grammar.c
+++ b/3rdparty/libconfig/grammar.c
@@ -445,16 +445,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 6
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 35
+#define YYLAST 36
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 23
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 20
+#define YYNNTS 22
/* YYNRULES -- Number of rules. */
-#define YYNRULES 39
+#define YYNRULES 42
/* YYNRULES -- Number of states. */
-#define YYNSTATES 47
+#define YYNSTATES 49
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -502,32 +502,35 @@ static const yytype_uint8 yytranslate[] =
static const yytype_uint8 yyprhs[] =
{
0, 0, 3, 4, 6, 8, 11, 12, 14, 15,
- 17, 19, 20, 26, 27, 32, 33, 38, 40, 42,
- 44, 46, 48, 51, 53, 55, 57, 59, 61, 63,
- 65, 67, 71, 72, 74, 76, 80, 81, 83, 84
+ 17, 19, 20, 22, 23, 29, 30, 35, 36, 41,
+ 43, 45, 47, 49, 51, 54, 56, 58, 60, 62,
+ 64, 66, 68, 70, 74, 75, 77, 79, 83, 86,
+ 87, 89, 90
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
- 24, 0, -1, -1, 25, -1, 28, -1, 25, 28,
+ 24, 0, -1, -1, 25, -1, 29, -1, 25, 29,
-1, -1, 25, -1, -1, 20, -1, 17, -1, -1,
- 10, 29, 11, 34, 27, -1, -1, 13, 31, 40,
- 14, -1, -1, 15, 33, 38, 16, -1, 36, -1,
- 30, -1, 32, -1, 41, -1, 9, -1, 35, 9,
- -1, 3, -1, 4, -1, 6, -1, 5, -1, 7,
- -1, 8, -1, 35, -1, 34, -1, 37, 17, 34,
- -1, -1, 37, -1, 36, -1, 39, 17, 36, -1,
- -1, 39, -1, -1, 18, 42, 26, 19, -1
+ 17, -1, -1, 10, 30, 11, 35, 27, -1, -1,
+ 13, 32, 42, 14, -1, -1, 15, 34, 39, 16,
+ -1, 37, -1, 31, -1, 33, -1, 43, -1, 9,
+ -1, 36, 9, -1, 3, -1, 4, -1, 6, -1,
+ 5, -1, 7, -1, 8, -1, 36, -1, 35, -1,
+ 38, 17, 35, -1, -1, 38, -1, 37, -1, 40,
+ 17, 37, -1, 40, 28, -1, -1, 41, -1, -1,
+ 18, 44, 26, 19, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 100, 100, 102, 106, 107, 110, 112, 115, 117,
- 118, 123, 122, 142, 141, 165, 164, 187, 188, 189,
- 190, 194, 195, 199, 219, 241, 263, 285, 307, 325,
- 353, 354, 357, 359, 363, 364, 367, 369, 374, 373
+ 118, 121, 123, 128, 127, 147, 146, 170, 169, 192,
+ 193, 194, 195, 199, 200, 204, 224, 246, 268, 290,
+ 312, 330, 358, 359, 362, 364, 368, 369, 373, 376,
+ 378, 383, 382
};
#endif
@@ -542,9 +545,10 @@ static const char *const yytname[] =
"TOK_LIST_START", "TOK_LIST_END", "TOK_COMMA", "TOK_GROUP_START",
"TOK_GROUP_END", "TOK_SEMICOLON", "TOK_GARBAGE", "TOK_ERROR", "$accept",
"configuration", "setting_list", "setting_list_optional",
- "setting_terminator", "setting", "$@1", "array", "$@2", "list", "$@3",
- "value", "string", "simple_value", "value_list", "value_list_optional",
- "simple_value_list", "simple_value_list_optional", "group", "$@4", 0
+ "setting_terminator", "comma_optional", "setting", "$@1", "array", "$@2",
+ "list", "$@3", "value", "string", "simple_value", "value_list",
+ "value_list_optional", "simple_value_list_sub", "simple_value_list",
+ "simple_value_list_optional", "group", "$@4", 0
};
#endif
@@ -563,18 +567,20 @@ static const yytype_uint16 yytoknum[] =
static const yytype_uint8 yyr1[] =
{
0, 23, 24, 24, 25, 25, 26, 26, 27, 27,
- 27, 29, 28, 31, 30, 33, 32, 34, 34, 34,
- 34, 35, 35, 36, 36, 36, 36, 36, 36, 36,
- 37, 37, 38, 38, 39, 39, 40, 40, 42, 41
+ 27, 28, 28, 30, 29, 32, 31, 34, 33, 35,
+ 35, 35, 35, 36, 36, 37, 37, 37, 37, 37,
+ 37, 37, 38, 38, 39, 39, 40, 40, 41, 42,
+ 42, 44, 43
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
0, 2, 0, 1, 1, 2, 0, 1, 0, 1,
- 1, 0, 5, 0, 4, 0, 4, 1, 1, 1,
- 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 3, 0, 1, 1, 3, 0, 1, 0, 4
+ 1, 0, 1, 0, 5, 0, 4, 0, 4, 1,
+ 1, 1, 1, 1, 2, 1, 1, 1, 1, 1,
+ 1, 1, 1, 3, 0, 1, 1, 3, 2, 0,
+ 1, 0, 4
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -582,18 +588,19 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 2, 11, 0, 3, 4, 0, 1, 5, 0, 23,
- 24, 26, 25, 27, 28, 21, 13, 15, 38, 18,
- 19, 8, 29, 17, 20, 36, 32, 6, 10, 9,
- 12, 22, 34, 37, 0, 30, 33, 0, 7, 0,
- 0, 14, 0, 16, 39, 35, 31
+ 2, 13, 0, 3, 4, 0, 1, 5, 0, 25,
+ 26, 28, 27, 29, 30, 23, 15, 17, 41, 20,
+ 21, 8, 31, 19, 22, 39, 34, 6, 10, 9,
+ 14, 24, 36, 11, 40, 0, 32, 35, 0, 7,
+ 0, 12, 38, 16, 0, 18, 42, 37, 33
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
- -1, 2, 3, 39, 30, 4, 5, 19, 25, 20,
- 26, 21, 22, 23, 36, 37, 33, 34, 24, 27
+ -1, 2, 3, 40, 30, 42, 4, 5, 19, 25,
+ 20, 26, 21, 22, 23, 37, 38, 33, 34, 35,
+ 24, 27
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
@@ -601,18 +608,19 @@ static const yytype_int8 yydefgoto[] =
#define YYPACT_NINF -26
static const yytype_int8 yypact[] =
{
- -8, -26, 12, -8, -26, 5, -26, -26, 0, -26,
+ -7, -26, 4, -7, -26, 1, -26, -26, 2, -26,
-26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
- -26, -6, 10, -26, -26, 23, 0, -8, -26, -26,
- -26, -26, -26, 3, 7, -26, 6, 8, -8, 14,
- 23, -26, 0, -26, -26, -26, -26
+ -26, -4, 5, -26, -26, 18, 2, -7, -26, -26,
+ -26, -26, -26, 11, -26, 15, -26, 13, 16, -7,
+ 12, 18, -26, -26, 2, -26, -26, -26, -26
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
- -26, -26, -5, -26, -26, -3, -26, -26, -26, -26,
- -26, -25, -26, -15, -26, -26, -26, -26, -26, -26
+ -26, -26, 6, -26, -26, -26, -3, -26, -26, -26,
+ -26, -26, -25, -26, -23, -26, -26, -26, -26, -26,
+ -26, -26
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -622,29 +630,29 @@ static const yytype_int8 yypgoto[] =
#define YYTABLE_NINF -1
static const yytype_uint8 yytable[] =
{
- 7, 35, 1, 9, 10, 11, 12, 13, 14, 15,
- 32, 28, 6, 16, 29, 17, 8, 46, 18, 31,
- 40, 41, 38, 42, 43, 45, 9, 10, 11, 12,
- 13, 14, 15, 44, 0, 7
+ 7, 36, 32, 1, 6, 9, 10, 11, 12, 13,
+ 14, 15, 8, 28, 31, 16, 29, 17, 47, 48,
+ 18, 9, 10, 11, 12, 13, 14, 15, 41, 43,
+ 44, 46, 45, 39, 0, 0, 7
};
static const yytype_int8 yycheck[] =
{
- 3, 26, 10, 3, 4, 5, 6, 7, 8, 9,
- 25, 17, 0, 13, 20, 15, 11, 42, 18, 9,
- 17, 14, 27, 17, 16, 40, 3, 4, 5, 6,
- 7, 8, 9, 19, -1, 38
+ 3, 26, 25, 10, 0, 3, 4, 5, 6, 7,
+ 8, 9, 11, 17, 9, 13, 20, 15, 41, 44,
+ 18, 3, 4, 5, 6, 7, 8, 9, 17, 14,
+ 17, 19, 16, 27, -1, -1, 39
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 10, 24, 25, 28, 29, 0, 28, 11, 3,
- 4, 5, 6, 7, 8, 9, 13, 15, 18, 30,
- 32, 34, 35, 36, 41, 31, 33, 42, 17, 20,
- 27, 9, 36, 39, 40, 34, 37, 38, 25, 26,
- 17, 14, 17, 16, 19, 36, 34
+ 0, 10, 24, 25, 29, 30, 0, 29, 11, 3,
+ 4, 5, 6, 7, 8, 9, 13, 15, 18, 31,
+ 33, 35, 36, 37, 43, 32, 34, 44, 17, 20,
+ 27, 9, 37, 40, 41, 42, 35, 38, 39, 25,
+ 26, 17, 28, 14, 17, 16, 19, 37, 35
};
#define yyerrok (yyerrstatus = 0)
@@ -1483,10 +1491,10 @@ yyreduce:
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
- case 11:
+ case 13:
/* Line 1464 of yacc.c */
-#line 123 "grammar.y"
+#line 128 "grammar.y"
{
ctx->setting = config_setting_add(ctx->parent, (yyvsp[(1) - (1)].sval), CONFIG_TYPE_NONE);
@@ -1502,10 +1510,10 @@ yyreduce:
}
break;
- case 13:
+ case 15:
/* Line 1464 of yacc.c */
-#line 142 "grammar.y"
+#line 147 "grammar.y"
{
if(IN_LIST())
{
@@ -1521,20 +1529,20 @@ yyreduce:
}
break;
- case 14:
+ case 16:
/* Line 1464 of yacc.c */
-#line 157 "grammar.y"
+#line 162 "grammar.y"
{
if(ctx->parent)
ctx->parent = ctx->parent->parent;
}
break;
- case 15:
+ case 17:
/* Line 1464 of yacc.c */
-#line 165 "grammar.y"
+#line 170 "grammar.y"
{
if(IN_LIST())
{
@@ -1550,34 +1558,34 @@ yyreduce:
}
break;
- case 16:
+ case 18:
/* Line 1464 of yacc.c */
-#line 180 "grammar.y"
+#line 185 "grammar.y"
{
if(ctx->parent)
ctx->parent = ctx->parent->parent;
}
break;
- case 21:
+ case 23:
/* Line 1464 of yacc.c */
-#line 194 "grammar.y"
+#line 199 "grammar.y"
{ parsectx_append_string(ctx, (yyvsp[(1) - (1)].sval)); free((yyvsp[(1) - (1)].sval)); }
break;
- case 22:
+ case 24:
/* Line 1464 of yacc.c */
-#line 195 "grammar.y"
+#line 200 "grammar.y"
{ parsectx_append_string(ctx, (yyvsp[(2) - (2)].sval)); free((yyvsp[(2) - (2)].sval)); }
break;
- case 23:
+ case 25:
/* Line 1464 of yacc.c */
-#line 200 "grammar.y"
+#line 205 "grammar.y"
{
if(IN_ARRAY() || IN_LIST())
{
@@ -1599,10 +1607,10 @@ yyreduce:
}
break;
- case 24:
+ case 26:
/* Line 1464 of yacc.c */
-#line 220 "grammar.y"
+#line 225 "grammar.y"
{
if(IN_ARRAY() || IN_LIST())
{
@@ -1626,10 +1634,10 @@ yyreduce:
}
break;
- case 25:
+ case 27:
/* Line 1464 of yacc.c */
-#line 242 "grammar.y"
+#line 247 "grammar.y"
{
if(IN_ARRAY() || IN_LIST())
{
@@ -1653,10 +1661,10 @@ yyreduce:
}
break;
- case 26:
+ case 28:
/* Line 1464 of yacc.c */
-#line 264 "grammar.y"
+#line 269 "grammar.y"
{
if(IN_ARRAY() || IN_LIST())
{
@@ -1680,10 +1688,10 @@ yyreduce:
}
break;
- case 27:
+ case 29:
/* Line 1464 of yacc.c */
-#line 286 "grammar.y"
+#line 291 "grammar.y"
{
if(IN_ARRAY() || IN_LIST())
{
@@ -1707,10 +1715,10 @@ yyreduce:
}
break;
- case 28:
+ case 30:
/* Line 1464 of yacc.c */
-#line 308 "grammar.y"
+#line 313 "grammar.y"
{
if(IN_ARRAY() || IN_LIST())
{
@@ -1730,10 +1738,10 @@ yyreduce:
}
break;
- case 29:
+ case 31:
/* Line 1464 of yacc.c */
-#line 326 "grammar.y"
+#line 331 "grammar.y"
{
if(IN_ARRAY() || IN_LIST())
{
@@ -1760,10 +1768,10 @@ yyreduce:
}
break;
- case 38:
+ case 41:
/* Line 1464 of yacc.c */
-#line 374 "grammar.y"
+#line 383 "grammar.y"
{
if(IN_LIST())
{
@@ -1779,10 +1787,10 @@ yyreduce:
}
break;
- case 39:
+ case 42:
/* Line 1464 of yacc.c */
-#line 389 "grammar.y"
+#line 398 "grammar.y"
{
if(ctx->parent)
ctx->parent = ctx->parent->parent;
@@ -1792,7 +1800,7 @@ yyreduce:
/* Line 1464 of yacc.c */
-#line 1796 "grammar.c"
+#line 1804 "grammar.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2004,6 +2012,6 @@ yyreturn:
/* Line 1684 of yacc.c */
-#line 395 "grammar.y"
+#line 404 "grammar.y"
diff --git a/3rdparty/mt19937ar/Makefile.in b/3rdparty/mt19937ar/Makefile.in
index c48848c8d..5d8e19994 100644
--- a/3rdparty/mt19937ar/Makefile.in
+++ b/3rdparty/mt19937ar/Makefile.in
@@ -8,19 +8,22 @@ CC = @CC@
export CC
#####################################################################
-.PHONY: all clean help
+.PHONY: all clean buildclean help
all: $(MT19937AR_OBJ)
-clean:
- @echo " CLEAN mt19937ar"
+buildclean:
+ @echo " CLEAN mt19937ar (build temp files)"
@rm -rf *.o
+clean: buildclean
+ @echo " CLEAN mt19937ar"
+
help:
- @echo "possible targets are 'all' 'clean' 'help'"
- @echo "'all' - builds $(MT19937AR_OBJ)"
- @echo "'clean' - deletes $(MT19937AR_OBJ)"
- @echo "'help' - outputs this message"
+ @echo "possible targets are 'all' 'clean' 'buildclean' 'help'"
+ @echo "'all' - builds $(MT19937AR_OBJ)"
+ @echo "'clean', 'buildclean' - deletes $(MT19937AR_OBJ)"
+ @echo "'help' - outputs this message"
#####################################################################
diff --git a/Hercules-10.sln b/Hercules-10.sln
index f61f4655f..b663ad491 100755
--- a/Hercules-10.sln
+++ b/Hercules-10.sln
@@ -10,6 +10,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-10\mapca
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-sample", "vcproj-10\plugin-sample.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking", "vcproj-10\plugin-HPMHooking.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -34,6 +36,8 @@ Global
{D356871D-58E1-450B-967A-E7E9646175AF}.Release|Win32.Build.0 = Release|Win32
{E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Debug|Win32.ActiveCfg = Debug|Win32
{E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.ActiveCfg = Release|Win32
+ {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Hercules-12.sln b/Hercules-12.sln
index d4e5229ab..8fef6c9ef 100644
--- a/Hercules-12.sln
+++ b/Hercules-12.sln
@@ -10,6 +10,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-12\mapca
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-sample", "vcproj-12\plugin-sample.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking", "vcproj-12\plugin-HPMHooking.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -36,6 +38,8 @@ Global
{E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Debug|Win32.Build.0 = Debug|Win32
{E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.ActiveCfg = Release|Win32
{E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.Build.0 = Release|Win32
+ {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.ActiveCfg = Release|Win32
+ {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Hercules-9.sln b/Hercules-9.sln
index 66f4522b2..740cddc16 100644
--- a/Hercules-9.sln
+++ b/Hercules-9.sln
@@ -10,6 +10,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-9\mapcac
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-sample", "vcproj-9\plugin-sample.vcproj", "{D356871D-58E1-450B-967A-E7E9646175AF}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking", "vcproj-9\plugin-HPMHooking.vcproj", "{D356871D-58E1-450B-967A-E7E9646175AF}"
+EndProject
+
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -36,6 +39,8 @@ Global
{D356871D-58E1-450B-967A-E6E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
{D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
{D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Makefile.in b/Makefile.in
index 7dfb138f9..f41aac4c7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -46,6 +46,8 @@ export CC
import \
test \
clean \
+ buildclean \
+ distclean \
help
all: $(ALL_DEPENDS)
@@ -111,7 +113,7 @@ import: Makefile
@if test ! -d conf/import ; then mkdir conf/import ; fi
@for f in $$(ls conf/import-tmpl) ; do if test ! -e conf/import/$$f ; then cp conf/import-tmpl/$$f conf/import ; fi ; done
-clean: $(MF_TARGETS)
+clean buildclean: $(MF_TARGETS)
@$(MAKE) -C src/common $@
@$(MAKE) -C 3rdparty/mt19937ar $@
@$(MAKE) -C 3rdparty/libconfig $@
@@ -140,7 +142,9 @@ help: Makefile
@echo "'sql' - builds sql servers (targets 'common_sql' 'login_sql' 'char_sql'"
@echo " 'map_sql' and 'import')"
@echo "'test' - builds tests"
- @echo "'clean' - cleans builds and objects"
+ @echo "'clean' - cleans executables and objects"
+ @echo "'buildclean' - cleans build temporary (object) files, without deleting the"
+ @echo " executables"
@echo "'distclean' - cleans files generated by ./configure"
@echo "'help' - outputs this message"
diff --git a/conf/help.txt b/conf/help.txt
index 18630bf59..211ed5b19 100644
--- a/conf/help.txt
+++ b/conf/help.txt
@@ -102,7 +102,7 @@ jobchange: "Params: <job name|ID>\n" "Changes your job.\n"
" 23 Super Novice 24 Gunslinger 25 Ninja 4045 Super Baby\n"
"4046 Taekwon 4047 Star Gladiator 4049 Soul Linker 4050 Gangsi\n"
"4051 Death Knight 4052 Dark Collector 4190 Ex. Super Novice 4191 Ex. Super Baby\n"
- "4211 Kagerou 4212 Oboro\n"
+ "4211 Kagerou 4212 Oboro 4215 Rebellion\n"
"----- Baby Novice And Baby 1st Class -----\n"
"4023 Baby Novice 4024 Baby Swordman 4025 Baby Magician 4026 Baby Archer\n"
"4027 Baby Acolyte 4028 Baby Merchant 4029 Baby Thief\n"
diff --git a/conf/messages.conf b/conf/messages.conf
index d7b25a258..fc8599f5b 100644
--- a/conf/messages.conf
+++ b/conf/messages.conf
@@ -652,6 +652,7 @@
691: Sura T
692: Genetic T
693: Shadow Chaser T
+694: Rebellion
//------------------------------------
diff --git a/conf/plugins.conf b/conf/plugins.conf
index 58ecb7144..8f171f034 100644
--- a/conf/plugins.conf
+++ b/conf/plugins.conf
@@ -23,16 +23,17 @@ you need to put in a comma, to separate the plugins.
-----------------------------------------
plugins_list: [
"example",
- "other"
+ "other",
]
-----------------------------------------
Please note that your scripts need to be saved
in the .c (source code) extension and placed in the /src/plugin/ folder.
-----------------------------------------
*/
-
-plugins_list:[
+plugins_list: [
+ /* Enable HPMHooking when plugins in use rely on Hooking */
+ //"HPMHooking",
//"db2sql",
//"sample",
- //"other"
+ //"other",
]
diff --git a/configure b/configure
index 712fe8dfc..17a84e1ff 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in c1dca64.
+# From configure.in 95caa24.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@@ -5003,6 +5003,7 @@ CFLAGS="$OLD_CFLAGS"
$as_echo_n "checking how to make shared objects... " >&6; }
OLD_CFLAGS="$CFLAGS"
compiler_shared_objects=""
+compiler_supports_shared_objects="no"
if test "$compiler_supports_pic" = "yes" ; then
my_shared_test_flags="$CFLAGS -fPIC"
fi
@@ -5022,6 +5023,7 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"; then :
compiler_shared_objects="-shared"
+ compiler_supports_shared_objects="yes"
fi
@@ -5043,12 +5045,12 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"; then :
compiler_shared_objects="-nostart"
+ compiler_supports_shared_objects="yes"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-my_shared_test_flags=""
CFLAGS="$OLD_CFLAGS"
if test "$compiler_supports_shared_objects" = "no" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
@@ -5057,77 +5059,134 @@ $as_echo "not supported" >&6; }
$as_echo "$as_me: compiler is unable to generate shared objects, disabled plugins (optional)" >&6;}
WITH_PLUGINS="no"
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $compiler_shared_objects" >&5
-$as_echo "$compiler_shared_objects" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $compiler_shared_objects $compiler_supports_shared_objects" >&5
+$as_echo "$compiler_shared_objects $compiler_supports_shared_objects" >&6; }
SOFLAGS="$SOFLAGS $compiler_shared_objects"
-#
-# shared objects need position independent code; some platforms emit
-# it always, others need -fPIC
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -fPIC for shared objects" >&5
+ #
+ # On certain platforms, undefined references on shared libraries won't be checked
+ # unless explicitly required with the --no-undefined linker option
+ #
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -Wl,--no-undefined to check for undefined references in shared objects" >&5
+$as_echo_n "checking whether $CC needs -Wl,--no-undefined to check for undefined references in shared objects... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$SOFLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ void foo(void) {
+ foobar();
+ }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ CFLAGS="$SOFLAGS -Wl,--no-undefined"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int bar = 0;
+
+ int foo(void) {
+ return bar;
+ }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SOFLAGS="$SOFLAGS -Wl,--no-undefined"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported (undefined references check will be ignored)" >&5
+$as_echo "unsupported (undefined references check will be ignored)" >&6; }
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$OLD_CFLAGS"
+
+ #
+ # shared objects need position independent code; some platforms emit
+ # it always, others need -fPIC
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -fPIC for shared objects" >&5
$as_echo_n "checking whether $CC needs -fPIC for shared objects... " >&6; }
-OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $SOFLAGS"
-WITH_PLUGINS="yes"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $SOFLAGS"
+ WITH_PLUGINS="yes"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- int bar = 0;
+ int bar = 0;
- int foo(void)
- {
- return bar;
- }
+ int foo(void)
+ {
+ return bar;
+ }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- { $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"
else
- if test "$compiler_supports_pic" = "yes" ; then
- # Verify if -shared really fails due to lack of -fPIC or something else
- CFLAGS="$CFLAGS -fPIC"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ if test "$compiler_supports_pic" = "yes" ; then
+ # Verify if -shared really fails due to lack of -fPIC or something else
+ CFLAGS="$CFLAGS -fPIC"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- int bar = 0;
+ int bar = 0;
- int foo(void)
- {
- return bar;
- }
+ int foo(void)
+ {
+ return bar;
+ }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -fPIC"
+ CFLAGS="$OLD_CFLAGS -fPIC"
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, but fails for another reason" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, but fails for another reason" >&5
$as_echo "no, but fails for another reason" >&6; }
- as_fn_error $? "compiler is unable to compile shared objects for an unhandled reason, please report this with attached config.log... stopping" "$LINENO" 5
+ as_fn_error $? "compiler is unable to compile shared objects for an unhandled reason, please report this with attached config.log... stopping" "$LINENO" 5
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- else
- # Disable compilation of plugins (optional), so 'make all' does not fail
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but unsupported" >&5
+ else
+ # Disable compilation of plugins (optional), so 'make all' does not fail
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but unsupported" >&5
$as_echo "yes, but unsupported" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: compiler is unable to generate position independent code, disabled plugins (optional)" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: compiler is unable to generate position independent code, disabled plugins (optional)" >&5
$as_echo "$as_me: compiler is unable to generate position independent code, disabled plugins (optional)" >&6;}
- WITH_PLUGINS="no"
- fi
+ WITH_PLUGINS="no"
+ fi
fi
@@ -5135,6 +5194,7 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
+my_shared_test_flags=""
diff --git a/configure.in b/configure.in
index d9353f51c..486390eaa 100644
--- a/configure.in
+++ b/configure.in
@@ -550,6 +550,7 @@ CFLAGS="$OLD_CFLAGS"
AC_MSG_CHECKING([how to make shared objects])
OLD_CFLAGS="$CFLAGS"
compiler_shared_objects=""
+compiler_supports_shared_objects="no"
if test "$compiler_supports_pic" = "yes" ; then
my_shared_test_flags="$CFLAGS -fPIC"
fi
@@ -566,6 +567,7 @@ AC_LINK_IFELSE(
])],
[
compiler_shared_objects="-shared"
+ compiler_supports_shared_objects="yes"
]
)
# BeOS specific
@@ -581,72 +583,111 @@ AC_LINK_IFELSE(
])],
[
compiler_shared_objects="-nostart"
+ compiler_supports_shared_objects="yes"
]
)
-my_shared_test_flags=""
CFLAGS="$OLD_CFLAGS"
if test "$compiler_supports_shared_objects" = "no" ; then
AC_MSG_RESULT([not supported])
AC_MSG_NOTICE([compiler is unable to generate shared objects, disabled plugins (optional)])
WITH_PLUGINS="no"
else
- AC_MSG_RESULT([$compiler_shared_objects])
+ AC_MSG_RESULT([$compiler_shared_objects $compiler_supports_shared_objects])
SOFLAGS="$SOFLAGS $compiler_shared_objects"
AC_SUBST([SOFLAGS])
-#
-# shared objects need position independent code; some platforms emit
-# it always, others need -fPIC
-#
-AC_MSG_CHECKING([whether $CC needs -fPIC for shared objects])
-OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $SOFLAGS"
-WITH_PLUGINS="yes"
-AC_LINK_IFELSE(
- [AC_LANG_SOURCE([
- int bar = 0;
-
- int foo(void)
- {
- return bar;
- }
- ])],
- [
- AC_MSG_RESULT([no])
- CFLAGS="$OLD_CFLAGS"
- ],
- [
- if test "$compiler_supports_pic" = "yes" ; then
- # Verify if -shared really fails due to lack of -fPIC or something else
- CFLAGS="$CFLAGS -fPIC"
+ #
+ # On certain platforms, undefined references on shared libraries won't be checked
+ # unless explicitly required with the --no-undefined linker option
+ #
+ AC_MSG_CHECKING([whether $CC needs -Wl,--no-undefined to check for undefined references in shared objects])
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$SOFLAGS"
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([
+ void foo(void) {
+ foobar();
+ }
+ ])],
+ [
+ CFLAGS="$SOFLAGS -Wl,--no-undefined"
AC_LINK_IFELSE(
[AC_LANG_SOURCE([
int bar = 0;
- int foo(void)
- {
+ int foo(void) {
return bar;
}
])],
[
AC_MSG_RESULT([yes])
- CFLAGS="$OLD_CFLAGS -fPIC"
+ SOFLAGS="$SOFLAGS -Wl,--no-undefined"
],
[
- AC_MSG_RESULT([no, but fails for another reason])
- AC_MSG_ERROR([compiler is unable to compile shared objects for an unhandled reason, please report this with attached config.log... stopping])
+ AC_MSG_RESULT([unsupported (undefined references check will be ignored)])
]
)
- else
- # Disable compilation of plugins (optional), so 'make all' does not fail
- AC_MSG_RESULT([yes, but unsupported])
- AC_MSG_NOTICE([compiler is unable to generate position independent code, disabled plugins (optional)])
- WITH_PLUGINS="no"
- fi
- ]
-)
+ ],
+ [
+ AC_MSG_RESULT([no])
+ ]
+ )
+ CFLAGS="$OLD_CFLAGS"
+
+ #
+ # shared objects need position independent code; some platforms emit
+ # it always, others need -fPIC
+ #
+ AC_MSG_CHECKING([whether $CC needs -fPIC for shared objects])
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $SOFLAGS"
+ WITH_PLUGINS="yes"
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([
+ int bar = 0;
+
+ int foo(void)
+ {
+ return bar;
+ }
+ ])],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ],
+ [
+ if test "$compiler_supports_pic" = "yes" ; then
+ # Verify if -shared really fails due to lack of -fPIC or something else
+ CFLAGS="$CFLAGS -fPIC"
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([
+ int bar = 0;
+
+ int foo(void)
+ {
+ return bar;
+ }
+ ])],
+ [
+ AC_MSG_RESULT([yes])
+ CFLAGS="$OLD_CFLAGS -fPIC"
+ ],
+ [
+ AC_MSG_RESULT([no, but fails for another reason])
+ AC_MSG_ERROR([compiler is unable to compile shared objects for an unhandled reason, please report this with attached config.log... stopping])
+ ]
+ )
+ else
+ # Disable compilation of plugins (optional), so 'make all' does not fail
+ AC_MSG_RESULT([yes, but unsupported])
+ AC_MSG_NOTICE([compiler is unable to generate position independent code, disabled plugins (optional)])
+ WITH_PLUGINS="no"
+ fi
+ ]
+ )
fi
+my_shared_test_flags=""
AC_SUBST([WITH_PLUGINS])
diff --git a/db/const.txt b/db/const.txt
index 81421eac6..544638efb 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -164,6 +164,7 @@ Job_Super_Baby_E 4191
Job_Kagerou 4211
Job_Oboro 4212
+Job_Rebellion 4215
EAJL_2_1 0x100
EAJL_2_2 0x200
diff --git a/db/job_db2.txt b/db/job_db2.txt
index a36cc3d88..5c5f9a445 100644
--- a/db/job_db2.txt
+++ b/db/job_db2.txt
@@ -287,3 +287,5 @@
4211,5,0,4,0,2,3,0,1,6,0,5,1,2,0,4,6,3,0,1,5,2,0,6,3,4,0,5,0,2,0,1,4,0,5,4,0,3,5,1,0,2,4,1,0,5,6,2,1,0,5
// Oboro
4212,5,0,4,0,2,3,0,1,6,0,5,1,2,0,4,6,3,0,1,5,2,0,6,3,4,0,5,0,2,0,1,4,0,5,4,0,3,5,1,0,2,4,1,0,5,6,2,1,0,5
+// Rebellion
+4215,5,6,0,6,0,5,0,0,0,6,5,6,0,0,4,0,5,0,0,5,6,0,0,0,5,2,0,0,0,3,6,1,0,0,5,4,0,0,5,0,1,0,6,0,5,0,0,1,0,1
diff --git a/db/pre-re/exp.txt b/db/pre-re/exp.txt
index 0bb010b7c..7fff53932 100644
--- a/db/pre-re/exp.txt
+++ b/db/pre-re/exp.txt
@@ -53,7 +53,7 @@
//Base - 3rd Jobs, Baby 3rds, Expanded Super Novice, and Kagerou/Oboro
//Note: (First 98 values [Level 1 - 98] are dummy values (used Adv Jobs values), because 3rd classes start at level 99.)
-99,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212,0,10,18,28,40,85,123,168,220,278,400,481,613,731,875,1038,1213,1400,1575,1775,2268,2604,2786,3136,3506,4130,4796,5508,6264,9645,12392,14220,16159,18209,21649,24451,27401,30499,33748,47342,58160,64711,71573,78749,90144,99312,108870,118816,129154,174196,213220,238080,264150,291427,329640,363155,398116,434526,472381,610848,731828,806448,884232,965180,1073896,1170382,1270556,1374422,1481976,1850800,3389616,3666333,3953534,4251217,4559382,5129260,5488173,5859059,6241919,7374168,9570662,10458427,11380262,12336168,13326144,14994907,16130400,17304200,18516326,19766760,21085096,22473939,23935933,25473761,27090141,28787825,30569594,32438257,34396650,36447628,38594068,40838862,43184915,45635142,48192464,50859807,53640095,56536248,59551182,62687799,65948990,69337627,72856561,76508620,80296602,84223275,88291372,92503586,96862571,101370933,106031232,110845975,115817614,120948544,126241098,131697545,137320088,143110859,149071919,155205253,161512770,167996297,174657580,181498280,188519973,195724146,203112195,210685425,218445048,226392181,234527844,242852961,251368358,260074760,268972793,278062983,287345754,296821429,306490229,316352273,326407578,336656059,347097530,357731703,368558190,379576502,390786051,402186149,413776012,425554759,437521412,449674899,462014055,474537623,487244256,500132518,513200886,526447751,539871420,553470119,567241993,581185110,595297462,609576966,624021468,638628745,653396504,668322389,683403980,698638797,714024301,729557897,745236936,761058717,777020492,793119465,809352795,825717601,842210961,858829917,875571475,892432609,909410264,926501355,943702774,961011389,978424047,995937576,1013548788,1031254481,1049051440,1066936441,1084906252,1102957634,1121087346,1139292145,1157568786,1175914029,1194324635,1212797373,1231329018,1249916355,1268556179,1287245299,1305980536,1324758729,1343576732,1362431419,1381319683,1400238439,1419184625,1438155202,1457147157,1476157502,1495183278,1514221554,1533269429,1552324031,1571382520,1590442090,1609499966,1628553409,1647599713,1666636209,1685660263,1704669278,1723660695,1742631992,1761580687,1780504336,1799400534,1818266916,1837101157,1855900974,1874664122,1893388399,1912071644,1930711737,1949306600,1967854196,1986352530,2004799649,2023193642,2041532640,2059814816,2078038384,2096201600,2114302763,2132340212,2150312328,2168217533,2186054291,2203821106,2221516523,2239139127,2256687544,2274160439,2291556517,2308874523,2326113241,2343271492,2360348137,2377342074,2394252239,2411077605,2427817182,2444470016,2461035190,2477511822,2493899065,2510196107,2526402170,2542516509,2558538414,2574467207,2590302243,2606042908,2621688620,2637238829,2652693014,2668050684,2683311379,2698474666,2713540143,2728507434,2743376192,2758146097,2772816855,2787388198,2801859883,2816231694,2830503439,2844674950,2858746082,2872716714,2886586747,2900356105,2914024733,2927592598,2941059688,2954426010,2967691593,2980856483,2993920747,3006884469,3019747752,3032510717,3045173501,3057736259,3070199161,3082562393,3094826158,3106990673,3119056170,3131022894,3142891106,3154661079,3166333099,3177907466,3189384491,3200764497,3212047820,3223234805,3234325809,3245321200,3256221356,3267026664,3277737521,3288354333,3298877514,3309307489,3319644689,3329889553,3340042528,3350104069,3360074637,3369954700,3379744733,3389445216,3399056636,3408579485,3418014261,3427361466,3436621608,3445795199,3454882755,3463884797,3472801849,3481634440,3490383101,3499048368,3507630778,3516130872,3524549194,3532886290,3541142708,3549318998,3557415713,3565433406,3573372633,3581233950,3589017916,3596725090,3604356032,3611911302,3619391462,3626797073,3634128697,3641386897,3648572235,3655685273,3662726573,3669696697,3676596205,3683425658,3690185617,3696876640,3703499285,3710054109,3716541669,3722962519,3729317213,3735606303,3741830339,3747989871,3754085446,3760117610,3766086907,3771993879,3777839066,3783623006,3789346235,3795009287,3800612694,3806156985,3811642688,3817070327,3822440424,3827753500,3833010071,3838210653,3843355757,3848445893,3853481568,3858463286,3863391548,3868266853,3873089696,3877860570,3882579965,3887248368,3891866263,3896434130,3900952448,3905421692,3909842333,3914214841,3918539681,3922817316,3927048205,3931232805,3935371569,3939464947,3943513385,3947517328,3951477216,3955393486,3959266573,3963096907,3966884916,3970631025,3974335655,3977999224,3981622147,3985204835,3988747697,3992251137,3995715558,3999141358,4002528933,4005878676,4009190975,4012466216,4015704782,4018907052,4022073402,4025204206,4028299834,4031360652,4034387025,4037379312,4040337871,4043263057,4046155220,4049014709,4051841869,4054637042,4057400566,4060132778,4062834010,4065504592,4068144851,4070755111,4073335693,4075886914,4078409090,4080902532,4083367550,4085804450,4088213536,4090595108,4092949463,4095276897,4097577701,4099852165,4102100575,4104323215,4106520366,4108692307,4110839312,4112961655,4115059606,4117133433,4119183400,4121209770,4123212802,4125192754,4127149880,4129084433,4130996662,4132886814,4134755133,4136601862,4138427240,4140231505,4142014891,4143777631,4145519954,4147242089,4148944261,4150626693,4152289606,4153933218,4155557746,4157163403,4158750402,4160318952,4161869260,4163401532,4164915971,4166412777,4167892150,4169354286,4170799380,4172227625,4173639211,4175034327,4176413160,4177775894,4179122712,4180453795,4181769321,4183069467,4184354408,4185624318,4186879367,4188119725,4189345560,4190557037,4191754321,4192937573,4194106954,4195262623,4196404736,4197533449,4198648916,4199751289,4200840717,4201917350,4202981334,4204032815,4205071936,4206098840,4207113668,4208116558,4209107648,4210087074,4211054971,4212011472,4212956708,4213890810,4214813906,4215726123,4216627588,4217518424,4218398755,4219268703,4220128387,4220977927,4221817441,4222647044,4223466852,4224276979,4225077537,4225868637,4226650390,4227422904,4228186286,4228940643,4229686080,4230422700,4231150607,4231869902,4232580686,4233283058,4233977116,4234662957,4235340677,4236010370,4236672131,4237326053,4237972227,4238610743,4239241692,4239865161,4240481239,4241090012,4241691565,4242285983,4242873350,4243453749,4244027261,4244593967,4245153947,4245707279,4246254042,4246794313,4247328169,4247855684,4248376933,4248891990,4249400928,4249903818,4250400732,4250891740,4251376912,4251856316,4252330020,4252798092,4253260597,4253717602,4254169171,4254615368,4255056257,4255491900,4255922359,4256347695,4256767969,4257183240,4257593568,4257999011,4258399627,4258795472,4259186603,4259573076,4259954946,4260332267,4260705093,4261073477,4261437472,4261797129,4262152500,4262503636,4262850586,4263193401,4263532129,4263866819,4264197518,4264524274,4264847134,4265166143,4265481348,4265792793,4266100523,4266404582,4266705014,4267001861,4267295166,4267584971,4267871318,4268154248,4268433801,4268710017,4268982936,4269252597,4269519039,4269782300,4270042418,4270299430,4270553373,4270804284,4271052198,4271297151,4271539179,4271778316,4272014596,4272248054,4272478723,4272706636,4272931826,4273154325,4273374166,4273591380,4273805998,4274018051,4274227570,4274434585,4274639125,4274841221,4275040901,4275238194,4275433128,4275625732,4275816033,4276004059,4276189837,4276373393,4276554754,4276733946,4276910995,4277085927,4277258767,4277429540,4277598270,4277764982,4277929700,4278092447,4278253247,4278412124,4278569100,4278724198,4278877440,4279028849,4279178446,4279326253,4279472291,4279616582,4279759146,4279900004,4280039176,4280176683,4280312544,4280446779,4280579407,4280710448,4280839920,4280967842,4281094233,4281219111,4281342494,4281464400,4281584846,4281703850,4281821429,4281937601,4282052382,4282165788,4282277836,4282388543,4282497924,4282605995,4282712772,4282818270,4282922505,4283025492,4283127245,4283227779,4283327109,4283425250,4283522215,4283618019,4283712675,4283806197,4283898599,4283989894,4284080096,4284169217,4284257270,4284344268,4284430224,4284515150,4284599059,4284681963,4284763873,4284844802,4284924761,4285003762,4285081817,4285158936,4285235131,4285310413,4285384793,4285458282,4285530890,4285602628,4285673507,4285743536,4285812726,4285881087,4285948628,4286015360,4286081292,4286146434,4286210795,4286274385,4286337213,4286399288,4286460619,4286521215,4286581084,4286640236,4286698679,4286756421,4286813471,4286869837,4286925527,4286980550,4287034913,4287088625,4287141693,4287194125,4287245928,4287297110,4287347678,4287397640,4287447003,4287495774,4287543961,4287591570,4287638608,4287685082,4287730999,4287776365,4287821187,4287865472,4287909226,4287952455,4287995166,4288037365,4288079058,4288120251,4288160950,4288201161,4288240890,4288280143,4288318925,4288357242,4288395099,4288432502,4288469457,4288505969,4288542043,4288577684,4288612898,4288647690,4288682064,4288716026,4288749581,4288782733,4288815488,4288847850,4288879824,4288911414,4288942626,4288973463,4289003930,4289034032,4289063773,4289093157,4289122189,4289150873,4289179213,4289207213,4289234877,4289262209,4289289213,4289315893,4289342253,4289368297,4289394029,4289419452,4289444570,4289469387,4289493906,4289518131,4289542066,4289565714,4289589078,4289612162,4289634969,4289657502,4289679765,4289701761,4289723493,4289744964,4289766178,4289787137,4289807845,4289828305,4289848519,4289868491,4289888223,4289907718,4289926979,4289946009,4289964811,4289983388,4290001742,4290019876,4290037792,4290055493,4290072982,4290090261,4290107333,4290124200,4290140865,4290157330,4290173597,4290189669,4290205548,4290221237,4290236737,4290252051,4290267182,4290282131,4290296901,4290311494,4290325912,4290340157,4290354231,4290368136,4290381874,4290395447,4290408857,4290422107,4290435198,4290448132,4290460910,4290473535,4290486009,4290498333,4290510509,4290522539,4290534425,4290546168,4290557770,4290569233,4290580558,4290591748,4290602803,4290613726,4290624518,4290635180,4290645714,4290656122,4290666405,4290676565,4290686603,4290696520,4290706318,4290715999,4290725564,4290735014,4290744350,4290753574,4290762688,4290771692,4290780588,4290789378,4290798062,4290806642,4290815119,4290823494,4290831769,4290839944,4290848021,4290856001,4290863886,4290871676,4290879373,4290886977,4290894490,4290901913,4290909247,4290916493,4290923652,4290930725,4290937713,4290944617,4290951438,4290958178,4290964837,4290971416,4290977916,4290984338,4290990683,4290996952,4291003145,4291009264,4291015310,4291021283,4291027184,4291033015,4291038776,4291044468,4291050091,4291055647,4291061136,4291066559,4291071917,4291077211,4291082441,4291087609,4291092715,4291097759,4291102743,4291107667,4291112532,4291117338,4291122087,4291126779
+99,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212:4215,0,10,18,28,40,85,123,168,220,278,400,481,613,731,875,1038,1213,1400,1575,1775,2268,2604,2786,3136,3506,4130,4796,5508,6264,9645,12392,14220,16159,18209,21649,24451,27401,30499,33748,47342,58160,64711,71573,78749,90144,99312,108870,118816,129154,174196,213220,238080,264150,291427,329640,363155,398116,434526,472381,610848,731828,806448,884232,965180,1073896,1170382,1270556,1374422,1481976,1850800,3389616,3666333,3953534,4251217,4559382,5129260,5488173,5859059,6241919,7374168,9570662,10458427,11380262,12336168,13326144,14994907,16130400,17304200,18516326,19766760,21085096,22473939,23935933,25473761,27090141,28787825,30569594,32438257,34396650,36447628,38594068,40838862,43184915,45635142,48192464,50859807,53640095,56536248,59551182,62687799,65948990,69337627,72856561,76508620,80296602,84223275,88291372,92503586,96862571,101370933,106031232,110845975,115817614,120948544,126241098,131697545,137320088,143110859,149071919,155205253,161512770,167996297,174657580,181498280,188519973,195724146,203112195,210685425,218445048,226392181,234527844,242852961,251368358,260074760,268972793,278062983,287345754,296821429,306490229,316352273,326407578,336656059,347097530,357731703,368558190,379576502,390786051,402186149,413776012,425554759,437521412,449674899,462014055,474537623,487244256,500132518,513200886,526447751,539871420,553470119,567241993,581185110,595297462,609576966,624021468,638628745,653396504,668322389,683403980,698638797,714024301,729557897,745236936,761058717,777020492,793119465,809352795,825717601,842210961,858829917,875571475,892432609,909410264,926501355,943702774,961011389,978424047,995937576,1013548788,1031254481,1049051440,1066936441,1084906252,1102957634,1121087346,1139292145,1157568786,1175914029,1194324635,1212797373,1231329018,1249916355,1268556179,1287245299,1305980536,1324758729,1343576732,1362431419,1381319683,1400238439,1419184625,1438155202,1457147157,1476157502,1495183278,1514221554,1533269429,1552324031,1571382520,1590442090,1609499966,1628553409,1647599713,1666636209,1685660263,1704669278,1723660695,1742631992,1761580687,1780504336,1799400534,1818266916,1837101157,1855900974,1874664122,1893388399,1912071644,1930711737,1949306600,1967854196,1986352530,2004799649,2023193642,2041532640,2059814816,2078038384,2096201600,2114302763,2132340212,2150312328,2168217533,2186054291,2203821106,2221516523,2239139127,2256687544,2274160439,2291556517,2308874523,2326113241,2343271492,2360348137,2377342074,2394252239,2411077605,2427817182,2444470016,2461035190,2477511822,2493899065,2510196107,2526402170,2542516509,2558538414,2574467207,2590302243,2606042908,2621688620,2637238829,2652693014,2668050684,2683311379,2698474666,2713540143,2728507434,2743376192,2758146097,2772816855,2787388198,2801859883,2816231694,2830503439,2844674950,2858746082,2872716714,2886586747,2900356105,2914024733,2927592598,2941059688,2954426010,2967691593,2980856483,2993920747,3006884469,3019747752,3032510717,3045173501,3057736259,3070199161,3082562393,3094826158,3106990673,3119056170,3131022894,3142891106,3154661079,3166333099,3177907466,3189384491,3200764497,3212047820,3223234805,3234325809,3245321200,3256221356,3267026664,3277737521,3288354333,3298877514,3309307489,3319644689,3329889553,3340042528,3350104069,3360074637,3369954700,3379744733,3389445216,3399056636,3408579485,3418014261,3427361466,3436621608,3445795199,3454882755,3463884797,3472801849,3481634440,3490383101,3499048368,3507630778,3516130872,3524549194,3532886290,3541142708,3549318998,3557415713,3565433406,3573372633,3581233950,3589017916,3596725090,3604356032,3611911302,3619391462,3626797073,3634128697,3641386897,3648572235,3655685273,3662726573,3669696697,3676596205,3683425658,3690185617,3696876640,3703499285,3710054109,3716541669,3722962519,3729317213,3735606303,3741830339,3747989871,3754085446,3760117610,3766086907,3771993879,3777839066,3783623006,3789346235,3795009287,3800612694,3806156985,3811642688,3817070327,3822440424,3827753500,3833010071,3838210653,3843355757,3848445893,3853481568,3858463286,3863391548,3868266853,3873089696,3877860570,3882579965,3887248368,3891866263,3896434130,3900952448,3905421692,3909842333,3914214841,3918539681,3922817316,3927048205,3931232805,3935371569,3939464947,3943513385,3947517328,3951477216,3955393486,3959266573,3963096907,3966884916,3970631025,3974335655,3977999224,3981622147,3985204835,3988747697,3992251137,3995715558,3999141358,4002528933,4005878676,4009190975,4012466216,4015704782,4018907052,4022073402,4025204206,4028299834,4031360652,4034387025,4037379312,4040337871,4043263057,4046155220,4049014709,4051841869,4054637042,4057400566,4060132778,4062834010,4065504592,4068144851,4070755111,4073335693,4075886914,4078409090,4080902532,4083367550,4085804450,4088213536,4090595108,4092949463,4095276897,4097577701,4099852165,4102100575,4104323215,4106520366,4108692307,4110839312,4112961655,4115059606,4117133433,4119183400,4121209770,4123212802,4125192754,4127149880,4129084433,4130996662,4132886814,4134755133,4136601862,4138427240,4140231505,4142014891,4143777631,4145519954,4147242089,4148944261,4150626693,4152289606,4153933218,4155557746,4157163403,4158750402,4160318952,4161869260,4163401532,4164915971,4166412777,4167892150,4169354286,4170799380,4172227625,4173639211,4175034327,4176413160,4177775894,4179122712,4180453795,4181769321,4183069467,4184354408,4185624318,4186879367,4188119725,4189345560,4190557037,4191754321,4192937573,4194106954,4195262623,4196404736,4197533449,4198648916,4199751289,4200840717,4201917350,4202981334,4204032815,4205071936,4206098840,4207113668,4208116558,4209107648,4210087074,4211054971,4212011472,4212956708,4213890810,4214813906,4215726123,4216627588,4217518424,4218398755,4219268703,4220128387,4220977927,4221817441,4222647044,4223466852,4224276979,4225077537,4225868637,4226650390,4227422904,4228186286,4228940643,4229686080,4230422700,4231150607,4231869902,4232580686,4233283058,4233977116,4234662957,4235340677,4236010370,4236672131,4237326053,4237972227,4238610743,4239241692,4239865161,4240481239,4241090012,4241691565,4242285983,4242873350,4243453749,4244027261,4244593967,4245153947,4245707279,4246254042,4246794313,4247328169,4247855684,4248376933,4248891990,4249400928,4249903818,4250400732,4250891740,4251376912,4251856316,4252330020,4252798092,4253260597,4253717602,4254169171,4254615368,4255056257,4255491900,4255922359,4256347695,4256767969,4257183240,4257593568,4257999011,4258399627,4258795472,4259186603,4259573076,4259954946,4260332267,4260705093,4261073477,4261437472,4261797129,4262152500,4262503636,4262850586,4263193401,4263532129,4263866819,4264197518,4264524274,4264847134,4265166143,4265481348,4265792793,4266100523,4266404582,4266705014,4267001861,4267295166,4267584971,4267871318,4268154248,4268433801,4268710017,4268982936,4269252597,4269519039,4269782300,4270042418,4270299430,4270553373,4270804284,4271052198,4271297151,4271539179,4271778316,4272014596,4272248054,4272478723,4272706636,4272931826,4273154325,4273374166,4273591380,4273805998,4274018051,4274227570,4274434585,4274639125,4274841221,4275040901,4275238194,4275433128,4275625732,4275816033,4276004059,4276189837,4276373393,4276554754,4276733946,4276910995,4277085927,4277258767,4277429540,4277598270,4277764982,4277929700,4278092447,4278253247,4278412124,4278569100,4278724198,4278877440,4279028849,4279178446,4279326253,4279472291,4279616582,4279759146,4279900004,4280039176,4280176683,4280312544,4280446779,4280579407,4280710448,4280839920,4280967842,4281094233,4281219111,4281342494,4281464400,4281584846,4281703850,4281821429,4281937601,4282052382,4282165788,4282277836,4282388543,4282497924,4282605995,4282712772,4282818270,4282922505,4283025492,4283127245,4283227779,4283327109,4283425250,4283522215,4283618019,4283712675,4283806197,4283898599,4283989894,4284080096,4284169217,4284257270,4284344268,4284430224,4284515150,4284599059,4284681963,4284763873,4284844802,4284924761,4285003762,4285081817,4285158936,4285235131,4285310413,4285384793,4285458282,4285530890,4285602628,4285673507,4285743536,4285812726,4285881087,4285948628,4286015360,4286081292,4286146434,4286210795,4286274385,4286337213,4286399288,4286460619,4286521215,4286581084,4286640236,4286698679,4286756421,4286813471,4286869837,4286925527,4286980550,4287034913,4287088625,4287141693,4287194125,4287245928,4287297110,4287347678,4287397640,4287447003,4287495774,4287543961,4287591570,4287638608,4287685082,4287730999,4287776365,4287821187,4287865472,4287909226,4287952455,4287995166,4288037365,4288079058,4288120251,4288160950,4288201161,4288240890,4288280143,4288318925,4288357242,4288395099,4288432502,4288469457,4288505969,4288542043,4288577684,4288612898,4288647690,4288682064,4288716026,4288749581,4288782733,4288815488,4288847850,4288879824,4288911414,4288942626,4288973463,4289003930,4289034032,4289063773,4289093157,4289122189,4289150873,4289179213,4289207213,4289234877,4289262209,4289289213,4289315893,4289342253,4289368297,4289394029,4289419452,4289444570,4289469387,4289493906,4289518131,4289542066,4289565714,4289589078,4289612162,4289634969,4289657502,4289679765,4289701761,4289723493,4289744964,4289766178,4289787137,4289807845,4289828305,4289848519,4289868491,4289888223,4289907718,4289926979,4289946009,4289964811,4289983388,4290001742,4290019876,4290037792,4290055493,4290072982,4290090261,4290107333,4290124200,4290140865,4290157330,4290173597,4290189669,4290205548,4290221237,4290236737,4290252051,4290267182,4290282131,4290296901,4290311494,4290325912,4290340157,4290354231,4290368136,4290381874,4290395447,4290408857,4290422107,4290435198,4290448132,4290460910,4290473535,4290486009,4290498333,4290510509,4290522539,4290534425,4290546168,4290557770,4290569233,4290580558,4290591748,4290602803,4290613726,4290624518,4290635180,4290645714,4290656122,4290666405,4290676565,4290686603,4290696520,4290706318,4290715999,4290725564,4290735014,4290744350,4290753574,4290762688,4290771692,4290780588,4290789378,4290798062,4290806642,4290815119,4290823494,4290831769,4290839944,4290848021,4290856001,4290863886,4290871676,4290879373,4290886977,4290894490,4290901913,4290909247,4290916493,4290923652,4290930725,4290937713,4290944617,4290951438,4290958178,4290964837,4290971416,4290977916,4290984338,4290990683,4290996952,4291003145,4291009264,4291015310,4291021283,4291027184,4291033015,4291038776,4291044468,4291050091,4291055647,4291061136,4291066559,4291071917,4291077211,4291082441,4291087609,4291092715,4291097759,4291102743,4291107667,4291112532,4291117338,4291122087,4291126779
//Job - 3rd Jobs, Baby 3rds, Expanded Super Novice, and Kagerou/Oboro
-50,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212,1,368,568,696,1206,1774,2192,3196,5080,7352,8580,9892,13358,18984,31925,35860,40013,51605,68585,87770,96443,105515,131770,167428,206720,223860,241673,294553,362303,479053,513362,548856,656197,787507,927154,985696,1046034,1231134,1449220,1678177,1943306,2244059,2584282,2968115,3400000,3884688,4427246,5033064,5707855,6457661,7288852,8208125,9222500,10339317,11566230,12911197,14382470,15988583,17738338,19640789,21705223,23941143,26358244,28966392,31775600,34796000,38037819,41511350,45226922,49194872,53425513,57929105,62715823,67795725,73178721,78874542,84892710,91242506,97932943,104972733,112370263,120133566,128270295,136787699,145692601,154991375,164689926,174793673,185307530,196235893,207582627,219351052,231543938,244163492,257211358,270688607,284595740,298932685,313698799,328892871,344513126,360557232,377022309,393904936,411201163,428906522,447016041,465524258,484425237,503712583,523379460,543418608,563822364,584582678,605691135,627138976,648917115,671016163,693426449,716138040,739140762,762424222,785977830,809790819,833852265,858151108,882676174,907416194,932359821,957495652,982812246,1008298142,1033941875,1059731995,1085657082,1111705763,1137866726,1164128735,1190480643,1216911407,1243410098,1269965914,1296568193,1323206421,1349870242,1376549469,1403234090,1429914278,1456580397,1483223010,1509832883,1536400993,1562918530,1589376904,1615767747,1642082917,1668314501,1694454815,1720496409,1746432067,1772254807,1797957882,1823534782,1848979230,1874285184,1899446836,1924458610,1949315159,1974011367,1998542342,2022903418,2047090150,2071098310,2094923887,2118563083,2142012307,2165268175,2188327503,2211187307,2233844796,2256297369,2278542611,2300578289,2322402347,2344012903,2365408244,2386586822,2407547248,2428288289,2448808865,2469108042,2489185029,2509039173,2528669956,2548076989,2567260008,2586218871,2604953553,2623464142,2641750834,2659813929,2677653830,2695271035,2712666136,2729839813,2746792832,2763526041,2780040365,2796336805,2812416433,2828280388,2843929874,2859366157,2874590560,2889604462,2904409294,2919006536,2933397714,2947584399,2961568203,2975350775,2988933801,3002319001,3015508125,3028502953,3041305291,3053916970,3066339843,3078575783,3090626683,3102494451,3114181011,3125688300,3137018266,3148172868,3159154072,3169963851,3180604184,3191077054,3201384446,3211528348,3221510747,3231333629,3240998979,3250508779,3259865006,3269069632,3278124624,3287031942,3295793538,3304411356,3312887331,3321223387,3329421440,3337483392,3345411135,3353206549,3360871500,3368407842,3375817414,3383102041,3390263534,3397303689,3404224286,3411027090,3417713850,3424286299,3430746152,3437095109,3443334852,3449467047,3455493342,3461415367,3467234735,3472953041,3478571863,3484092761,3489517276,3494846931,3500083232,3505227667,3510281705,3515246797,3520124376,3524915857,3529622637,3534246095,3538787592,3543248471,3547630058,3551933659,3556160565,3560312047,3564389360,3568393741,3572326410,3576188570,3579981406,3583706087,3587363764,3590955573,3594482632,3597946043,3601346892,3604686248,3607965165,3611184681,3614345817,3617449581,3620496963,3623488939,3626426470,3629310502,3632141966,3634921779,3637650842,3640330044,3642960259,3645542346,3648077152,3650565509,3653008236,3655406140,3657760013,3660070635,3662338774,3664565184,3666750607,3668895774,3671001402,3673068197,3675096854,3677088055,3679042471,3680960763,3682843579,3684691557,3686505325,3688285499,3690032685,3691747478,3693430465,3695082220,3696703310,3698294290,3699855707,3701388097,3702891989,3704367901,3705816342,3707237813,3708632806,3710001804,3711345282,3712663706,3713957535,3715227220,3716473203,3717695918,3718895792,3720073245,3721228689,3722362528,3723475160,3724566975,3725638356,3726689680,3727721318,3728733632,3729726979,3730701710,3731658168,3732596692,3733517613,3734421257,3735307945,3736177990,3737031701,3737869381,3738691328,3739497833,3740289184,3741065662,3741827543,3742575099,3743308597,3744028298,3744734459,3745427333,3746107167,3746774204,3747428682,3748070836,3748700896,3749319088,3749925634,3750520750,3751104651,3751677546,3752239641,3752791138,3753332236,3753863129,3754384008,3754895060,3755396470,3755888418,3756371081,3756844634,3757309248,3757765090,3758212325,3758651114,3759081616,3759503986,3759918377,3760324939,3760723819,3761115161,3761499107,3761875797,3762245366,3762607949,3762963676,3763312677,3763655079,3763991005,3764320578,3764643917,3764961140,3765272361,3765577694,3765877250,3766171137,3766459463,3766742332,3767019847,3767292109,3767559217,3767821269,3768078359,3768330582,3768578029,3768820790,3769058954,3769292607,3769521835,3769746721,3769967347,3770183794,3770396141,3770604465,3770808842,3771009346,3771206051,3771399029,3771588350,3771774083,3771956296,3772135055,3772310426,3772482473,3772651259,3772816845,3772979292,3773138659,3773295005,3773448386,3773598859,3773746479,3773891300,3774033375,3774172755,3774309492,3774443636,3774575236,3774704340,3774830995,3774955248,3775077144,3775196728,3775314043,3775429133,3775542040,3775652805,3775761468,3775868070,3775972649,3776075244,3776175892,3776274631,3776371496,3776466523,3776559747,3776651202,3776740921,3776828938,3776915285,3776999993,3777083093,3777164616,3777244592,3777323050,3777400019,3777475527,3777549602,3777622271,3777693560,3777763496,3777832105,3777899411,3777965440,3778030215,3778093760,3778156099,3778217255,3778277250,3778336106,3778393844,3778450486,3778506053,3778560565,3778614042,3778666503,3778717968,3778768456,3778817986,3778866575,3778914242,3778961003,3779006877,3779051880,3779096028,3779139338,3779181825,3779223505,3779264394,3779304506,3779343857,3779382460,3779420330,3779457481,3779493927,3779529681,3779564756,3779599164,3779632919,3779666033,3779698518,3779730386,3779761649,3779792318,3779822405,3779851920,3779880875,3779909280,3779937145,3779964481,3779991298,3780017605,3780043413,3780068731,3780093568,3780117933,3780141835,3780165283,3780188286,3780210852,3780232989,3780254706,3780276010,3780296909,3780317412,3780337525,3780357256,3780376612,3780395601,3780414229,3780432503,3780450430,3780468016,3780485268,3780502193,3780518796,3780535084,3780551062,3780566737,3780582114,3780597199,3780611997,3780626514,3780640755,3780654726,3780668431,3780681876,3780695066,3780708005,3780720698,3780733150,3780745366,3780757349,3780769105,3780780637,3780791950,3780803048,3780813936,3780824617,3780835095,3780845374,3780855458,3780865350,3780875054,3780884574,3780893913,3780903074,3780912061,3780920878,3780929527,3780938012,3780946336,3780954501,3780962511,3780970369,3780978078,3780985640,3780993059,3781000337,3781007476,3781014480,3781021351,3781028091,3781034703,3781041189,3781047552,3781053794,3781059918,3781065925,3781071818,3781077599,3781083270,3781088834,3781094292,3781099646,3781104899,3781110052,3781115107,3781120066,3781124931,3781129703,3781134384,3781138976,3781143481,3781147901,3781152237,3781156490,3781160662,3781164755,3781168770,3781172709,3781176573,3781180364,3781184083,3781187731,3781191310,3781194821,3781198265,3781201644,3781204958,3781208209,3781211399,3781214528,3781217598,3781220609,3781223563,3781226461,3781229304,3781232093,3781234829,3781237513,3781240146,3781242729,3781245263,3781247749,3781250187,3781252579,3781254926,3781257228,3781259486,3781261701,3781263874,3781266006,3781268097,3781270149,3781272162,3781274136,3781276073,3781277973,3781279837,3781281666,3781283460,3781285220,3781286946,3781288639,3781290300,3781291930,3781293529,3781295097,3781296636,3781298145,3781299626,3781301078,3781302503,3781303901,3781305272,3781306617,3781307937,3781309231,3781310501,3781311747,3781312969,3781314168,3781315344,3781316498,3781317630,3781318740,3781319829,3781320897,3781321945,3781322973,3781323982,3781324972,3781325943,3781326895,3781327829,3781328745,3781329644,3781330526,3781331391,3781332240,3781333073,3781333890,3781334691,3781335477,3781336248,3781337004,3781337746,3781338474,3781339188,3781339888,3781340575,3781341249,3781341910,3781342559,3781343195,3781343819,3781344431,3781345032,3781345621,3781346199,3781346766,3781347322,3781347868,3781348403,3781348928,3781349443,3781349948,3781350444,3781350930,3781351407,3781351875,3781352334,3781352784,3781353226,3781353659,3781354084,3781354501,3781354910,3781355311,3781355705,3781356091,3781356470,3781356842,3781357207,3781357565,3781357916,3781358260,3781358598,3781358929,3781359254,3781359573,3781359886,3781360193,3781360494,3781360789,3781361079,3781361363,3781361642,3781361915,3781362183,3781362446,3781362704,3781362957,3781363205,3781363449,3781363688,3781363922,3781364152,3781364378,3781364599,3781364816,3781365029,3781365238,3781365443,3781365644,3781365841,3781366034,3781366224,3781366410,3781366593,3781366772,3781366948,3781367120,3781367289,3781367455,3781367618,3781367778,3781367934,3781368088,3781368239,3781368387,3781368532,3781368674,3781368813,3781368950,3781369084,3781369216,3781369345,3781369472,3781369596,3781369718,3781369838,3781369955,3781370070,3781370183,3781370294,3781370403,3781370509,3781370613,3781370715,3781370815,3781370914,3781371011,3781371106,3781371199,3781371290,3781371380,3781371468,3781371554,3781371638,3781371721,3781371802,3781371882,3781371960,3781372037,3781372112,3781372186,3781372258,3781372329,3781372399,3781372467,3781372534,3781372600,3781372664,3781372727,3781372789,3781372850,3781372910,3781372969,3781373026,3781373082,3781373137,3781373191,3781373244,3781373296,3781373347,3781373397,3781373446,3781373494,3781373541,3781373587,3781373632,3781373677,3781373721,3781373764,3781373806,3781373847,3781373887,3781373927,3781373966,3781374004,3781374041,3781374078,3781374114,3781374149,3781374184,3781374218,3781374251,3781374284,3781374316,3781374347,3781374378,3781374408,3781374438,3781374467,3781374496,3781374524,3781374551,3781374578,3781374604,3781374630,3781374655,3781374680,3781374704,3781374728,3781374751,3781374774,3781374797,3781374819,3781374841,3781374862,3781374883,3781374903,3781374923,3781374943,3781374962,3781374981,3781375000,3781375018,3781375036,3781375053,3781375070,3781375087,3781375103,3781375119,3781375135,3781375151,3781375166,3781375181,3781375196,3781375210,3781375224,3781375238,3781375252,3781375265,3781375278,3781375291,3781375303,3781375315,3781375327,3781375339,3781375351,3781375362,3781375373,3781375384,3781375395,3781375405,3781375415,3781375425,3781375435,3781375445,3781375454,3781375463,3781375472,3781375481,3781375490,3781375499,3781375507,3781375515,3781375523,3781375531,3781375539,3781375547,3781375554,3781375561,3781375568,3781375575,3781375582,3781375589,3781375596,3781375602,3781375608,3781375614,3781375620,3781375626,3781375632,3781375638,3781375644,3781375649,3781375654,3781375659,3781375664
+50,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212:4215,1,368,568,696,1206,1774,2192,3196,5080,7352,8580,9892,13358,18984,31925,35860,40013,51605,68585,87770,96443,105515,131770,167428,206720,223860,241673,294553,362303,479053,513362,548856,656197,787507,927154,985696,1046034,1231134,1449220,1678177,1943306,2244059,2584282,2968115,3400000,3884688,4427246,5033064,5707855,6457661,7288852,8208125,9222500,10339317,11566230,12911197,14382470,15988583,17738338,19640789,21705223,23941143,26358244,28966392,31775600,34796000,38037819,41511350,45226922,49194872,53425513,57929105,62715823,67795725,73178721,78874542,84892710,91242506,97932943,104972733,112370263,120133566,128270295,136787699,145692601,154991375,164689926,174793673,185307530,196235893,207582627,219351052,231543938,244163492,257211358,270688607,284595740,298932685,313698799,328892871,344513126,360557232,377022309,393904936,411201163,428906522,447016041,465524258,484425237,503712583,523379460,543418608,563822364,584582678,605691135,627138976,648917115,671016163,693426449,716138040,739140762,762424222,785977830,809790819,833852265,858151108,882676174,907416194,932359821,957495652,982812246,1008298142,1033941875,1059731995,1085657082,1111705763,1137866726,1164128735,1190480643,1216911407,1243410098,1269965914,1296568193,1323206421,1349870242,1376549469,1403234090,1429914278,1456580397,1483223010,1509832883,1536400993,1562918530,1589376904,1615767747,1642082917,1668314501,1694454815,1720496409,1746432067,1772254807,1797957882,1823534782,1848979230,1874285184,1899446836,1924458610,1949315159,1974011367,1998542342,2022903418,2047090150,2071098310,2094923887,2118563083,2142012307,2165268175,2188327503,2211187307,2233844796,2256297369,2278542611,2300578289,2322402347,2344012903,2365408244,2386586822,2407547248,2428288289,2448808865,2469108042,2489185029,2509039173,2528669956,2548076989,2567260008,2586218871,2604953553,2623464142,2641750834,2659813929,2677653830,2695271035,2712666136,2729839813,2746792832,2763526041,2780040365,2796336805,2812416433,2828280388,2843929874,2859366157,2874590560,2889604462,2904409294,2919006536,2933397714,2947584399,2961568203,2975350775,2988933801,3002319001,3015508125,3028502953,3041305291,3053916970,3066339843,3078575783,3090626683,3102494451,3114181011,3125688300,3137018266,3148172868,3159154072,3169963851,3180604184,3191077054,3201384446,3211528348,3221510747,3231333629,3240998979,3250508779,3259865006,3269069632,3278124624,3287031942,3295793538,3304411356,3312887331,3321223387,3329421440,3337483392,3345411135,3353206549,3360871500,3368407842,3375817414,3383102041,3390263534,3397303689,3404224286,3411027090,3417713850,3424286299,3430746152,3437095109,3443334852,3449467047,3455493342,3461415367,3467234735,3472953041,3478571863,3484092761,3489517276,3494846931,3500083232,3505227667,3510281705,3515246797,3520124376,3524915857,3529622637,3534246095,3538787592,3543248471,3547630058,3551933659,3556160565,3560312047,3564389360,3568393741,3572326410,3576188570,3579981406,3583706087,3587363764,3590955573,3594482632,3597946043,3601346892,3604686248,3607965165,3611184681,3614345817,3617449581,3620496963,3623488939,3626426470,3629310502,3632141966,3634921779,3637650842,3640330044,3642960259,3645542346,3648077152,3650565509,3653008236,3655406140,3657760013,3660070635,3662338774,3664565184,3666750607,3668895774,3671001402,3673068197,3675096854,3677088055,3679042471,3680960763,3682843579,3684691557,3686505325,3688285499,3690032685,3691747478,3693430465,3695082220,3696703310,3698294290,3699855707,3701388097,3702891989,3704367901,3705816342,3707237813,3708632806,3710001804,3711345282,3712663706,3713957535,3715227220,3716473203,3717695918,3718895792,3720073245,3721228689,3722362528,3723475160,3724566975,3725638356,3726689680,3727721318,3728733632,3729726979,3730701710,3731658168,3732596692,3733517613,3734421257,3735307945,3736177990,3737031701,3737869381,3738691328,3739497833,3740289184,3741065662,3741827543,3742575099,3743308597,3744028298,3744734459,3745427333,3746107167,3746774204,3747428682,3748070836,3748700896,3749319088,3749925634,3750520750,3751104651,3751677546,3752239641,3752791138,3753332236,3753863129,3754384008,3754895060,3755396470,3755888418,3756371081,3756844634,3757309248,3757765090,3758212325,3758651114,3759081616,3759503986,3759918377,3760324939,3760723819,3761115161,3761499107,3761875797,3762245366,3762607949,3762963676,3763312677,3763655079,3763991005,3764320578,3764643917,3764961140,3765272361,3765577694,3765877250,3766171137,3766459463,3766742332,3767019847,3767292109,3767559217,3767821269,3768078359,3768330582,3768578029,3768820790,3769058954,3769292607,3769521835,3769746721,3769967347,3770183794,3770396141,3770604465,3770808842,3771009346,3771206051,3771399029,3771588350,3771774083,3771956296,3772135055,3772310426,3772482473,3772651259,3772816845,3772979292,3773138659,3773295005,3773448386,3773598859,3773746479,3773891300,3774033375,3774172755,3774309492,3774443636,3774575236,3774704340,3774830995,3774955248,3775077144,3775196728,3775314043,3775429133,3775542040,3775652805,3775761468,3775868070,3775972649,3776075244,3776175892,3776274631,3776371496,3776466523,3776559747,3776651202,3776740921,3776828938,3776915285,3776999993,3777083093,3777164616,3777244592,3777323050,3777400019,3777475527,3777549602,3777622271,3777693560,3777763496,3777832105,3777899411,3777965440,3778030215,3778093760,3778156099,3778217255,3778277250,3778336106,3778393844,3778450486,3778506053,3778560565,3778614042,3778666503,3778717968,3778768456,3778817986,3778866575,3778914242,3778961003,3779006877,3779051880,3779096028,3779139338,3779181825,3779223505,3779264394,3779304506,3779343857,3779382460,3779420330,3779457481,3779493927,3779529681,3779564756,3779599164,3779632919,3779666033,3779698518,3779730386,3779761649,3779792318,3779822405,3779851920,3779880875,3779909280,3779937145,3779964481,3779991298,3780017605,3780043413,3780068731,3780093568,3780117933,3780141835,3780165283,3780188286,3780210852,3780232989,3780254706,3780276010,3780296909,3780317412,3780337525,3780357256,3780376612,3780395601,3780414229,3780432503,3780450430,3780468016,3780485268,3780502193,3780518796,3780535084,3780551062,3780566737,3780582114,3780597199,3780611997,3780626514,3780640755,3780654726,3780668431,3780681876,3780695066,3780708005,3780720698,3780733150,3780745366,3780757349,3780769105,3780780637,3780791950,3780803048,3780813936,3780824617,3780835095,3780845374,3780855458,3780865350,3780875054,3780884574,3780893913,3780903074,3780912061,3780920878,3780929527,3780938012,3780946336,3780954501,3780962511,3780970369,3780978078,3780985640,3780993059,3781000337,3781007476,3781014480,3781021351,3781028091,3781034703,3781041189,3781047552,3781053794,3781059918,3781065925,3781071818,3781077599,3781083270,3781088834,3781094292,3781099646,3781104899,3781110052,3781115107,3781120066,3781124931,3781129703,3781134384,3781138976,3781143481,3781147901,3781152237,3781156490,3781160662,3781164755,3781168770,3781172709,3781176573,3781180364,3781184083,3781187731,3781191310,3781194821,3781198265,3781201644,3781204958,3781208209,3781211399,3781214528,3781217598,3781220609,3781223563,3781226461,3781229304,3781232093,3781234829,3781237513,3781240146,3781242729,3781245263,3781247749,3781250187,3781252579,3781254926,3781257228,3781259486,3781261701,3781263874,3781266006,3781268097,3781270149,3781272162,3781274136,3781276073,3781277973,3781279837,3781281666,3781283460,3781285220,3781286946,3781288639,3781290300,3781291930,3781293529,3781295097,3781296636,3781298145,3781299626,3781301078,3781302503,3781303901,3781305272,3781306617,3781307937,3781309231,3781310501,3781311747,3781312969,3781314168,3781315344,3781316498,3781317630,3781318740,3781319829,3781320897,3781321945,3781322973,3781323982,3781324972,3781325943,3781326895,3781327829,3781328745,3781329644,3781330526,3781331391,3781332240,3781333073,3781333890,3781334691,3781335477,3781336248,3781337004,3781337746,3781338474,3781339188,3781339888,3781340575,3781341249,3781341910,3781342559,3781343195,3781343819,3781344431,3781345032,3781345621,3781346199,3781346766,3781347322,3781347868,3781348403,3781348928,3781349443,3781349948,3781350444,3781350930,3781351407,3781351875,3781352334,3781352784,3781353226,3781353659,3781354084,3781354501,3781354910,3781355311,3781355705,3781356091,3781356470,3781356842,3781357207,3781357565,3781357916,3781358260,3781358598,3781358929,3781359254,3781359573,3781359886,3781360193,3781360494,3781360789,3781361079,3781361363,3781361642,3781361915,3781362183,3781362446,3781362704,3781362957,3781363205,3781363449,3781363688,3781363922,3781364152,3781364378,3781364599,3781364816,3781365029,3781365238,3781365443,3781365644,3781365841,3781366034,3781366224,3781366410,3781366593,3781366772,3781366948,3781367120,3781367289,3781367455,3781367618,3781367778,3781367934,3781368088,3781368239,3781368387,3781368532,3781368674,3781368813,3781368950,3781369084,3781369216,3781369345,3781369472,3781369596,3781369718,3781369838,3781369955,3781370070,3781370183,3781370294,3781370403,3781370509,3781370613,3781370715,3781370815,3781370914,3781371011,3781371106,3781371199,3781371290,3781371380,3781371468,3781371554,3781371638,3781371721,3781371802,3781371882,3781371960,3781372037,3781372112,3781372186,3781372258,3781372329,3781372399,3781372467,3781372534,3781372600,3781372664,3781372727,3781372789,3781372850,3781372910,3781372969,3781373026,3781373082,3781373137,3781373191,3781373244,3781373296,3781373347,3781373397,3781373446,3781373494,3781373541,3781373587,3781373632,3781373677,3781373721,3781373764,3781373806,3781373847,3781373887,3781373927,3781373966,3781374004,3781374041,3781374078,3781374114,3781374149,3781374184,3781374218,3781374251,3781374284,3781374316,3781374347,3781374378,3781374408,3781374438,3781374467,3781374496,3781374524,3781374551,3781374578,3781374604,3781374630,3781374655,3781374680,3781374704,3781374728,3781374751,3781374774,3781374797,3781374819,3781374841,3781374862,3781374883,3781374903,3781374923,3781374943,3781374962,3781374981,3781375000,3781375018,3781375036,3781375053,3781375070,3781375087,3781375103,3781375119,3781375135,3781375151,3781375166,3781375181,3781375196,3781375210,3781375224,3781375238,3781375252,3781375265,3781375278,3781375291,3781375303,3781375315,3781375327,3781375339,3781375351,3781375362,3781375373,3781375384,3781375395,3781375405,3781375415,3781375425,3781375435,3781375445,3781375454,3781375463,3781375472,3781375481,3781375490,3781375499,3781375507,3781375515,3781375523,3781375531,3781375539,3781375547,3781375554,3781375561,3781375568,3781375575,3781375582,3781375589,3781375596,3781375602,3781375608,3781375614,3781375620,3781375626,3781375632,3781375638,3781375644,3781375649,3781375654,3781375659,3781375664
diff --git a/db/pre-re/job_db1.txt b/db/pre-re/job_db1.txt
index d25f0891a..3872789e9 100644
--- a/db/pre-re/job_db1.txt
+++ b/db/pre-re/job_db1.txt
@@ -279,3 +279,5 @@
4211, 26000,80 , 0 ,515 ,400 ,500 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 750 ,2000
// Oboro
4212, 26000,80 , 0 ,515 ,400 ,500 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 750 ,2000
+// Rebellion
+4215, 28000,88 , 0 ,450 ,500 ,2000, 2000, 2000, 2000, 2000, 2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 700 , 750 , 700 ,1500 ,1500 ,2000 ,2000
diff --git a/db/pre-re/skill_db.txt b/db/pre-re/skill_db.txt
index ec7a8bdbc..a663e4b57 100644
--- a/db/pre-re/skill_db.txt
+++ b/db/pre-re/skill_db.txt
@@ -1028,6 +1028,32 @@
//2547,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GM_ITEM_MATKMAX#Maximum Magic Attack#
//2548,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GM_ITEM_MATKMIN#Minimal Magic Attack#
+// Rebellion
+2551,0,0,0,0,0,0,10,0,no,0,0,0,none,0, RL_GLITTERING_GREED,Flip The Coin Greed//Not in the skill tree. Why and what does it do? Need real max level.
+2552,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_RICHS_COIN,Rich's Coin
+2553,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_MASS_SPIRAL,Mass Spiral
+2554,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_BANISHING_BUSTER,Banishing Buster
+2555,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_B_TRAP,Bind Trap
+2556,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_FLICKER,Flicker
+2557,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_S_STORM,Shatter Storm
+2558,0,0,0,0,0,0,10,0,no,0,0,0,none,0, RL_E_CHAIN,Eternal Chain
+2559,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_QD_SHOT,Quick Draw Shot
+2560,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_C_MARKER,Crimson Marker
+2561,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_FIREDANCE,Fire Dance
+2562,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_H_MINE,Howling Mine
+2563,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_P_ALTER,Platinum Alter
+2564,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_FALLEN_ANGEL,Fallen Angel
+2565,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_R_TRIP,Round Trip
+2566,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_D_TAIL,Dragon Tail
+2567,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_FIRE_RAIN,Fire Rain
+2568,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_HEAT_BARREL,Heat Barrel
+2569,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_AM_BLAST,Anti-Material Blast
+2570,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_SLUGSHOT,Slug Shot
+2571,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_HAMMER_OF_GOD,Hammer of God
+2572,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_R_TRIP_PLUSATK,Round Trip Plus Attack
+2573,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_B_FLICKER_ATK,Bind Flicker Attack//Max level guess based on Bind Trap max level.
+2574,0,0,0,0,0,0,10,0,no,0,0,0,none,0, RL_GLITTERING_GREED_ATK,Flip The Coin Greed Attack//Guess on max level is from Flip The Coin Greed
+
// Kagerou & Oboro
3001,0,6,4,0,0,0,1,1,no,0,0,0,none,0, KO_YAMIKUMO,Yamikumo
3002,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0, KO_RIGHT,Right Hand Mastery
diff --git a/db/pre-re/skill_require_db.txt b/db/pre-re/skill_require_db.txt
index 5b04d5f6a..7f4597f61 100644
--- a/db/pre-re/skill_require_db.txt
+++ b/db/pre-re/skill_require_db.txt
@@ -443,7 +443,7 @@
1004,0,0,15,0,0,0,99,2,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AS_VENOMKNIFE#xiiCt#
1005,0,0,25,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_CLOSECONFINE#N??[YRt@C#
1006,0,0,40,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_SIGHTBLASTER#TCguX^?[#
-1007,0,0,30,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_CREATECON#G?^Ro?[^???
+1007,0,0,30,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_CREATECON#G?^Ro?[^???
1008,0,0,30,0,0,0,99,0,0,none,0,12115,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTWATER#G?^`FW#
1009,0,0,10,0,0,0,11,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_PHANTASMIC#t@^X~bNA??[#
1010,0,0,20,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_PANGVOICE#p{CX#
@@ -793,6 +793,32 @@
//2543,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ALL_RAY_OF_PROTECTION#Ray of Protection#
//2544,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MC_CARTDECORATE#Cart Decorate#
+// Rebellion
+2551,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_GLITTERING_GREED#Flip The Coin Greed#
+2552,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_RICHS_COIN#Rich's Coin#
+2553,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_MASS_SPIRAL#Mass Spiral#
+2554,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_BANISHING_BUSTER#Banishing Buster#
+2555,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_B_TRAP#Bind Trap#
+2556,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FLICKER#Flicker#
+2557,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_S_STORM#Shatter Storm#
+2558,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_E_CHAIN#Eternal Chain#
+2559,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_QD_SHOT#Quick Draw Shot#
+2560,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_C_MARKER#Crimson Marker#
+2561,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FIREDANCE#Fire Dance#
+2562,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_H_MINE#Howling Mine#
+2563,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_P_ALTER#Platinum Alter#
+2564,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FALLEN_ANGEL#Fallen Angel#
+2565,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_R_TRIP#Round Trip#
+2566,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_D_TAIL#Dragon Tail#
+2567,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FIRE_RAIN#Fire Rain#
+2568,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_HEAT_BARREL#Heat Barrel#
+2569,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_AM_BLAST#Anti-Material Blast#
+2570,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_SLUGSHOT#Slug Shot#
+2571,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_HAMMER_OF_GOD#Hammer of God#
+2572,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_R_TRIP_PLUSATK#Round Trip Plus Attack#
+2573,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_B_FLICKER_ATK#Bind Flicker Attack#
+2574,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_GLITTERING_GREED_ATK#Flip The Coin Greed Attack#
+
//****
// Kagerou/Oboro
3001,0,0,10,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KO_YAMIKUMO#Yamikumo#
diff --git a/db/pre-re/skill_tree.conf b/db/pre-re/skill_tree.conf
index 23563b17e..5269ab466 100644
--- a/db/pre-re/skill_tree.conf
+++ b/db/pre-re/skill_tree.conf
@@ -11,7 +11,7 @@
// http://hercules.ws/board/topic/1188-skill-tree-db-redesign/
//================ Structure Example =================
/*
-Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there)
+Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there)
inherit: ( "Other_Job_Name" ); // Base job from which this job will inherit its skill tree. NV_TRICKDEAD inheritance is skipped for non-novices from the source
skills: { // SKILL_NAMEs come from the Name (16th column) value in db/pre-re/skill_db.txt
@@ -19,8 +19,8 @@ Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so
SKILL_NAME2: { // Use this for skills which have other skills as prerequisites
MaxLevel: Max_Level // Max_Level is a numeric value that should match your client side files
SKILL_NAME_PREREQUISITE: Level_Prerequisite // The prerequisite skill and min level for having this skill available. Should also match your client side files
- SKILL_NAME_PREREQUISITE2: Level_Prerequisite2 // You can add as many prerequisite skills as you want. Minimum of 1 if you add a skill this way
- }
+ SKILL_NAME_PREREQUISITE2: Level_Prerequisite2 // You can add as many prerequisite skills as you want. Minimum of 1 if you add a skill this way
+ }
}
*/
//====================================================
@@ -1545,7 +1545,7 @@ Lord_Knight: {
KN_SPEARMASTERY: 10
KN_PIERCE: 5
KN_SPEARSTAB: 5
- KN_RIDING: 1
+ KN_RIDING: 1
}
LK_HEADCRUSH: {
MaxLevel: 5
@@ -3852,3 +3852,85 @@ Oboro: {
}
}
}
+Rebellion: {
+ inherit: ( "Gunslinger" );
+
+ skills: {
+ RL_RICHS_COIN: {
+ MaxLevel: 1
+ GS_GLITTERING: 5
+ }
+ RL_MASS_SPIRAL: {
+ MaxLevel: 5
+ GS_PIERCINGSHOT: 1
+ }
+ RL_BANISHING_BUSTER: {
+ MaxLevel: 5
+ RL_S_STORM: 1
+ }
+ RL_B_TRAP: 5
+ RL_FLICKER: {
+ MaxLevel: 1
+ GS_FLING: 1
+ }
+ RL_S_STORM: {
+ MaxLevel: 5
+ GS_DISARM: 1
+ GS_DUST: 1
+ }
+ RL_E_CHAIN: {
+ MaxLevel: 10
+ GS_CHAINACTION: 10
+ }
+ RL_QD_SHOT: {
+ MaxLevel: 1
+ RL_E_CHAIN: 1
+ }
+ RL_C_MARKER: {
+ MaxLevel: 1
+ GS_INCREASING: 1
+ }
+ RL_FIREDANCE: {
+ MaxLevel: 5
+ RL_FALLEN_ANGEL: 1
+ }
+ RL_H_MINE: {
+ MaxLevel: 5
+ GS_SPREADATTACK: 1
+ }
+ RL_P_ALTER: 5
+ RL_FALLEN_ANGEL: {
+ MaxLevel: 5
+ GS_DESPERADO: 10
+ }
+ RL_R_TRIP: {
+ MaxLevel: 5
+ RL_FIRE_RAIN: 1
+ }
+ RL_D_TAIL: {
+ MaxLevel: 5
+ RL_H_MINE: 3
+ RL_C_MARKER: 1
+ }
+ RL_FIRE_RAIN: {
+ MaxLevel: 5
+ GS_GATLINGFEVER: 1
+ }
+ RL_HEAT_BARREL: {
+ MaxLevel: 5
+ RL_FIREDANCE: 2
+ }
+ RL_AM_BLAST: {
+ MaxLevel: 5
+ RL_MASS_SPIRAL: 1
+ }
+ RL_SLUGSHOT: {
+ MaxLevel: 5
+ RL_BANISHING_BUSTER: 3
+ }
+ RL_HAMMER_OF_GOD: {
+ MaxLevel: 5
+ RL_AM_BLAST: 3
+ }
+ }
+}
diff --git a/db/re/exp.txt b/db/re/exp.txt
index 8ed6b6c83..c3bf5ccc0 100644
--- a/db/re/exp.txt
+++ b/db/re/exp.txt
@@ -14,7 +14,7 @@
//Base - 3rd Jobs, Baby 3rds, Expanded Super Novice, and Kagerou/Oboro
//Note: (First 98 values [Level 1 - 98] are dummy values (used Adv Jobs values), because 3rd classes start at level 99.)
-150,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212,0,420,660,1080,1800,2640,3840,4560,5040,5460,6000,6600,7200,7320,7620,8040,8820,9600,10080,10560,11040,12610,13390,14300,15340,16900,18460,19500,20800,22100,23400,24700,26000,27300,28600,30160,31200,33800,35750,37700,39000,44100,46200,47600,50400,52500,53200,56000,58800,62300,65800,68600,71400,74200,77000,79800,82600,86100,88200,91000,93800,103500,105000,109500,115500,120000,126000,132000,136500,142500,165000,192000,210000,232500,244500,255000,270000,282000,292500,300000,345000,416000,480000,560000,640000,768000,880000,960000,1088000,1200000,1440000,1700000,2040000,2550000,3060000,3570000,4080000,4760000,5610000,6800000,7070000,7400000,7770000,8150000,8550000,9100000,9610000,10150000,10570000,11180000,12000000,12200000,12930000,13150000,14030000,14420000,15420000,15670000,16870000,17140000,18720000,19020000,20590000,20930000,22690000,23310000,25290000,26020000,27860000,28535000,30990000,31680000,33560000,34942000,36372000,38350000,39890000,41545000,43330000,45400000,48100000,50410000,53370000,56250000,59230000,62590000,66120000,70200000,75330000,81100000,95000000,95285001,95570856,95857570,96145142,96433581,96722886,97013058,97304097,97596010,97888798,98182468,98477013,98772449,99068767,99365976,99664076,99963074,100262963,100563750,100865445,101168046,101471554,101775968,102081298,102387542,102694708,103002790,103311802,103621737,103932603,104244399,104557135,104870809,105185422,105500982,105817489,106134942,106453351,106772714,107093032,107414313,107736557,108059771,108383949,108709106,109035233,109362339,109690425,110019497,110349556,110680602,111012644,111345680,111679719,112014761,112350806,112687862,113025929,113365008,113705105,114046221,114388365,114731535,115075733,115420965,115767233,116114536,116462882,116812271,117162711,117514202,117866745,118220346,118575007,118930735,119287530,119645393,120004330,120364343,120725439,121087618,121450881,121815235,122180680,122547224,122914868,123283611,123653461,124024426,124396499,124769688,125143999,125519434,125895992,126273682,126652503,127032464,127413564,127795811,128179198,128563740,128949437,129336291,129724299,130113471,130503815,130895330,131288016,131681882,132076928,132473161,132870582,133269198,133669010,134070017,134472228,134875643,135280277,135686115,136093173,136501450,136910963,137321695,137733663,138146867,138561307,138976998,139393925,139812104,140231535,140652233,141074199,141497417,141921919,142347688,142774726,143203047,143632652,144063556,144495745,144929234,145364022,145800111,146237515,146676235,147116271,147557623,148000291,148444291,148889623,149336287,149784299,150233660,150684368,151136424,151589828,152044596,152500728,152958241,153417117,153877374,154339011,154802028,155266441,155732250,156199456,156668057,157138071,157609481,158082319,158556570,159032249,159509356,159987891,160467855,160949262,161432115,161916411,162402168,162889385,163378063,163868201,164359816,164852890,165347458,165843501,166341037,166840066,167340587,167842617,168346155,168851202,169357757,169865836,170375441,170886569,171399239,171913433,172429183,172946475,173465323,173985727,174507688,175031206,175556297,176082976,176611228,177141069,177672498,178205517,178740140,179276368,179814200,180353654,180894712,181437407,181981724,182527677,183075266,183624493,184175373,184727905,185282091,185837946,186395469,186954662,187515523,188078070,188642302,189208234,189775868,190345203,190916239,191488992,192063462,192639650,193217570,193797224,194378611,194961747,195546633,196133284,196721683,197311849,197903795,198497507,199093000,199690275,200289347,200890216,201492882,202097362,202703656,203311763,203921699,204533465,205147076,205762517,206379803,206998951,207619945,208242816,208867548,209494159,210122646,210753012,211385271,212019424,212655486,213293458,213933340,214575148,215218881,215864541,216512142,217161684,217813169,218466612,219122012,219779386,220438734,221100056,221763368,222428654,223095946,223765244,224436548,225109858,225785190,226462544,227141936,227823366,228506834,229192357,229879933,230569580,231261297,231955084,232650958,233348917,234048963,234751111,235455362,236161731,236870218,237580839,238293579,239008469,239725494,240444669,241166011,241889519,242615193,243343050,244073090,244805312,245539733,246276352,247015186,247756234,248499513,249245023,249992764,250742751,251494985,252249482,253006241,253765264,254526565,255290145,256056019,256824189,257594669,258367461,259142563,259919993,260699765,261481864,262266307,263053108,263842268,264633804,265427714,266224000,267022677,267823745,268627220,269433119,270241425,271052169,271865322,272680913,273498976,274319478,275142452,275967897,276795813,277626201,278459092,279294487,280132385,280972787,281815724,282661165,283509141,284359685,285212765,286068412,286926627,287787409,288650792,289516742,290385292,291256441,292130223,293006604,293885617,294767295,295651604,296538577,297428213,298320514,299215479,300113140,301013497,301916550,302822299,303730777,304641982,305555916,306472578,307392000,308314182,309239124,310166859,311097355,312030642,312966754,313905658,314847387,315791940,316739318,317689552,318642611,319598558,320557362,321519054,322483603,323451073,324421432,325394711,326370910,327350031,328332072,329317067,330305014,331295946,332289830,333286700,334286555,335289426,336295315,337304221,338316143,339331083,340349072,341370110,342394229,343421429,344451711,345485074,346521550,347561107,348603810,349649626,350698588,351750695,352805947,353864377,354925984,355990769,357058763,358129935,359204317,360281940,361362805,362446912,363534260,364624882,365718778,366815948,367916391,369020140,370127196,371237589,372351320,373468389,374588796,375712574,376839721,377970239,379104158,380241480,381382204,382526362,383673955,384824981,385979475,387137434,388298860,389463752,390632143,391804032,392979452,394158402,395340883,396526926,397716501,398909669,400106401,401306727,402510648,403718196,404929371,406144172,407362601,408584688,409810466,411039903,412273032,413509851,414750394,415994659,417242648,418494392,419749891,421009146,422272188,423539017,424809633,426084069,427362325,428644431,429930358,431220168,432513829,433811374,435112803,436418147,437727407,439040583,440357706,441678778,443003829,444332860,445665871,447002862,448343865,449688913,451038004,452391139,453748318,455109574,456474906,457844346,459217894,460595551,461977348,463363285,464753395,466147677,467546132,468948792,470355656,471766724,473182030,474601571,476025382,477453462,478885842,480322523,481763505,483208820,484658468,486112449,487570795,489033506,490500614,491972120,493448054,494928418,496413211,497902466,499396181,500894391,502397093,503904289,505416011,506932258,508453063,509978425,511508377,513042919,514582051,516125804,517674180,519227209,520784892,522347261,523914316,525486057,527062517,528643726,530229654,531820364,533415824,535016066,536621123,538230994,539845680,541465244,543089623,544718880,546353015,547992094,549636051,551284951,552938794,554597644,556261436,557930235,559604042,561282855,562966740,564655631,566349594,568048628,569752797,571462038,573176414,574895925,576620635,578350481,580085527,581825772,583571281,585321990,587077962,588839198,590605697,592377525,594154681,595937164,597724975,599518179,601316775,603120763,604930142,606744915,608565143,610390828,612222033,614058694,615900876,617748579,619601866,621460674,623325067,625195044,627070670,628951881,630838740,632731249,634629471,636533341,638442925,640358286,642279360,644206211,646138840,648077246,650021493,651971582,653927512,655889284,657856961,659830544,661810033,663795492,665786920,667784318,669787686,671797089,673812525,675833995,677861500,679895102,681934803,683980602,686032564,688090688,690154974,692225423,694302098,696385000,698474193,700569613,702671323,704779324,706893680,709014391,711141458,713274879,715414719,717560979,719713657,721872820,724038465,726210594,728389271,730574431,732766138,734964457,737169388,739380931,741599086,743823916,746055423,748293605,750538528,752790127,755048530,757313673,759585620,761864372,764149993,766442482,768741839,771048065,773361224,775681315,778008404,780342425,782683443,785031522,787386663,789748864,792118127,794494515,796878028,799268666,801666494,804071512,806483719,808903180,811329894,813763926,816205212,818653816,821109802,823573170,826043920,828522053,831007631,833500656,836001191,838509237,841024793,843547859,846078501,848616781,851162636,853716129,856277326,858846161,861422700,864007006,866599015,869198855,871806462,874421901,877045172,879676337,882315399,884962356,887617273,890280150,892950987,895629847,898316732,901011705,903714766,906425915,909145216,911872670,914608277,917352099,920104203,922864523,925633124,928410070,931195297,933988933,936790914,939601304,942420103,945247376,948083121,950927405,953780226,956641584,959511544,962390106,965277270,968173099,971077659,973990885,976912905,979843655,982783199,985731538,988688735,991654790,994629769,997613670,1000606558,1003608368,1006619230,1009639078,1012668042,1015706057,1018753187,1021809497,1024874921,1027949590,1031033438,1034126529,1037228929,1040340636,1043461651,1046592038,1049731862,1052881057,1056039753,1059207885,1062385517,1065572714,1068769476,1071975802,1075191757,1078417405,1081652682,1084897716,1088152379,1091416799,1094691105,1097975168,1101269116,1104572950,1107886669,1111210403,1114544022,1117887655,1121241302,1124605091,1127978894,1131362840,1134756928,1138161158,1141575659,1145000430,1148435473,1151880786,1155336498,1158802481,1162278863,1165765773,1169263081,1172770917,1176289281,1179818172,1183357591,1186907665,1190468395,1194039782,1197621952,1201214907,1204818517,1208433040,1212058348
+150,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212:4215,0,420,660,1080,1800,2640,3840,4560,5040,5460,6000,6600,7200,7320,7620,8040,8820,9600,10080,10560,11040,12610,13390,14300,15340,16900,18460,19500,20800,22100,23400,24700,26000,27300,28600,30160,31200,33800,35750,37700,39000,44100,46200,47600,50400,52500,53200,56000,58800,62300,65800,68600,71400,74200,77000,79800,82600,86100,88200,91000,93800,103500,105000,109500,115500,120000,126000,132000,136500,142500,165000,192000,210000,232500,244500,255000,270000,282000,292500,300000,345000,416000,480000,560000,640000,768000,880000,960000,1088000,1200000,1440000,1700000,2040000,2550000,3060000,3570000,4080000,4760000,5610000,6800000,7070000,7400000,7770000,8150000,8550000,9100000,9610000,10150000,10570000,11180000,12000000,12200000,12930000,13150000,14030000,14420000,15420000,15670000,16870000,17140000,18720000,19020000,20590000,20930000,22690000,23310000,25290000,26020000,27860000,28535000,30990000,31680000,33560000,34942000,36372000,38350000,39890000,41545000,43330000,45400000,48100000,50410000,53370000,56250000,59230000,62590000,66120000,70200000,75330000,81100000,95000000,95285001,95570856,95857570,96145142,96433581,96722886,97013058,97304097,97596010,97888798,98182468,98477013,98772449,99068767,99365976,99664076,99963074,100262963,100563750,100865445,101168046,101471554,101775968,102081298,102387542,102694708,103002790,103311802,103621737,103932603,104244399,104557135,104870809,105185422,105500982,105817489,106134942,106453351,106772714,107093032,107414313,107736557,108059771,108383949,108709106,109035233,109362339,109690425,110019497,110349556,110680602,111012644,111345680,111679719,112014761,112350806,112687862,113025929,113365008,113705105,114046221,114388365,114731535,115075733,115420965,115767233,116114536,116462882,116812271,117162711,117514202,117866745,118220346,118575007,118930735,119287530,119645393,120004330,120364343,120725439,121087618,121450881,121815235,122180680,122547224,122914868,123283611,123653461,124024426,124396499,124769688,125143999,125519434,125895992,126273682,126652503,127032464,127413564,127795811,128179198,128563740,128949437,129336291,129724299,130113471,130503815,130895330,131288016,131681882,132076928,132473161,132870582,133269198,133669010,134070017,134472228,134875643,135280277,135686115,136093173,136501450,136910963,137321695,137733663,138146867,138561307,138976998,139393925,139812104,140231535,140652233,141074199,141497417,141921919,142347688,142774726,143203047,143632652,144063556,144495745,144929234,145364022,145800111,146237515,146676235,147116271,147557623,148000291,148444291,148889623,149336287,149784299,150233660,150684368,151136424,151589828,152044596,152500728,152958241,153417117,153877374,154339011,154802028,155266441,155732250,156199456,156668057,157138071,157609481,158082319,158556570,159032249,159509356,159987891,160467855,160949262,161432115,161916411,162402168,162889385,163378063,163868201,164359816,164852890,165347458,165843501,166341037,166840066,167340587,167842617,168346155,168851202,169357757,169865836,170375441,170886569,171399239,171913433,172429183,172946475,173465323,173985727,174507688,175031206,175556297,176082976,176611228,177141069,177672498,178205517,178740140,179276368,179814200,180353654,180894712,181437407,181981724,182527677,183075266,183624493,184175373,184727905,185282091,185837946,186395469,186954662,187515523,188078070,188642302,189208234,189775868,190345203,190916239,191488992,192063462,192639650,193217570,193797224,194378611,194961747,195546633,196133284,196721683,197311849,197903795,198497507,199093000,199690275,200289347,200890216,201492882,202097362,202703656,203311763,203921699,204533465,205147076,205762517,206379803,206998951,207619945,208242816,208867548,209494159,210122646,210753012,211385271,212019424,212655486,213293458,213933340,214575148,215218881,215864541,216512142,217161684,217813169,218466612,219122012,219779386,220438734,221100056,221763368,222428654,223095946,223765244,224436548,225109858,225785190,226462544,227141936,227823366,228506834,229192357,229879933,230569580,231261297,231955084,232650958,233348917,234048963,234751111,235455362,236161731,236870218,237580839,238293579,239008469,239725494,240444669,241166011,241889519,242615193,243343050,244073090,244805312,245539733,246276352,247015186,247756234,248499513,249245023,249992764,250742751,251494985,252249482,253006241,253765264,254526565,255290145,256056019,256824189,257594669,258367461,259142563,259919993,260699765,261481864,262266307,263053108,263842268,264633804,265427714,266224000,267022677,267823745,268627220,269433119,270241425,271052169,271865322,272680913,273498976,274319478,275142452,275967897,276795813,277626201,278459092,279294487,280132385,280972787,281815724,282661165,283509141,284359685,285212765,286068412,286926627,287787409,288650792,289516742,290385292,291256441,292130223,293006604,293885617,294767295,295651604,296538577,297428213,298320514,299215479,300113140,301013497,301916550,302822299,303730777,304641982,305555916,306472578,307392000,308314182,309239124,310166859,311097355,312030642,312966754,313905658,314847387,315791940,316739318,317689552,318642611,319598558,320557362,321519054,322483603,323451073,324421432,325394711,326370910,327350031,328332072,329317067,330305014,331295946,332289830,333286700,334286555,335289426,336295315,337304221,338316143,339331083,340349072,341370110,342394229,343421429,344451711,345485074,346521550,347561107,348603810,349649626,350698588,351750695,352805947,353864377,354925984,355990769,357058763,358129935,359204317,360281940,361362805,362446912,363534260,364624882,365718778,366815948,367916391,369020140,370127196,371237589,372351320,373468389,374588796,375712574,376839721,377970239,379104158,380241480,381382204,382526362,383673955,384824981,385979475,387137434,388298860,389463752,390632143,391804032,392979452,394158402,395340883,396526926,397716501,398909669,400106401,401306727,402510648,403718196,404929371,406144172,407362601,408584688,409810466,411039903,412273032,413509851,414750394,415994659,417242648,418494392,419749891,421009146,422272188,423539017,424809633,426084069,427362325,428644431,429930358,431220168,432513829,433811374,435112803,436418147,437727407,439040583,440357706,441678778,443003829,444332860,445665871,447002862,448343865,449688913,451038004,452391139,453748318,455109574,456474906,457844346,459217894,460595551,461977348,463363285,464753395,466147677,467546132,468948792,470355656,471766724,473182030,474601571,476025382,477453462,478885842,480322523,481763505,483208820,484658468,486112449,487570795,489033506,490500614,491972120,493448054,494928418,496413211,497902466,499396181,500894391,502397093,503904289,505416011,506932258,508453063,509978425,511508377,513042919,514582051,516125804,517674180,519227209,520784892,522347261,523914316,525486057,527062517,528643726,530229654,531820364,533415824,535016066,536621123,538230994,539845680,541465244,543089623,544718880,546353015,547992094,549636051,551284951,552938794,554597644,556261436,557930235,559604042,561282855,562966740,564655631,566349594,568048628,569752797,571462038,573176414,574895925,576620635,578350481,580085527,581825772,583571281,585321990,587077962,588839198,590605697,592377525,594154681,595937164,597724975,599518179,601316775,603120763,604930142,606744915,608565143,610390828,612222033,614058694,615900876,617748579,619601866,621460674,623325067,625195044,627070670,628951881,630838740,632731249,634629471,636533341,638442925,640358286,642279360,644206211,646138840,648077246,650021493,651971582,653927512,655889284,657856961,659830544,661810033,663795492,665786920,667784318,669787686,671797089,673812525,675833995,677861500,679895102,681934803,683980602,686032564,688090688,690154974,692225423,694302098,696385000,698474193,700569613,702671323,704779324,706893680,709014391,711141458,713274879,715414719,717560979,719713657,721872820,724038465,726210594,728389271,730574431,732766138,734964457,737169388,739380931,741599086,743823916,746055423,748293605,750538528,752790127,755048530,757313673,759585620,761864372,764149993,766442482,768741839,771048065,773361224,775681315,778008404,780342425,782683443,785031522,787386663,789748864,792118127,794494515,796878028,799268666,801666494,804071512,806483719,808903180,811329894,813763926,816205212,818653816,821109802,823573170,826043920,828522053,831007631,833500656,836001191,838509237,841024793,843547859,846078501,848616781,851162636,853716129,856277326,858846161,861422700,864007006,866599015,869198855,871806462,874421901,877045172,879676337,882315399,884962356,887617273,890280150,892950987,895629847,898316732,901011705,903714766,906425915,909145216,911872670,914608277,917352099,920104203,922864523,925633124,928410070,931195297,933988933,936790914,939601304,942420103,945247376,948083121,950927405,953780226,956641584,959511544,962390106,965277270,968173099,971077659,973990885,976912905,979843655,982783199,985731538,988688735,991654790,994629769,997613670,1000606558,1003608368,1006619230,1009639078,1012668042,1015706057,1018753187,1021809497,1024874921,1027949590,1031033438,1034126529,1037228929,1040340636,1043461651,1046592038,1049731862,1052881057,1056039753,1059207885,1062385517,1065572714,1068769476,1071975802,1075191757,1078417405,1081652682,1084897716,1088152379,1091416799,1094691105,1097975168,1101269116,1104572950,1107886669,1111210403,1114544022,1117887655,1121241302,1124605091,1127978894,1131362840,1134756928,1138161158,1141575659,1145000430,1148435473,1151880786,1155336498,1158802481,1162278863,1165765773,1169263081,1172770917,1176289281,1179818172,1183357591,1186907665,1190468395,1194039782,1197621952,1201214907,1204818517,1208433040,1212058348
//Job - Novice & Baby Novice
10,0:4023,1,4,10,18,28,40,91,151,205,268,340
@@ -35,7 +35,7 @@
70,4008:4009:4010:4011:4012:4013:4014:4015:4016:4017:4018:4019:4020:4021:4022,1,2400,3800,6200,10400,15200,22900,27100,30000,32500,35700,41300,45000,45800,47600,50300,58700,63900,67100,70300,73500,90600,96200,102700,110200,121400,144700,152900,163100,173300,183500,213500,224700,236000,247200,260700,299800,324800,343600,362300,374800,474400,497000,512100,542200,564800,644300,678200,712100,754500,796900,949300,988100,1026800,1065600,1104300,1334800,1391400,1425300,1470600,1515800,2003800,2032800,2119900,2236100,2323200,3025300,3433300,3776600,4436900,6758400,6893567,7031438,7172066,7315507,7461817,7611053,7763273,7918538,8076908,8238446,8403214,8571278,8742703,8917556,9095906,9277823,9463379,9652646,9845698,10042611,10243463,10448332,10657298,10870443,11087851,11309607,11535798,11766513,12001843,12241879,12486716,12736450,12991178,13251001,13516020,13786340,14062066,14343307,14630172,14922775,15221230,15525654,15836166,16152889,16475946,16805464,17141572,17484403,17834091,18190773,18554587,18925679,19304193,19690275,20084081,20485761,20895474,21313383,21739651,22174444,22617932,23070290,23531695,24002329,24482374,24972021,25471459,25980888,26500505,27030513,27571121,28122541,28684990,29258689,29843861,30440736,31049550,31670540,32303950,32950028,33609027,34281207,34966831,35666167,36379490,37107077,37849216,38606199,39378323,40165889,40969204,41788587,42624358,43476846,44346384,45233310,46137977,47060734,48001949,48961986,49941222,50940047,51958847,52998023,54057983,55139142,56241925,57366761,58514094,59684376,60878062,62095624,63337535,64604285,65896368,67214294,68558580,69929746,71328337,72754901,74210000,75694198,77208082,78752240,80327283,81933824,83572498,85243944,86948821,88687798,90461554,92270781,94116197,95998522,97918488,99876855,101874391,103911877,105990115,108109912,110272108,112477552,114727100,117021643,119362070,121749311,124184295,126667979,129201333,131785360,134421064,137109474,139851658,142648694,145501659,148411694,151379927,154407515,157495667,160645574,163858476,167135646,170478357,173887915,177365675,180912990,184531248,188221869,191986305,195826026,199742548,203737391,207812135,211968366,216207731,220531878,224942505,229441357,234030182,238710775,243484978,248354670,253321760,258388190,263555950
//Job - 3rd Jobs, Baby 3rds, Expanded Super Novice, and Kagerou/Oboro
-50,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212,1,106000,112000,355000,615000,917000,1253000,1595000,2007000,2430000,2868000,3420000,3863000,4504000,4998000,5769000,6321000,7254000,7870000,9015000,9530000,11072000,11848000,13467000,14337000,16243000,17216000,19446000,20781000,23070000,24453000,27568000,29118000,31820000,34125000,37048000,40204000,42972000,45937000,49110000,52696000,57158000,61305000,67167000,72285000,77647000,83624000,91113000,98548000,107630000,119077000,120267768,121470444,122685151,123912002,125151118,126402630,127666657,128943321,130232751,131535078,132850429,134178935,135520724,136875925,138244677,139627117,141023389,142433624,143857966,145296546,146749508,148216997,149699160,151196158,152708120,154235207,155777550,157335326,158908679,160497757,162102736,163723761,165360996,167014600,168684736,170371581,172075298,173796047,175534006,177289338,179062235,180852860,182661390,184488004,186332878,188196207,190078168,191978955,193898747,195837737,197796119,199774071,201771802,203789524,205827413,207885680,209964534,212064171,214184815,216326662,218489920,220674817,222881562,225110381,227361485,229635100,231931452,234250768,236593273,238959210,241348805,243762285,246199908,248661900,251148520,253659994,256196597,258758555,261346143,263959602,266599193,269265189,271957833,274677399,277424179,280198431,283000413,285830417,288688733,291575620,294491369,297436270,300410615,303414727,306448864,309513349,312608474,315734561,318891902,322080819,325301637,328554645,331840199,335158590,338510174,341895274,345314213,348767346,352255030,355777587,359335372,362928710,366557987,370223560,373925783,377665046,381441702,385256109,389108653,392999722,396929705,400898989,404907961,408957043,413046622,417177086,421348854,425562348,429817955,434116127,438457285,442841848,447270270,451742970,456260401,460823015,465431233,470085539,474786386,479534259,484329610,489172891,494064620,499005249,503995295,509035244,514125579,519266818,524459479,529704077,535001099,540351093,545754609,551212165,556724276,562291525,567914429,573593570,579329530,585122825,590974038,596883750,602852608,608881128,614969957,621119677,627330870,633604182,639940195,646339620,652803038,659331031,665924311,672583524,679309381,686102463,692963482,699893083,706891979,713960880,721100498,728311477,735594595,742950563,750380090,757883889,765462735,773117339,780848477,788656925,796543457,804508915,812554009,820679516,828886275,837175126,845546847,854002276,862542318,871167751,879879413,888678209,897564981,906540633,915606005
+50,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212:4215,1,106000,112000,355000,615000,917000,1253000,1595000,2007000,2430000,2868000,3420000,3863000,4504000,4998000,5769000,6321000,7254000,7870000,9015000,9530000,11072000,11848000,13467000,14337000,16243000,17216000,19446000,20781000,23070000,24453000,27568000,29118000,31820000,34125000,37048000,40204000,42972000,45937000,49110000,52696000,57158000,61305000,67167000,72285000,77647000,83624000,91113000,98548000,107630000,119077000,120267768,121470444,122685151,123912002,125151118,126402630,127666657,128943321,130232751,131535078,132850429,134178935,135520724,136875925,138244677,139627117,141023389,142433624,143857966,145296546,146749508,148216997,149699160,151196158,152708120,154235207,155777550,157335326,158908679,160497757,162102736,163723761,165360996,167014600,168684736,170371581,172075298,173796047,175534006,177289338,179062235,180852860,182661390,184488004,186332878,188196207,190078168,191978955,193898747,195837737,197796119,199774071,201771802,203789524,205827413,207885680,209964534,212064171,214184815,216326662,218489920,220674817,222881562,225110381,227361485,229635100,231931452,234250768,236593273,238959210,241348805,243762285,246199908,248661900,251148520,253659994,256196597,258758555,261346143,263959602,266599193,269265189,271957833,274677399,277424179,280198431,283000413,285830417,288688733,291575620,294491369,297436270,300410615,303414727,306448864,309513349,312608474,315734561,318891902,322080819,325301637,328554645,331840199,335158590,338510174,341895274,345314213,348767346,352255030,355777587,359335372,362928710,366557987,370223560,373925783,377665046,381441702,385256109,389108653,392999722,396929705,400898989,404907961,408957043,413046622,417177086,421348854,425562348,429817955,434116127,438457285,442841848,447270270,451742970,456260401,460823015,465431233,470085539,474786386,479534259,484329610,489172891,494064620,499005249,503995295,509035244,514125579,519266818,524459479,529704077,535001099,540351093,545754609,551212165,556724276,562291525,567914429,573593570,579329530,585122825,590974038,596883750,602852608,608881128,614969957,621119677,627330870,633604182,639940195,646339620,652803038,659331031,665924311,672583524,679309381,686102463,692963482,699893083,706891979,713960880,721100498,728311477,735594595,742950563,750380090,757883889,765462735,773117339,780848477,788656925,796543457,804508915,812554009,820679516,828886275,837175126,845546847,854002276,862542318,871167751,879879413,888678209,897564981,906540633,915606005
//Job - Ninja/Gunslinger
70,24:25,1,100,200,300,400,600,700,1000,1200,1400,1700,1900,2400,2700,3200,3600,4200,4900,5500,6100,6900,7700,8400,9300,10100,11100,12100,13000,14600,16100,17500,18600,21500,23300,24700,27000,29000,30000,32400,35000,38100,41100,44000,46700,49600,52500,55600,58900,62700,65500,69200,72300,81200,84100,89300,95500,100900,107800,114900,120700,128600,150500,176900,196100,219600,234200,247900,266400,281300,296600,308000,311079,314189,317330,320503,323708,326945,330214,333516,336851,340219,343621,347057,350527,354032,357572,361147,364758,368405,372089,375809,379567,383362,387195,391066,394976,398925,402914,406943,411012,415122,419273,423465,427699,431975,436294,440656,445062,449512,454007,458547,463132,467763,472440,477164,481935,486754,491621,496537,501502,506517,511582,516697,521863,527081,532351,537674,543050,548480,553964,559503,565098,570748,576455,582219,588041,593921,599860,605858,611916,618035,624215,630457,636761,643128,649559,656054,662614,669240,675932,682691,689517,696412,703376,710409,717513,724688,731934,739253,746645,754111,761652,769268,776960,784729,792576,800501,808506,816591,824756,833003,841333,849746,858243,866825,875493,884247,893089,902019,911039,920149,929350,938643,948029,957509,967084,976754,996289,1016214,1036538,1057268,1078413,1099981,1121980,1144419,1167307,1190653,1214466,1238755,1263530,1288800,1314575,1340866,1367683,1395036,1422936,1451394,1480421,1510029,1540229,1571033,1602453,1634502,1667192,1700535,1734545,1769235,1804619,1840711,1877525,1915075,1953376,1992443,2032291,2072936,2114394,2156681,2199814,2243810,2288686,2334459,2381148,2428770,2477345,2526891,2577428,2628976,2681555,2735186,2789889,2845686,2902599,2960650,3019862,3080259,3141864,3204701,3268794,3334169,3400852,3468868,3538245,3609009,3681189,3754812,3829908
diff --git a/db/re/job_db1.txt b/db/re/job_db1.txt
index 085e29625..ff175592a 100644
--- a/db/re/job_db1.txt
+++ b/db/re/job_db1.txt
@@ -269,3 +269,5 @@
4211, 26000,80 , 0 ,515 ,400 ,500 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 750 ,2000 ,500
// Oboro
4212, 26000,80 , 0 ,515 ,400 ,500 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 , 750 ,2000 ,500
+// Rebellion
+4215, 28000,88 , 0 ,450 ,540 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490 ,590 ,440 ,940 ,1040 ,2000 ,2000 ,600
diff --git a/db/re/skill_db.txt b/db/re/skill_db.txt
index 4b01cb34e..723545f0a 100644
--- a/db/re/skill_db.txt
+++ b/db/re/skill_db.txt
@@ -1009,7 +1009,7 @@
2489,11,6,1,0,0,0,10,1:2:3:4:5:6:7:8:9:10,no,0,0,0,weapon,0, GN_FIRE_EXPANSION_ACID,Fire Expansion Acid
2490,9,6,2,0,0x3,1,5,1,yes,0,0x80,2:3:4:5:6,none,0, GN_HELLS_PLANT,Hell's Plant
2491,0,6,1,0,0xC0,0,5,1,no,0,0,0,misc,0, GN_HELLS_PLANT_ATK,Hell's Plant Attack
-2492,0,6,4,0,0x3,6:7:8:9:10,5,1,yes,0,0,0,none,0, GN_MANDRAGORA,Howling of Mandragora
+2492,0,6,4,0,0x3,5:6:6:7:7,5,1,yes,0,0,0,none,0, GN_MANDRAGORA,Howling of Mandragora
2493,11,6,16,0,0x1,0,1,1,yes,0,0,0,none,0, GN_SLINGITEM,Sling Item
2494,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0, GN_CHANGEMATERIAL,Change Material
2495,0,6,4,0,0x1,0,2,1,no,0,0,0,none,0, GN_MIX_COOKING,Mix Cooking
@@ -1040,6 +1040,32 @@
//2547,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GM_ITEM_MATKMAX#Maximum Magic Attack#
//2548,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GM_ITEM_MATKMIN#Minimal Magic Attack#
+// Rebellion
+2551,0,0,0,0,0,0,10,0,no,0,0,0,none,0, RL_GLITTERING_GREED,Flip The Coin Greed//Not in the skill tree. Why and what does it do? Need real max level.
+2552,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_RICHS_COIN,Rich's Coin
+2553,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_MASS_SPIRAL,Mass Spiral
+2554,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_BANISHING_BUSTER,Banishing Buster
+2555,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_B_TRAP,Bind Trap
+2556,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_FLICKER,Flicker
+2557,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_S_STORM,Shatter Storm
+2558,0,0,0,0,0,0,10,0,no,0,0,0,none,0, RL_E_CHAIN,Eternal Chain
+2559,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_QD_SHOT,Quick Draw Shot
+2560,0,0,0,0,0,0,1,0,no,0,0,0,none,0, RL_C_MARKER,Crimson Marker
+2561,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_FIREDANCE,Fire Dance
+2562,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_H_MINE,Howling Mine
+2563,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_P_ALTER,Platinum Alter
+2564,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_FALLEN_ANGEL,Fallen Angel
+2565,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_R_TRIP,Round Trip
+2566,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_D_TAIL,Dragon Tail
+2567,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_FIRE_RAIN,Fire Rain
+2568,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_HEAT_BARREL,Heat Barrel
+2569,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_AM_BLAST,Anti-Material Blast
+2570,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_SLUGSHOT,Slug Shot
+2571,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_HAMMER_OF_GOD,Hammer of God
+2572,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_R_TRIP_PLUSATK,Round Trip Plus Attack
+2573,0,0,0,0,0,0,5,0,no,0,0,0,none,0, RL_B_FLICKER_ATK,Bind Flicker Attack//Max level guess based on Bind Trap max level.
+2574,0,0,0,0,0,0,10,0,no,0,0,0,none,0, RL_GLITTERING_GREED_ATK,Flip The Coin Greed Attack//Guess on max level is from Flip The Coin Greed
+
// Kagerou & Oboro
3001,0,6,4,0,0,0,1,1,no,0,0,0,none,0, KO_YAMIKUMO,Yamikumo
3002,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0, KO_RIGHT,Right Hand Mastery
diff --git a/db/re/skill_require_db.txt b/db/re/skill_require_db.txt
index 2f2c1e8b6..c85f45b37 100644
--- a/db/re/skill_require_db.txt
+++ b/db/re/skill_require_db.txt
@@ -455,7 +455,7 @@
1004,0,0,15,0,0,0,99,2,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AS_VENOMKNIFE#xiiCt#
1005,0,0,25,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RG_CLOSECONFINE#N??[YRt@C#
1006,0,0,40,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WZ_SIGHTBLASTER#TCguX^?[#
-1007,0,0,30,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_CREATECON#G?^Ro?[^???
+1007,0,0,30,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_CREATECON#G?^Ro?[^???
1008,0,0,30,0,0,0,99,0,0,none,0,12115,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SA_ELEMENTWATER#G?^`FW#
1009,0,0,10,0,0,0,11,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_PHANTASMIC#t@^X~bNA??[#
1010,0,0,20,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_PANGVOICE#p{CX#
@@ -805,6 +805,32 @@
//2543,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ALL_RAY_OF_PROTECTION#Ray of Protection#
//2544,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MC_CARTDECORATE#Cart Decorate#
+// Rebellion
+2551,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_GLITTERING_GREED#Flip The Coin Greed#
+2552,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_RICHS_COIN#Rich's Coin#
+2553,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_MASS_SPIRAL#Mass Spiral#
+2554,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_BANISHING_BUSTER#Banishing Buster#
+2555,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_B_TRAP#Bind Trap#
+2556,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FLICKER#Flicker#
+2557,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_S_STORM#Shatter Storm#
+2558,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_E_CHAIN#Eternal Chain#
+2559,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_QD_SHOT#Quick Draw Shot#
+2560,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_C_MARKER#Crimson Marker#
+2561,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FIREDANCE#Fire Dance#
+2562,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_H_MINE#Howling Mine#
+2563,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_P_ALTER#Platinum Alter#
+2564,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FALLEN_ANGEL#Fallen Angel#
+2565,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_R_TRIP#Round Trip#
+2566,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_D_TAIL#Dragon Tail#
+2567,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_FIRE_RAIN#Fire Rain#
+2568,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_HEAT_BARREL#Heat Barrel#
+2569,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_AM_BLAST#Anti-Material Blast#
+2570,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_SLUGSHOT#Slug Shot#
+2571,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_HAMMER_OF_GOD#Hammer of God#
+2572,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_R_TRIP_PLUSATK#Round Trip Plus Attack#
+2573,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_B_FLICKER_ATK#Bind Flicker Attack#
+2574,0,0,1,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //RL_GLITTERING_GREED_ATK#Flip The Coin Greed Attack#
+
//****
// Kagerou/Oboro
3001,0,0,10,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KO_YAMIKUMO#Yamikumo#
diff --git a/db/re/skill_tree.conf b/db/re/skill_tree.conf
index c745c514f..02e4dd0fc 100644
--- a/db/re/skill_tree.conf
+++ b/db/re/skill_tree.conf
@@ -11,7 +11,7 @@
// http://hercules.ws/board/topic/1188-skill-tree-db-redesign/
//================ Structure Example =================
/*
-Job_Name: { //Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there)
+Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there)
inherit: ( "Other_Job_Name" ); // Base job from which this job will inherit its skill tree. NV_TRICKDEAD inheritance is skipped for non-novices from the source
skills: { // SKILL_NAMEs come from the Name (16th column) value in db/re/skill_db.txt
@@ -3849,3 +3849,85 @@ Oboro: {
}
}
}
+Rebellion: {
+ inherit: ( "Gunslinger" );
+
+ skills: {
+ RL_RICHS_COIN: {
+ MaxLevel: 1
+ GS_GLITTERING: 5
+ }
+ RL_MASS_SPIRAL: {
+ MaxLevel: 5
+ GS_PIERCINGSHOT: 1
+ }
+ RL_BANISHING_BUSTER: {
+ MaxLevel: 5
+ RL_S_STORM: 1
+ }
+ RL_B_TRAP: 5
+ RL_FLICKER: {
+ MaxLevel: 1
+ GS_FLING: 1
+ }
+ RL_S_STORM: {
+ MaxLevel: 5
+ GS_DISARM: 1
+ GS_DUST: 1
+ }
+ RL_E_CHAIN: {
+ MaxLevel: 10
+ GS_CHAINACTION: 10
+ }
+ RL_QD_SHOT: {
+ MaxLevel: 1
+ RL_E_CHAIN: 1
+ }
+ RL_C_MARKER: {
+ MaxLevel: 1
+ GS_INCREASING: 1
+ }
+ RL_FIREDANCE: {
+ MaxLevel: 5
+ RL_FALLEN_ANGEL: 1
+ }
+ RL_H_MINE: {
+ MaxLevel: 5
+ GS_SPREADATTACK: 1
+ }
+ RL_P_ALTER: 5
+ RL_FALLEN_ANGEL: {
+ MaxLevel: 5
+ GS_DESPERADO: 10
+ }
+ RL_R_TRIP: {
+ MaxLevel: 5
+ RL_FIRE_RAIN: 1
+ }
+ RL_D_TAIL: {
+ MaxLevel: 5
+ RL_H_MINE: 3
+ RL_C_MARKER: 1
+ }
+ RL_FIRE_RAIN: {
+ MaxLevel: 5
+ GS_GATLINGFEVER: 1
+ }
+ RL_HEAT_BARREL: {
+ MaxLevel: 5
+ RL_FIREDANCE: 2
+ }
+ RL_AM_BLAST: {
+ MaxLevel: 5
+ RL_MASS_SPIRAL: 1
+ }
+ RL_SLUGSHOT: {
+ MaxLevel: 5
+ RL_BANISHING_BUSTER: 3
+ }
+ RL_HAMMER_OF_GOD: {
+ MaxLevel: 5
+ RL_AM_BLAST: 3
+ }
+ }
+}
diff --git a/doc/item_db.txt b/doc/item_db.txt
index 77f6e1a37..1cf92977c 100644
--- a/doc/item_db.txt
+++ b/doc/item_db.txt
@@ -76,6 +76,7 @@ Job: Equippable jobs. Uses the following bitmask table:
Death Knight (2^27): 0x08000000
Dark Collector (2^28): 0x10000000
Kagerou/Oboro (2^29): 0x20000000
+ Rebellion (2^30): 0x40000000
Upper: Equippable upper-types. Uses the following bitmasks:
1: Normal jobs
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 29a1478fa..4dcbd75d1 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -4784,18 +4784,15 @@ so.
---------------------------------------
-*downrefitem <equipment slot>;
+*downrefitem <equipment slot>{,<downgrade_count>};
-This command will downgrade an item by - 1 in the specified equipment slot
-of the invoking character. So the item will not be destroyed unlike in the
+This command will downgrade an item by - 1 (unless optional <downgrade_count> is provided)
+in the specified equipment slot of the invoking character.
+So the item will not be destroyed unlike in the
failedrefitem script command. This will also display a 'refine failure'
effect on the character and put appropriate messages into their chat
window.
-The official scripts seems to use the 'downrefitem' command as a function
-instead: 'downrefitem(<number>)' but it returns nothing on the stack.
-This is since jAthena, so probably nobody knows for sure why is it so.
-
---------------------------------------
*unequip <equipment slot>;
diff --git a/src/char/Makefile.in b/src/char/Makefile.in
index 02759b32e..4bb7f3fb8 100644
--- a/src/char/Makefile.in
+++ b/src/char/Makefile.in
@@ -34,21 +34,27 @@ CC = @CC@
export CC
#####################################################################
-.PHONY: all sql char-server clean help
+.PHONY: all sql char-server clean buildclean help
all: sql
sql: char-server
-clean:
+buildclean:
+ @echo " CLEAN char (build temp files)"
+ @rm -rf *.o obj_sql
+
+clean: buildclean
@echo " CLEAN char"
- @rm -rf *.o obj_sql ../../char-server@EXEEXT@
+ @rm -rf ../../char-server@EXEEXT@
help:
@echo "possible targets are 'char-server' 'all' 'clean' 'help'"
@echo "'char-server' - char server"
@echo "'all' - builds all above targets"
@echo "'clean' - cleans builds and objects"
+ @echo "'buildclean' - cleans build temporary (object) files, without deleting the"
+ @echo " executables"
@echo "'help' - outputs this message"
#####################################################################
diff --git a/src/char/inter.c b/src/char/inter.c
index 353d3e009..2dc15933b 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -414,16 +414,19 @@ const char* geoip_getcountry(uint32 ipnum){
}
return geoip_countryname[0];
}
-/* sends a mesasge to map server (fd) to a user (u_fd) although we use fd we keep aid for safe-check */
-/* extremely handy I believe it will serve other uses in the near future */
-void inter_to_fd(int fd, int u_fd, int aid, char* msg, ...) {
+
+/**
+ * Argument-list version of inter_msg_to_fd
+ * @see inter_msg_to_fd
+ */
+void inter_vmsg_to_fd(int fd, int u_fd, int aid, char* msg, va_list ap) {
char msg_out[512];
- va_list ap;
+ va_list apcopy;
int len = 1;/* yes we start at 1 */
- va_start(ap,msg);
- len += vsnprintf(msg_out, 512, msg, ap);
- va_end(ap);
+ va_copy(apcopy, ap);
+ len += vsnprintf(msg_out, 512, msg, apcopy);
+ va_end(apcopy);
WFIFOHEAD(fd,12 + len);
@@ -437,6 +440,23 @@ void inter_to_fd(int fd, int u_fd, int aid, char* msg, ...) {
return;
}
+
+/**
+ * Sends a message to map server (fd) to a user (u_fd) although we use fd we
+ * keep aid for safe-check.
+ * @param fd Mapserver's fd
+ * @param u_fd Recipient's fd
+ * @param aid Recipient's expected for sanity checks on the mapserver
+ * @param msg Message format string
+ * @param ... Additional parameters for (v)sprinf
+ */
+void inter_msg_to_fd(int fd, int u_fd, int aid, char* msg, ...) {
+ va_list ap;
+ va_start(ap,msg);
+ inter_vmsg_to_fd(fd, u_fd, aid, msg, ap);
+ va_end(ap);
+}
+
/* [Dekamaster/Nightroad] */
void mapif_parse_accinfo(int fd) {
int u_fd = RFIFOL(fd,2), aid = RFIFOL(fd,6), castergroup = RFIFOL(fd,10);
@@ -454,10 +474,10 @@ void mapif_parse_accinfo(int fd) {
if ( SQL_ERROR == SQL->Query(sql_handle, "SELECT `account_id`,`name`,`class`,`base_level`,`job_level`,`online` FROM `%s` WHERE `name` LIKE '%s' LIMIT 10", char_db, query_esq)
|| SQL->NumRows(sql_handle) == 0 ) {
if( SQL->NumRows(sql_handle) == 0 ) {
- inter_to_fd(fd, u_fd, aid, "No matches were found for your criteria, '%s'",query);
+ inter_msg_to_fd(fd, u_fd, aid, "No matches were found for your criteria, '%s'",query);
} else {
Sql_ShowDebug(sql_handle);
- inter_to_fd(fd, u_fd, aid, "An error occured, bother your admin about it.");
+ inter_msg_to_fd(fd, u_fd, aid, "An error occured, bother your admin about it.");
}
SQL->FreeResult(sql_handle);
return;
@@ -467,7 +487,7 @@ void mapif_parse_accinfo(int fd) {
SQL->GetData(sql_handle, 0, &data, NULL); account_id = atoi(data);
SQL->FreeResult(sql_handle);
} else {// more than one, listing... [Dekamaster/Nightroad]
- inter_to_fd(fd, u_fd, aid, "Your query returned the following %d results, please be more specific...",(int)SQL->NumRows(sql_handle));
+ inter_msg_to_fd(fd, u_fd, aid, "Your query returned the following %d results, please be more specific...",(int)SQL->NumRows(sql_handle));
while ( SQL_SUCCESS == SQL->NextRow(sql_handle) ) {
int class_;
short base_level, job_level, online;
@@ -480,7 +500,7 @@ void mapif_parse_accinfo(int fd) {
SQL->GetData(sql_handle, 4, &data, NULL); job_level = atoi(data);
SQL->GetData(sql_handle, 5, &data, NULL); online = atoi(data);
- inter_to_fd(fd, u_fd, aid, "[AID: %d] %s | %s | Level: %d/%d | %s", account_id, name, job_name(class_), base_level, job_level, online?"Online":"Offline");
+ inter_msg_to_fd(fd, u_fd, aid, "[AID: %d] %s | %s | Level: %d/%d | %s", account_id, name, job_name(class_), base_level, job_level, online?"Online":"Offline");
}
SQL->FreeResult(sql_handle);
return;
@@ -497,9 +517,9 @@ void mapif_parse_accinfo(int fd) {
if ( SQL_ERROR == SQL->Query(sql_handle, "SELECT `userid`, `user_pass`, `email`, `last_ip`, `group_id`, `lastlogin`, `logincount`, `state`,`pincode`,`birthdate` FROM `login` WHERE `account_id` = '%d' LIMIT 1", account_id)
|| SQL->NumRows(sql_handle) == 0 ) {
if( SQL->NumRows(sql_handle) == 0 ) {
- inter_to_fd(fd, u_fd, aid, "No account with ID '%d' was found.", account_id );
+ inter_msg_to_fd(fd, u_fd, aid, "No account with ID '%d' was found.", account_id );
} else {
- inter_to_fd(fd, u_fd, aid, "An error occured, bother your admin about it.");
+ inter_msg_to_fd(fd, u_fd, aid, "An error occured, bother your admin about it.");
Sql_ShowDebug(sql_handle);
}
} else {
@@ -521,29 +541,29 @@ void mapif_parse_accinfo(int fd) {
if (level == -1)
return;
- inter_to_fd(fd, u_fd, aid, "-- Account %d --", account_id );
- inter_to_fd(fd, u_fd, aid, "User: %s | GM Group: %d | State: %d", userid, level, state );
+ inter_msg_to_fd(fd, u_fd, aid, "-- Account %d --", account_id );
+ inter_msg_to_fd(fd, u_fd, aid, "User: %s | GM Group: %d | State: %d", userid, level, state );
if (level < castergroup) { /* only show pass if your gm level is greater than the one you're searching for */
if( strlen(pin_code) )
- inter_to_fd(fd, u_fd, aid, "Password: %s (PIN:%s)", user_pass, pin_code );
+ inter_msg_to_fd(fd, u_fd, aid, "Password: %s (PIN:%s)", user_pass, pin_code );
else
- inter_to_fd(fd, u_fd, aid, "Password: %s", user_pass );
+ inter_msg_to_fd(fd, u_fd, aid, "Password: %s", user_pass );
}
- inter_to_fd(fd, u_fd, aid, "Account e-mail: %s | Birthdate: %s", email, birthdate);
- inter_to_fd(fd, u_fd, aid, "Last IP: %s (%s)", last_ip, geoip_getcountry(str2ip(last_ip)) );
- inter_to_fd(fd, u_fd, aid, "This user has logged %d times, the last time were at %s", logincount, lastlogin );
- inter_to_fd(fd, u_fd, aid, "-- Character Details --" );
+ inter_msg_to_fd(fd, u_fd, aid, "Account e-mail: %s | Birthdate: %s", email, birthdate);
+ inter_msg_to_fd(fd, u_fd, aid, "Last IP: %s (%s)", last_ip, geoip_getcountry(str2ip(last_ip)) );
+ inter_msg_to_fd(fd, u_fd, aid, "This user has logged %d times, the last time were at %s", logincount, lastlogin );
+ inter_msg_to_fd(fd, u_fd, aid, "-- Character Details --" );
if ( SQL_ERROR == SQL->Query(sql_handle, "SELECT `char_id`, `name`, `char_num`, `class`, `base_level`, `job_level`, `online` FROM `%s` WHERE `account_id` = '%d' ORDER BY `char_num` LIMIT %d", char_db, account_id, MAX_CHARS)
|| SQL->NumRows(sql_handle) == 0 ) {
if( SQL->NumRows(sql_handle) == 0 )
- inter_to_fd(fd, u_fd, aid,"This account doesn't have characters.");
+ inter_msg_to_fd(fd, u_fd, aid,"This account doesn't have characters.");
else {
- inter_to_fd(fd, u_fd, aid,"An error occured, bother your admin about it.");
+ inter_msg_to_fd(fd, u_fd, aid,"An error occured, bother your admin about it.");
Sql_ShowDebug(sql_handle);
}
@@ -561,7 +581,7 @@ void mapif_parse_accinfo(int fd) {
SQL->GetData(sql_handle, 5, &data, NULL); job_level = atoi(data);
SQL->GetData(sql_handle, 6, &data, NULL); online = atoi(data);
- inter_to_fd(fd, u_fd, aid, "[Slot/CID: %d/%d] %s | %s | Level: %d/%d | %s", char_num, char_id, name, job_name(class_), base_level, job_level, online?"On":"Off");
+ inter_msg_to_fd(fd, u_fd, aid, "[Slot/CID: %d/%d] %s | %s | Level: %d/%d | %s", char_num, char_id, name, job_name(class_), base_level, job_level, online?"On":"Off");
}
}
SQL->FreeResult(sql_handle);
@@ -743,16 +763,18 @@ static int inter_config_read(const char* cfgName)
return 0;
}
-// Save interlog into sql
-int inter_log(char* fmt, ...)
-{
+/**
+ * Save interlog into sql (arglist version)
+ * @see inter_log
+ */
+int inter_vlog(char* fmt, va_list ap) {
char str[255];
char esc_str[sizeof(str)*2+1];// escaped str
- va_list ap;
+ va_list apcopy;
- va_start(ap,fmt);
- vsnprintf(str, sizeof(str), fmt, ap);
- va_end(ap);
+ va_copy(apcopy, ap);
+ vsnprintf(str, sizeof(str), fmt, apcopy);
+ va_end(apcopy);
SQL->EscapeStringLen(sql_handle, esc_str, str, strnlen(str, sizeof(str)));
if( SQL_ERROR == SQL->Query(sql_handle, "INSERT INTO `%s` (`time`, `log`) VALUES (NOW(), '%s')", interlog_db, esc_str) )
@@ -761,6 +783,23 @@ int inter_log(char* fmt, ...)
return 0;
}
+/**
+ * Save interlog into sql
+ * @param fmt Message's format string
+ * @param ... Additional (printf-like) arguments
+ * @return Always 0 // FIXME
+ */
+int inter_log(char* fmt, ...) {
+ va_list ap;
+ int ret;
+
+ va_start(ap,fmt);
+ ret = inter_vlog(fmt, ap);
+ va_end(ap);
+
+ return ret;
+}
+
// initialize
int inter_init_sql(const char *file)
{
diff --git a/src/char/inter.h b/src/char/inter.h
index f6663813a..88501c9a0 100644
--- a/src/char/inter.h
+++ b/src/char/inter.h
@@ -17,6 +17,7 @@ int mapif_send_gmaccounts(void);
int mapif_disconnectplayer(int fd, int account_id, int char_id, int reason);
int inter_log(char *fmt,...);
+int inter_vlog(char *fmt, va_list ap);
#define inter_cfgName "conf/inter-server.conf"
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 9895ae95d..8be9298f9 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -40,7 +40,7 @@ void hplugin_export_symbol(void *var, char *name) {
HPM->symbols[HPM->symbol_count - 1]->ptr = var;
}
-void *hplugin_import_symbol(char *name) {
+void *hplugin_import_symbol(char *name, unsigned int pID) {
unsigned int i;
for( i = 0; i < HPM->symbol_count; i++ ) {
@@ -48,7 +48,7 @@ void *hplugin_import_symbol(char *name) {
return HPM->symbols[i]->ptr;
}
- ShowError("HPM:get_symbol: '"CL_WHITE"%s"CL_RESET"' not found!\n",name);
+ ShowError("HPM:get_symbol:%s: '"CL_WHITE"%s"CL_RESET"' not found!\n",HPM->pid2name(pID),name);
return NULL;
}
@@ -59,7 +59,7 @@ bool hplugin_iscompatible(char* version) {
return false;
sscanf(version, "%u.%u", &req_major, &req_minor);
-
+
return ( req_major == HPM->version[0] && req_minor <= HPM->version[1] ) ? true : false;
}
@@ -108,7 +108,7 @@ bool hplugin_populate(struct hplugin *plugin, const char *filename) {
return true;
}
-void hplugin_load(const char* filename) {
+struct hplugin *hplugin_load(const char* filename) {
struct hplugin *plugin;
struct hplugin_info *info;
struct HPMi_interface **HPMi;
@@ -118,7 +118,7 @@ void hplugin_load(const char* filename) {
if( HPM->exists(filename) ) {
ShowWarning("HPM:plugin_load: attempting to load duplicate '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
- return;
+ return NULL;
}
plugin = HPM->create();
@@ -126,30 +126,33 @@ void hplugin_load(const char* filename) {
if( !( plugin->dll = plugin_open(filename) ) ){
ShowWarning("HPM:plugin_load: failed to load '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
HPM->unload(plugin);
- return;
+ return NULL;
}
if( !( info = plugin_import(plugin->dll, "pinfo",struct hplugin_info*) ) ) {
ShowDebug("HPM:plugin_load: failed to retrieve 'plugin_info' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
HPM->unload(plugin);
- return;
+ return NULL;
}
if( !(info->type & SERVER_TYPE) ) {
HPM->unload(plugin);
- return;
+ return NULL;
}
if( !HPM->iscompatible(info->req_version) ) {
ShowWarning("HPM:plugin_load: '"CL_WHITE"%s"CL_RESET"' incompatible version '%s' -> '%s', skipping...\n", filename, info->req_version, HPM_VERSION);
HPM->unload(plugin);
- return;
+ return NULL;
}
-
+
+ plugin->info = info;
+ plugin->filename = aStrdup(filename);
+
if( !( import_symbol_ref = plugin_import(plugin->dll, "import_symbol",void **) ) ) {
ShowWarning("HPM:plugin_load: failed to retrieve 'import_symbol' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
HPM->unload(plugin);
- return;
+ return NULL;
}
*import_symbol_ref = HPM->import_symbol;
@@ -157,21 +160,21 @@ void hplugin_load(const char* filename) {
if( !( sql_handle = plugin_import(plugin->dll, "mysql_handle",Sql **) ) ) {
ShowWarning("HPM:plugin_load: failed to retrieve 'mysql_handle' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
HPM->unload(plugin);
- return;
+ return NULL;
}
- *sql_handle = HPM->import_symbol("sql_handle");
+ *sql_handle = HPM->import_symbol("sql_handle",plugin->idx);
if( !( HPMi = plugin_import(plugin->dll, "HPMi",struct HPMi_interface **) ) ) {
ShowWarning("HPM:plugin_load: failed to retrieve 'HPMi' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
HPM->unload(plugin);
- return;
+ return NULL;
}
if( !( *HPMi = plugin_import(plugin->dll, "HPMi_s",struct HPMi_interface *) ) ) {
ShowWarning("HPM:plugin_load: failed to retrieve 'HPMi_s' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
HPM->unload(plugin);
- return;
+ return NULL;
}
plugin->hpi = *HPMi;
@@ -184,30 +187,34 @@ void hplugin_load(const char* filename) {
if( ( plugin->hpi->event[HPET_READY] = plugin_import(plugin->dll, "server_online",void (*)(void)) ) )
anyEvent = true;
+ if( ( plugin->hpi->event[HPET_POST_FINAL] = plugin_import(plugin->dll, "server_post_final",void (*)(void)) ) )
+ anyEvent = true;
+
if( !anyEvent ) {
ShowWarning("HPM:plugin_load: no events found for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
HPM->unload(plugin);
- return;
+ return NULL;
}
if( !HPM->populate(plugin,filename) )
- return;
+ return NULL;
+
/* id */
plugin->hpi->pid = plugin->idx;
/* core */
- plugin->hpi->addCPCommand = HPM->import_symbol("addCPCommand");
- plugin->hpi->addPacket = HPM->import_symbol("addPacket");
- plugin->hpi->addToSession = HPM->import_symbol("addToSession");
- plugin->hpi->getFromSession = HPM->import_symbol("getFromSession");
- plugin->hpi->removeFromSession = HPM->import_symbol("removeFromSession");
+ plugin->hpi->addCPCommand = HPM->import_symbol("addCPCommand",plugin->idx);
+ plugin->hpi->addPacket = HPM->import_symbol("addPacket",plugin->idx);
+ plugin->hpi->addToSession = HPM->import_symbol("addToSession",plugin->idx);
+ plugin->hpi->getFromSession = HPM->import_symbol("getFromSession",plugin->idx);
+ plugin->hpi->removeFromSession = HPM->import_symbol("removeFromSession",plugin->idx);
+ plugin->hpi->AddHook = HPM->import_symbol("AddHook",plugin->idx);
+ plugin->hpi->HookStop = HPM->import_symbol("HookStop",plugin->idx);
+ plugin->hpi->HookStopped = HPM->import_symbol("HookStopped",plugin->idx);
/* server specific */
if( HPM->load_sub )
HPM->load_sub(plugin);
-
- plugin->info = info;
- plugin->filename = aStrdup(filename);
-
- return;
+
+ return plugin;
}
void hplugin_unload(struct hplugin* plugin) {
@@ -253,8 +260,26 @@ void hplugins_config_read(void) {
int length = config_setting_length(plist), i;
char filename[60];
for(i = 0; i < length; i++) {
- snprintf(filename, 60, "plugins/%s%s", config_setting_get_string_elem(plist,i), DLL_EXT);
- HPM->load(filename);
+ if( !strcmpi(config_setting_get_string_elem(plist,i),"HPMHooking") ) {//must load it first
+ struct hplugin *plugin;
+ snprintf(filename, 60, "plugins/%s%s", config_setting_get_string_elem(plist,i), DLL_EXT);
+ if( ( plugin = HPM->load(filename) ) ) {
+ bool (*func)(bool *fr);
+ bool (*addhook_sub) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID);
+ if( ( func = plugin_import(plugin->dll, "Hooked",bool (*)(bool *)) ) && ( addhook_sub = plugin_import(plugin->dll, "HPM_Plugin_AddHook",bool (*)(enum HPluginHookType, const char *, void *, unsigned int)) ) ) {
+ if( func(&HPM->force_return) ) {
+ HPM->hooking = true;
+ HPM->addhook_sub = addhook_sub;
+ }
+ }
+ }
+ }
+ }
+ for(i = 0; i < length; i++) {
+ if( strcmpi(config_setting_get_string_elem(plist,i),"HPMHooking") ) {//now all others
+ snprintf(filename, 60, "plugins/%s%s", config_setting_get_string_elem(plist,i), DLL_EXT);
+ HPM->load(filename);
+ }
}
config_destroy(&plugins_conf);
}
@@ -436,6 +461,25 @@ void* HPM_realloc(void *p, size_t size, const char *file, int line, const char *
char* HPM_astrdup(const char *p, const char *file, int line, const char *func) {
return iMalloc->astrdup(p,HPM_file2ptr(file),line,func);
}
+/* todo: add ability for tracking using pID for the upcoming runtime load/unload support. */
+bool HPM_AddHook(enum HPluginHookType type, const char *target, void *hook, unsigned int pID) {
+ if( !HPM->hooking ) {
+ ShowError("HPM:AddHook Fail! '%s' tried to hook to '%s' but HPMHooking is disabled!\n",HPM->pid2name(pID),target);
+ return false;
+ }
+ /* search if target is a known hook point within 'common' */
+ /* if not check if a sub-hooking list is available (from the server) and run it by */
+ if( HPM->addhook_sub && HPM->addhook_sub(type,target,hook,pID) )
+ return true;
+ return false;
+}
+void HPM_HookStop (const char *func, unsigned int pID) {
+ /* track? */
+ HPM->force_return = true;
+}
+bool HPM_HookStopped (void) {
+ return HPM->force_return;
+}
void hplugins_share_defaults(void) {
/* console */
@@ -447,6 +491,9 @@ void hplugins_share_defaults(void) {
HPM->share(hplugins_addToSession,"addToSession");
HPM->share(hplugins_getFromSession,"getFromSession");
HPM->share(hplugins_removeFromSession,"removeFromSession");
+ HPM->share(HPM_AddHook,"AddHook");
+ HPM->share(HPM_HookStop,"HookStop");
+ HPM->share(HPM_HookStopped,"HookStopped");
/* core */
HPM->share(&runflag,"runflag");
HPM->share(arg_v,"arg_v");
@@ -489,7 +536,7 @@ void hpm_init(void) {
HPMiMalloc->realloc = HPM_realloc;
HPMiMalloc->astrdup = HPM_astrdup;
- sscanf(HPM_VERSION, "%d.%d", &HPM->version[0], &HPM->version[1]);
+ sscanf(HPM_VERSION, "%u.%u", &HPM->version[0], &HPM->version[1]);
if( HPM->version[0] == 0 && HPM->version[1] == 0 ) {
ShowError("HPM:init:failed to retrieve HPM version!!\n");
@@ -554,6 +601,8 @@ void hpm_defaults(void) {
HPM->fnames = NULL;
HPM->fnamec = 0;
+ HPM->force_return = false;
+ HPM->hooking = false;
HPM->init = hpm_init;
HPM->final = hpm_final;
@@ -573,4 +622,5 @@ void hpm_defaults(void) {
HPM->pid2name = hplugins_id2name;
HPM->parse_packets = hplugins_parse_packets;
HPM->load_sub = NULL;
+ HPM->addhook_sub = NULL;
}
diff --git a/src/common/HPM.h b/src/common/HPM.h
index 614498fd3..395555948 100644
--- a/src/common/HPM.h
+++ b/src/common/HPM.h
@@ -79,6 +79,9 @@ struct HPM_interface {
/* vars */
unsigned int version[2];
bool off;
+ bool hooking;
+ /* hooking */
+ bool force_return;
/* data */
struct hplugin **plugins;
unsigned int plugin_count;
@@ -94,12 +97,12 @@ struct HPM_interface {
void (*init) (void);
void (*final) (void);
struct hplugin * (*create) (void);
- void (*load) (const char* filename);
+ struct hplugin * (*load) (const char* filename);
void (*unload) (struct hplugin* plugin);
bool (*exists) (const char *filename);
bool (*iscompatible) (char* version);
void (*event) (enum hp_event_types type);
- void *(*import_symbol) (char *);
+ void *(*import_symbol) (char *name, unsigned int pID);
void (*share) (void *, char *);
void (*symbol_defaults) (void);
void (*config_read) (void);
@@ -108,6 +111,7 @@ struct HPM_interface {
char *(*pid2name) (unsigned int pid);
unsigned char (*parse_packets) (int fd, enum HPluginPacketHookingPoints point);
void (*load_sub) (struct hplugin *plugin);
+ bool (*addhook_sub) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID);
} HPM_s;
struct HPM_interface *HPM;
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index c8bce8ee8..9c2a6184e 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -35,7 +35,7 @@ struct map_session_data;
/* after */
#include "../common/showmsg.h"
-#define HPM_VERSION "0.2"
+#define HPM_VERSION "1.0"
struct hplugin_info {
char* name;
@@ -44,10 +44,10 @@ struct hplugin_info {
char* req_version;
};
-HPExport void *(*import_symbol) (char *name);
+HPExport void *(*import_symbol) (char *name, unsigned int pID);
HPExport Sql *mysql_handle;
-#define GET_SYMBOL(n) import_symbol(n)
+#define GET_SYMBOL(n) import_symbol(n,HPMi->pid)
#define SERVER_TYPE_ALL SERVER_TYPE_LOGIN|SERVER_TYPE_CHAR|SERVER_TYPE_MAP
@@ -55,6 +55,7 @@ enum hp_event_types {
HPET_INIT,/* server starts */
HPET_FINAL,/* server is shutting down */
HPET_READY,/* server is ready (online) */
+ HPET_POST_FINAL,/* server is done shutting down */
HPET_MAX,
};
@@ -70,6 +71,18 @@ enum HPluginPacketHookingPoints {
hpPHP_MAX,
};
+enum HPluginHookType {
+ HOOK_TYPE_PRE,
+ HOOK_TYPE_POST,
+};
+
+#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 ;/ */
+/* will not run the original function after pre-hook processing is complete (other hooks will run) */
+#define hookStop() HPMi->HookStop(__func__,HPMi->pid)
+#define hookStopped() HPMi->HookStopped()
+
/* Hercules Plugin Mananger Include Interface */
HPExport struct HPMi_interface {
/* */
@@ -89,6 +102,10 @@ HPExport struct HPMi_interface {
void (*removeFromSession) (struct socket_data *sess, unsigned int id, unsigned int type);
/* packet */
bool (*addPacket) (unsigned short cmd, unsigned short length, void (*receive)(int fd), unsigned int point, unsigned int pluginID);
+ /* Hooking */
+ bool (*AddHook) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID);
+ void (*HookStop) (const char *func, unsigned int pID);
+ bool (*HookStopped) (void);
} HPMi_s;
#ifndef _HPM_H_
HPExport struct HPMi_interface *HPMi;
diff --git a/src/common/Makefile.in b/src/common/Makefile.in
index 78f9cd0d1..53b7a472e 100644
--- a/src/common/Makefile.in
+++ b/src/common/Makefile.in
@@ -40,22 +40,25 @@ CC = @CC@
export CC
#####################################################################
-.PHONY: all sql common common_sql common_mini clean help
+.PHONY: all sql common common_sql common_mini clean buildclean help
all: sql
sql: $(SQL_DEPENDS)
-clean:
- @echo " CLEAN common"
+buildclean:
+ @echo " CLEAN common (build temp files)"
@rm -rf *.o obj_all obj_sql
+clean: buildclean
+ @echo " CLEAN common"
+
help:
@echo "possible targets are 'sql' 'all' 'clean' 'help'"
- @echo "'sql' - builds object files used in sql servers"
- @echo "'all' - builds all above targets"
- @echo "'clean' - cleans builds and objects"
- @echo "'help' - outputs this message"
+ @echo "'sql' - builds object files used in sql servers"
+ @echo "'all' - builds all above targets"
+ @echo "'clean', 'buildclean' - cleans builds and objects"
+ @echo "'help' - outputs this message"
#####################################################################
diff --git a/src/common/db.c b/src/common/db.c
index bd2bea424..b3a58e0a4 100644
--- a/src/common/db.c
+++ b/src/common/db.c
@@ -2730,20 +2730,26 @@ void linkdb_insert( struct linkdb_node** head, void *key, void* data)
node->data = data;
}
-void linkdb_foreach( struct linkdb_node** head, LinkDBFunc func, ... )
-{
+void linkdb_vforeach( struct linkdb_node** head, LinkDBFunc func, va_list ap) {
struct linkdb_node *node;
if( head == NULL ) return;
node = *head;
while ( node ) {
- va_list args;
- va_start(args, func);
- func( node->key, node->data, args );
- va_end(args);
+ va_list argscopy;
+ va_copy(argscopy, ap);
+ func(node->key, node->data, argscopy);
+ va_end(argscopy);
node = node->next;
}
}
+void linkdb_foreach( struct linkdb_node** head, LinkDBFunc func, ...) {
+ va_list ap;
+ va_start(ap, func);
+ linkdb_vforeach(head, func, ap);
+ va_end(ap);
+}
+
void* linkdb_search( struct linkdb_node** head, void *key)
{
int n = 0;
diff --git a/src/common/db.h b/src/common/db.h
index aa4bfb054..dffd2356d 100644
--- a/src/common/db.h
+++ b/src/common/db.h
@@ -882,12 +882,13 @@ struct linkdb_node {
typedef void (*LinkDBFunc)(void* key, void* data, va_list args);
-void linkdb_insert ( struct linkdb_node** head, void *key, void* data); // dlȂ
-void linkdb_replace( struct linkdb_node** head, void *key, void* data); // dl
-void* linkdb_search ( struct linkdb_node** head, void *key);
-void* linkdb_erase ( struct linkdb_node** head, void *key);
-void linkdb_final ( struct linkdb_node** head );
-void linkdb_foreach( struct linkdb_node** head, LinkDBFunc func, ... );
+void linkdb_insert (struct linkdb_node** head, void *key, void* data); // dlȂ
+void linkdb_replace (struct linkdb_node** head, void *key, void* data); // dl
+void* linkdb_search (struct linkdb_node** head, void *key);
+void* linkdb_erase (struct linkdb_node** head, void *key);
+void linkdb_final (struct linkdb_node** head);
+void linkdb_vforeach(struct linkdb_node** head, LinkDBFunc func, va_list ap);
+void linkdb_foreach (struct linkdb_node** head, LinkDBFunc func, ...);
diff --git a/src/common/mmo.h b/src/common/mmo.h
index b51d0ec4a..205cf8425 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -772,16 +772,68 @@ enum {
JOB_KAGEROU = 4211,
JOB_OBORO,
+ JOB_REBELLION = 4215,
JOB_MAX,
};
+//Total number of classes (for data storage)
+#define CLASS_COUNT (JOB_MAX - JOB_NOVICE_HIGH + JOB_MAX_BASIC)
+
enum {
SEX_FEMALE = 0,
SEX_MALE,
SEX_SERVER
};
+enum weapon_type {
+ W_FIST, //Bare hands
+ W_DAGGER, //1
+ W_1HSWORD, //2
+ W_2HSWORD, //3
+ W_1HSPEAR, //4
+ W_2HSPEAR, //5
+ W_1HAXE, //6
+ W_2HAXE, //7
+ W_MACE, //8
+ W_2HMACE, //9 (unused)
+ W_STAFF, //10
+ W_BOW, //11
+ W_KNUCKLE, //12
+ W_MUSICAL, //13
+ W_WHIP, //14
+ W_BOOK, //15
+ W_KATAR, //16
+ W_REVOLVER, //17
+ W_RIFLE, //18
+ W_GATLING, //19
+ W_SHOTGUN, //20
+ W_GRENADE, //21
+ W_HUUMA, //22
+ W_2HSTAFF, //23
+ MAX_WEAPON_TYPE,
+ // dual-wield constants
+ W_DOUBLE_DD, // 2 daggers
+ W_DOUBLE_SS, // 2 swords
+ W_DOUBLE_AA, // 2 axes
+ W_DOUBLE_DS, // dagger + sword
+ W_DOUBLE_DA, // dagger + axe
+ W_DOUBLE_SA, // sword + axe
+};
+
+enum ammo_type {
+ A_ARROW = 1,
+ A_DAGGER, //2
+ A_BULLET, //3
+ A_SHELL, //4
+ A_GRENADE, //5
+ A_SHURIKEN, //6
+ A_KUNAI, //7
+ A_CANNONBALL, //8
+ A_THROWWEAPON //9
+};
+
+
// sanity checks...
#if MAX_ZENY > INT_MAX
#error MAX_ZENY is too big
diff --git a/src/common/timer.h b/src/common/timer.h
index 3146a2e66..600f9fd02 100644
--- a/src/common/timer.h
+++ b/src/common/timer.h
@@ -23,9 +23,8 @@ typedef int (*TimerFunc)(int tid, unsigned int tick, int id, intptr_t data);
struct TimerData {
unsigned int tick;
TimerFunc func;
- int type;
+ unsigned char type;
int interval;
- int heap_pos;
// general-purpose storage
int id;
diff --git a/src/login/Makefile.in b/src/login/Makefile.in
index b6b70a495..a97d17f68 100644
--- a/src/login/Makefile.in
+++ b/src/login/Makefile.in
@@ -31,21 +31,27 @@ CC = @CC@
export CC
#####################################################################
-.PHONY: all sql login-server clean help
+.PHONY: all sql login-server clean buildclean help
all: sql
sql: login-server
-clean:
+buildclean:
+ @echo " CLEAN login (build temp files)"
+ @rm -rf *.o obj_sql
+
+clean: buildclean
@echo " CLEAN login"
- @rm -rf *.o obj_sql ../../login-server@EXEEXT@
+ @rm -rf ../../login-server@EXEEXT@
help:
@echo "possible targets are 'login-server' 'all' 'clean' 'help'"
@echo "'login-server' - login server"
@echo "'all' - builds all above targets"
@echo "'clean' - cleans builds and objects"
+ @echo "'buildclean' - cleans build temporary (object) files, without deleting the"
+ @echo " executables"
@echo "'help' - outputs this message"
#####################################################################
diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c
index 17d72bc98..3ba9ae725 100644
--- a/src/map/HPMmap.c
+++ b/src/map/HPMmap.c
@@ -10,12 +10,29 @@
#include "pc.h"
#include "map.h"
+//
+#include "chat.h"
+#include "chrif.h"
+#include "duel.h"
+#include "elemental.h"
+#include "homunculus.h"
+#include "instance.h"
+#include "intif.h"
+#include "irc-bot.h"
+#include "mail.h"
+#include "mapreg.h"
+#include "mercenary.h"
+#include "party.h"
+#include "pet.h"
+#include "quest.h"
+#include "storage.h"
+#include "trade.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
-
void HPM_map_addToMSD(struct map_session_data *sd, void *data, unsigned int id, unsigned int type, bool autofree) {
struct HPluginData *HPData;
unsigned int i;
@@ -80,10 +97,10 @@ void HPM_map_removeFromMSD(struct map_session_data *sd, unsigned int id, unsigne
}
void HPM_map_plugin_load_sub(struct hplugin *plugin) {
- plugin->hpi->addCommand = HPM->import_symbol("addCommand");
- plugin->hpi->addScript = HPM->import_symbol("addScript");
+ plugin->hpi->addCommand = HPM->import_symbol("addCommand",plugin->idx);
+ plugin->hpi->addScript = HPM->import_symbol("addScript",plugin->idx);
/* */
- plugin->hpi->addToMSD = HPM->import_symbol("addToMSD");
- plugin->hpi->getFromMSD = HPM->import_symbol("getFromMSD");
- plugin->hpi->removeFromMSD = HPM->import_symbol("removeFromMSD");
-}
+ plugin->hpi->addToMSD = HPM->import_symbol("addToMSD",plugin->idx);
+ plugin->hpi->getFromMSD = HPM->import_symbol("getFromMSD",plugin->idx);
+ plugin->hpi->removeFromMSD = HPM->import_symbol("removeFromMSD",plugin->idx);
+} \ No newline at end of file
diff --git a/src/map/Makefile.in b/src/map/Makefile.in
index fb78d51a1..b516c61ca 100644
--- a/src/map/Makefile.in
+++ b/src/map/Makefile.in
@@ -47,21 +47,27 @@ CC = @CC@
export CC
#####################################################################
-.PHONY: all sql map-server clean help
+.PHONY: all sql map-server clean buildclean help
all: sql
sql: map-server
-clean:
+buildclean:
+ @echo " CLEAN map (build temp files)"
+ @rm -rf *.o obj_sql
+
+clean: buildclean
@echo " CLEAN map"
- @rm -rf *.o obj_sql ../../map-server@EXEEXT@
+ @rm -rf ../../map-server@EXEEXT@
help:
@echo "possible targets are 'map-server' 'all' 'clean' 'help'"
@echo "'map-server' - map server"
@echo "'all' - builds all above targets"
@echo "'clean' - cleans builds and objects"
+ @echo "'buildclean' - cleans build temporary (object) files, without deleting the"
+ @echo " executables"
@echo "'help' - outputs this message"
#####################################################################
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 4f784ecc5..3d04a6bff 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -412,11 +412,11 @@ ACMD(mapmove) {
if (!map->search_freecell(NULL, m, &x, &y, 10, 10, 1))
x = y = 0; //Invalid cell, use random spot.
}
- if (maplist[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 && maplist[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;
}
@@ -476,12 +476,12 @@ ACMD(jumpto) {
return false;
}
- if (pl_sd->bl.m >= 0 && maplist[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 && maplist[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;
}
@@ -511,7 +511,7 @@ ACMD(jump)
sscanf(message, "%hd %hd", &x, &y);
- if (maplist[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;
}
@@ -626,11 +626,11 @@ ACMD(who) {
StrBuf->Printf(&buf, msg_txt(30), count); // %d players found.
} else {
if (count == 0)
- StrBuf->Printf(&buf, msg_txt(54), maplist[map_id].name); // No player found in map '%s'.
+ StrBuf->Printf(&buf, msg_txt(54), map->list[map_id].name); // No player found in map '%s'.
else if (count == 1)
- StrBuf->Printf(&buf, msg_txt(55), maplist[map_id].name); // 1 player found in map '%s'.
+ StrBuf->Printf(&buf, msg_txt(55), map->list[map_id].name); // 1 player found in map '%s'.
else
- StrBuf->Printf(&buf, msg_txt(56), count, maplist[map_id].name); // %d players found in map '%s'.
+ StrBuf->Printf(&buf, msg_txt(56), count, map->list[map_id].name); // %d players found in map '%s'.
}
clif->message(fd, StrBuf->Value(&buf));
StrBuf->Destroy(&buf);
@@ -750,11 +750,11 @@ ACMD(load) {
nullpo_retr(-1, sd);
m = map->mapindex2mapid(sd->status.save_point.map);
- if (m >= 0 && maplist[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 && maplist[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;
}
@@ -893,9 +893,9 @@ ACMD(hide) {
clif->message(fd, msg_txt(10)); // Invisible: Off
// increment the number of pvp players on the map
- maplist[sd->bl.m].users_pvp++;
+ map->list[sd->bl.m].users_pvp++;
- if( maplist[sd->bl.m].flag.pvp && !maplist[sd->bl.m].flag.pvp_nocalcrank ) {
+ if( map->list[sd->bl.m].flag.pvp && !map->list[sd->bl.m].flag.pvp_nocalcrank ) {
// register the player for ranking calculations
sd->pvp_timer = timer->add( timer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0 );
}
@@ -907,9 +907,9 @@ ACMD(hide) {
clif->message(fd, msg_txt(11)); // Invisible: On
// decrement the number of pvp players on the map
- maplist[sd->bl.m].users_pvp--;
+ map->list[sd->bl.m].users_pvp--;
- if( maplist[sd->bl.m].flag.pvp && !maplist[sd->bl.m].flag.pvp_nocalcrank && sd->pvp_timer != INVALID_TIMER ) {
+ if( map->list[sd->bl.m].flag.pvp && !map->list[sd->bl.m].flag.pvp_nocalcrank && sd->pvp_timer != INVALID_TIMER ) {
// unregister the player for ranking
timer->delete( sd->pvp_timer, pc->calc_pvprank_timer );
sd->pvp_timer = INVALID_TIMER;
@@ -1463,13 +1463,13 @@ int atcommand_pvpoff_sub(struct block_list *bl,va_list ap)
ACMD(pvpoff) {
nullpo_retr(-1, sd);
- if (!maplist[sd->bl.m].flag.pvp) {
+ if (!map->list[sd->bl.m].flag.pvp) {
clif->message(fd, msg_txt(160)); // PvP is already Off.
return false;
}
- map->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone);
- maplist[sd->bl.m].flag.pvp = 0;
+ map->zone_change2(sd->bl.m,map->list[sd->bl.m].prev_zone);
+ map->list[sd->bl.m].flag.pvp = 0;
if (!battle_config.pk_mode) {
clif->map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING);
@@ -1501,13 +1501,13 @@ int atcommand_pvpon_sub(struct block_list *bl,va_list ap)
ACMD(pvpon) {
nullpo_retr(-1, sd);
- if (maplist[sd->bl.m].flag.pvp) {
+ if (map->list[sd->bl.m].flag.pvp) {
clif->message(fd, msg_txt(161)); // PvP is already On.
return false;
}
- map->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_PVP_NAME));
- maplist[sd->bl.m].flag.pvp = 1;
+ map->zone_change2(sd->bl.m,strdb_get(map->zone_db, MAP_ZONE_PVP_NAME));
+ map->list[sd->bl.m].flag.pvp = 1;
if (!battle_config.pk_mode) {// display pvp circle and rank
clif->map_property_mapall(sd->bl.m, MAPPROPERTY_FREEPVPZONE);
@@ -1526,13 +1526,13 @@ ACMD(pvpon) {
ACMD(gvgoff) {
nullpo_retr(-1, sd);
- if (!maplist[sd->bl.m].flag.gvg) {
+ if (!map->list[sd->bl.m].flag.gvg) {
clif->message(fd, msg_txt(162)); // GvG is already Off.
return false;
}
- map->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone);
- maplist[sd->bl.m].flag.gvg = 0;
+ map->zone_change2(sd->bl.m,map->list[sd->bl.m].prev_zone);
+ map->list[sd->bl.m].flag.gvg = 0;
clif->map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING);
clif->maptypeproperty2(&sd->bl,ALL_SAMEMAP);
map->foreachinmap(atcommand->stopattack,sd->bl.m, BL_CHAR, 0);
@@ -1547,13 +1547,13 @@ ACMD(gvgoff) {
ACMD(gvgon) {
nullpo_retr(-1, sd);
- if (maplist[sd->bl.m].flag.gvg) {
+ if (map->list[sd->bl.m].flag.gvg) {
clif->message(fd, msg_txt(163)); // GvG is already On.
return false;
}
- map->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_GVG_NAME));
- maplist[sd->bl.m].flag.gvg = 1;
+ map->zone_change2(sd->bl.m,strdb_get(map->zone_db, MAP_ZONE_GVG_NAME));
+ map->list[sd->bl.m].flag.gvg = 1;
clif->map_property_mapall(sd->bl.m, MAPPROPERTY_AGITZONE);
clif->maptypeproperty2(&sd->bl,ALL_SAMEMAP);
clif->message(fd, msg_txt(34)); // GvG: On.
@@ -1845,11 +1845,11 @@ ACMD(go)
if (town >= 0 && town < ARRAYLENGTH(data)) {
m = map->mapname2mapid(data[town].map);
- if (m >= 0 && maplist[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 && maplist[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;
}
@@ -2192,7 +2192,7 @@ ACMD(gat) {
for (y = 2; y >= -2; y--) {
sprintf(atcmd_output, "%s (x= %d, y= %d) %02X %02X %02X %02X %02X",
- maplist[sd->bl.m].name, sd->bl.x - 2, sd->bl.y + y,
+ map->list[sd->bl.m].name, sd->bl.x - 2, sd->bl.y + y,
map->getcell(sd->bl.m, sd->bl.x - 2, sd->bl.y + y, CELL_GETTYPE),
map->getcell(sd->bl.m, sd->bl.x - 1, sd->bl.y + y, CELL_GETTYPE),
map->getcell(sd->bl.m, sd->bl.x, sd->bl.y + y, CELL_GETTYPE),
@@ -2688,11 +2688,11 @@ ACMD(recall) {
return false;
}
- if (sd->bl.m >= 0 && maplist[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 && maplist[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;
}
@@ -3391,7 +3391,7 @@ ACMD(recallall)
memset(atcmd_output, '\0', sizeof(atcmd_output));
- if (sd->bl.m >= 0 && maplist[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;
}
@@ -3402,7 +3402,7 @@ ACMD(recallall)
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 && maplist[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
@@ -3444,7 +3444,7 @@ ACMD(guildrecall)
return false;
}
- if (sd->bl.m >= 0 && maplist[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;
}
@@ -3464,7 +3464,7 @@ ACMD(guildrecall)
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))
continue; // Skip GMs greater than you... or chars already on the cell
- if (pl_sd->bl.m >= 0 && maplist[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);
@@ -3502,7 +3502,7 @@ ACMD(partyrecall)
return false;
}
- if (sd->bl.m >= 0 && maplist[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;
}
@@ -3521,7 +3521,7 @@ ACMD(partyrecall)
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))
continue; // Skip GMs greater than you... or chars already on the cell
- if (pl_sd->bl.m >= 0 && maplist[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);
@@ -3561,7 +3561,7 @@ ACMD(reloadmobdb) {
homun->reload();
mercenary->read_db();
mercenary->read_skilldb();
- elemental->reload_elementaldb();
+ elemental->reload_db();
clif->message(fd, msg_txt(98)); // Monster database has been reloaded.
return true;
@@ -3774,129 +3774,129 @@ ACMD(mapinfo) {
}
mapit->free(iter);
- sprintf(atcmd_output, msg_txt(1040), mapname, maplist[m_id].zone->name, maplist[m_id].users, maplist[m_id].npc_num, chat_num, vend_num); // Map: %s (Zone:%s) | Players: %d | NPCs: %d | Chats: %d | Vendings: %d
+ sprintf(atcmd_output, msg_txt(1040), mapname, map->list[m_id].zone->name, map->list[m_id].users, map->list[m_id].npc_num, chat_num, vend_num); // Map: %s (Zone:%s) | Players: %d | NPCs: %d | Chats: %d | Vendings: %d
clif->message(fd, atcmd_output);
clif->message(fd, msg_txt(1041)); // ------ Map Flags ------
- if (maplist[m_id].flag.town)
+ if (map->list[m_id].flag.town)
clif->message(fd, msg_txt(1042)); // Town Map
- if (battle_config.autotrade_mapflag == maplist[m_id].flag.autotrade)
+ if (battle_config.autotrade_mapflag == map->list[m_id].flag.autotrade)
clif->message(fd, msg_txt(1043)); // Autotrade Enabled
else
clif->message(fd, msg_txt(1044)); // Autotrade Disabled
- if (maplist[m_id].flag.battleground)
+ if (map->list[m_id].flag.battleground)
clif->message(fd, msg_txt(1045)); // Battlegrounds ON
strcpy(atcmd_output,msg_txt(1046)); // PvP Flags:
- if (maplist[m_id].flag.pvp)
+ if (map->list[m_id].flag.pvp)
strcat(atcmd_output, msg_txt(1047)); // Pvp ON |
- if (maplist[m_id].flag.pvp_noguild)
+ if (map->list[m_id].flag.pvp_noguild)
strcat(atcmd_output, msg_txt(1048)); // NoGuild |
- if (maplist[m_id].flag.pvp_noparty)
+ if (map->list[m_id].flag.pvp_noparty)
strcat(atcmd_output, msg_txt(1049)); // NoParty |
- if (maplist[m_id].flag.pvp_nightmaredrop)
+ if (map->list[m_id].flag.pvp_nightmaredrop)
strcat(atcmd_output, msg_txt(1050)); // NightmareDrop |
- if (maplist[m_id].flag.pvp_nocalcrank)
+ if (map->list[m_id].flag.pvp_nocalcrank)
strcat(atcmd_output, msg_txt(1051)); // NoCalcRank |
clif->message(fd, atcmd_output);
strcpy(atcmd_output,msg_txt(1052)); // GvG Flags:
- if (maplist[m_id].flag.gvg)
+ if (map->list[m_id].flag.gvg)
strcat(atcmd_output, msg_txt(1053)); // GvG ON |
- if (maplist[m_id].flag.gvg_dungeon)
+ if (map->list[m_id].flag.gvg_dungeon)
strcat(atcmd_output, msg_txt(1054)); // GvG Dungeon |
- if (maplist[m_id].flag.gvg_castle)
+ if (map->list[m_id].flag.gvg_castle)
strcat(atcmd_output, msg_txt(1055)); // GvG Castle |
- if (maplist[m_id].flag.gvg_noparty)
+ if (map->list[m_id].flag.gvg_noparty)
strcat(atcmd_output, msg_txt(1056)); // NoParty |
clif->message(fd, atcmd_output);
strcpy(atcmd_output,msg_txt(1057)); // Teleport Flags:
- if (maplist[m_id].flag.noteleport)
+ if (map->list[m_id].flag.noteleport)
strcat(atcmd_output, msg_txt(1058)); // NoTeleport |
- if (maplist[m_id].flag.monster_noteleport)
+ if (map->list[m_id].flag.monster_noteleport)
strcat(atcmd_output, msg_txt(1059)); // Monster NoTeleport |
- if (maplist[m_id].flag.nowarp)
+ if (map->list[m_id].flag.nowarp)
strcat(atcmd_output, msg_txt(1060)); // NoWarp |
- if (maplist[m_id].flag.nowarpto)
+ if (map->list[m_id].flag.nowarpto)
strcat(atcmd_output, msg_txt(1061)); // NoWarpTo |
- if (maplist[m_id].flag.noreturn)
+ if (map->list[m_id].flag.noreturn)
strcat(atcmd_output, msg_txt(1062)); // NoReturn |
- if (maplist[m_id].flag.nomemo)
+ if (map->list[m_id].flag.nomemo)
strcat(atcmd_output, msg_txt(1064)); // NoMemo |
clif->message(fd, atcmd_output);
sprintf(atcmd_output, msg_txt(1065), // No Exp Penalty: %s | No Zeny Penalty: %s
- (maplist[m_id].flag.noexppenalty) ? msg_txt(1066) : msg_txt(1067),
- (maplist[m_id].flag.nozenypenalty) ? msg_txt(1066) : msg_txt(1067)); // On / Off
+ (map->list[m_id].flag.noexppenalty) ? msg_txt(1066) : msg_txt(1067),
+ (map->list[m_id].flag.nozenypenalty) ? msg_txt(1066) : msg_txt(1067)); // On / Off
clif->message(fd, atcmd_output);
- if (maplist[m_id].flag.nosave) {
- if (!maplist[m_id].save.map)
+ if (map->list[m_id].flag.nosave) {
+ if (!map->list[m_id].save.map)
clif->message(fd, msg_txt(1068)); // No Save (Return to last Save Point)
- else if (maplist[m_id].save.x == -1 || maplist[m_id].save.y == -1 ) {
- sprintf(atcmd_output, msg_txt(1069), mapindex_id2name(maplist[m_id].save.map)); // No Save, Save Point: %s,Random
+ else if (map->list[m_id].save.x == -1 || map->list[m_id].save.y == -1 ) {
+ sprintf(atcmd_output, msg_txt(1069), mapindex_id2name(map->list[m_id].save.map)); // No Save, Save Point: %s,Random
clif->message(fd, atcmd_output);
} else {
sprintf(atcmd_output, msg_txt(1070), // No Save, Save Point: %s,%d,%d
- mapindex_id2name(maplist[m_id].save.map),maplist[m_id].save.x,maplist[m_id].save.y);
+ mapindex_id2name(map->list[m_id].save.map),map->list[m_id].save.x,map->list[m_id].save.y);
clif->message(fd, atcmd_output);
}
}
strcpy(atcmd_output,msg_txt(1071)); // Weather Flags:
- if (maplist[m_id].flag.snow)
+ if (map->list[m_id].flag.snow)
strcat(atcmd_output, msg_txt(1072)); // Snow |
- if (maplist[m_id].flag.fog)
+ if (map->list[m_id].flag.fog)
strcat(atcmd_output, msg_txt(1073)); // Fog |
- if (maplist[m_id].flag.sakura)
+ if (map->list[m_id].flag.sakura)
strcat(atcmd_output, msg_txt(1074)); // Sakura |
- if (maplist[m_id].flag.clouds)
+ if (map->list[m_id].flag.clouds)
strcat(atcmd_output, msg_txt(1075)); // Clouds |
- if (maplist[m_id].flag.clouds2)
+ if (map->list[m_id].flag.clouds2)
strcat(atcmd_output, msg_txt(1076)); // Clouds2 |
- if (maplist[m_id].flag.fireworks)
+ if (map->list[m_id].flag.fireworks)
strcat(atcmd_output, msg_txt(1077)); // Fireworks |
- if (maplist[m_id].flag.leaves)
+ if (map->list[m_id].flag.leaves)
strcat(atcmd_output, msg_txt(1078)); // Leaves |
- if (maplist[m_id].flag.nightenabled)
+ if (map->list[m_id].flag.nightenabled)
strcat(atcmd_output, msg_txt(1080)); // Displays Night |
clif->message(fd, atcmd_output);
strcpy(atcmd_output,msg_txt(1081)); // Other Flags:
- if (maplist[m_id].flag.nobranch)
+ if (map->list[m_id].flag.nobranch)
strcat(atcmd_output, msg_txt(1082)); // NoBranch |
- if (maplist[m_id].flag.notrade)
+ if (map->list[m_id].flag.notrade)
strcat(atcmd_output, msg_txt(1083)); // NoTrade |
- if (maplist[m_id].flag.novending)
+ if (map->list[m_id].flag.novending)
strcat(atcmd_output, msg_txt(1084)); // NoVending |
- if (maplist[m_id].flag.nodrop)
+ if (map->list[m_id].flag.nodrop)
strcat(atcmd_output, msg_txt(1085)); // NoDrop |
- if (maplist[m_id].flag.noskill)
+ if (map->list[m_id].flag.noskill)
strcat(atcmd_output, msg_txt(1086)); // NoSkill |
- if (maplist[m_id].flag.noicewall)
+ if (map->list[m_id].flag.noicewall)
strcat(atcmd_output, msg_txt(1087)); // NoIcewall |
- if (maplist[m_id].flag.allowks)
+ if (map->list[m_id].flag.allowks)
strcat(atcmd_output, msg_txt(1088)); // AllowKS |
- if (maplist[m_id].flag.reset)
+ if (map->list[m_id].flag.reset)
strcat(atcmd_output, msg_txt(1089)); // Reset |
clif->message(fd, atcmd_output);
strcpy(atcmd_output,msg_txt(1090)); // Other Flags:
- if (maplist[m_id].nocommand)
+ if (map->list[m_id].nocommand)
strcat(atcmd_output, msg_txt(1091)); // NoCommand |
- if (maplist[m_id].flag.nobaseexp)
+ if (map->list[m_id].flag.nobaseexp)
strcat(atcmd_output, msg_txt(1092)); // NoBaseEXP |
- if (maplist[m_id].flag.nojobexp)
+ if (map->list[m_id].flag.nojobexp)
strcat(atcmd_output, msg_txt(1093)); // NoJobEXP |
- if (maplist[m_id].flag.nomobloot)
+ if (map->list[m_id].flag.nomobloot)
strcat(atcmd_output, msg_txt(1094)); // NoMobLoot |
- if (maplist[m_id].flag.nomvploot)
+ if (map->list[m_id].flag.nomvploot)
strcat(atcmd_output, msg_txt(1095)); // NoMVPLoot |
- if (maplist[m_id].flag.partylock)
+ if (map->list[m_id].flag.partylock)
strcat(atcmd_output, msg_txt(1096)); // PartyLock |
- if (maplist[m_id].flag.guildlock)
+ if (map->list[m_id].flag.guildlock)
strcat(atcmd_output, msg_txt(1097)); // GuildLock |
clif->message(fd, atcmd_output);
@@ -3919,8 +3919,8 @@ ACMD(mapinfo) {
break;
case 2:
clif->message(fd, msg_txt(1100)); // ----- NPCs in Map -----
- for (i = 0; i < maplist[m_id].npc_num;) {
- nd = maplist[m_id].npc[i];
+ for (i = 0; i < map->list[m_id].npc_num;) {
+ nd = map->list[m_id].npc[i];
switch(nd->dir) {
case 0: strcpy(direction, msg_txt(1101)); break; // North
case 1: strcpy(direction, msg_txt(1102)); break; // North West
@@ -5028,7 +5028,7 @@ ACMD(killable) {
*------------------------------------------*/
ACMD(skillon) {
nullpo_retr(-1, sd);
- maplist[sd->bl.m].flag.noskill = 0;
+ map->list[sd->bl.m].flag.noskill = 0;
clif->message(fd, msg_txt(244));
return true;
}
@@ -5039,7 +5039,7 @@ ACMD(skillon) {
*------------------------------------------*/
ACMD(skilloff) {
nullpo_retr(-1, sd);
- maplist[sd->bl.m].flag.noskill = 1;
+ map->list[sd->bl.m].flag.noskill = 1;
clif->message(fd, msg_txt(243));
return true;
}
@@ -5069,8 +5069,8 @@ ACMD(npcmove) {
return false; //Not on a map.
}
- x = cap_value(x, 0, maplist[m].xs-1);
- y = cap_value(y, 0, maplist[m].ys-1);
+ x = cap_value(x, 0, map->list[m].xs-1);
+ y = cap_value(y, 0, map->list[m].ys-1);
map->foreachinrange(clif->outsight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl);
map->moveblock(&nd->bl, x, y, timer->gettick());
map->foreachinrange(clif->insight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl);
@@ -5428,14 +5428,14 @@ ACMD(skilltree) {
sprintf(atcmd_output, msg_txt(1168), pc->job_name(c), pc->checkskill(pl_sd, NV_BASIC)); // Player is using %s skill tree (%d basic points).
clif->message(fd, atcmd_output);
- ARR_FIND( 0, MAX_SKILL_TREE, j, skill_tree[c][j].id == 0 || skill_tree[c][j].id == skill_id );
- if( j == MAX_SKILL_TREE || skill_tree[c][j].id == 0 )
+ ARR_FIND( 0, MAX_SKILL_TREE, j, pc->skill_tree[c][j].id == 0 || pc->skill_tree[c][j].id == skill_id );
+ if( j == MAX_SKILL_TREE || pc->skill_tree[c][j].id == 0 )
{
clif->message(fd, msg_txt(1169)); // The player cannot use that skill.
return true;
}
- ent = &skill_tree[c][j];
+ ent = &pc->skill_tree[c][j];
meets = 1;
for(j=0;j<MAX_PC_SKILL_REQUIRE;j++)
@@ -5557,7 +5557,7 @@ ACMD(changelook)
ACMD(autotrade) {
nullpo_retr(-1, sd);
- if( maplist[sd->bl.m].flag.autotrade != battle_config.autotrade_mapflag ) {
+ if( map->list[sd->bl.m].flag.autotrade != battle_config.autotrade_mapflag ) {
clif->message(fd, msg_txt(1179)); // Autotrade is not allowed on this map.
return false;
}
@@ -5599,7 +5599,7 @@ ACMD(changegm) {
return false;
}
- if( maplist[sd->bl.m].flag.guildlock || maplist[sd->bl.m].flag.gvg_castle ) {
+ if( map->list[sd->bl.m].flag.guildlock || map->list[sd->bl.m].flag.gvg_castle ) {
clif->message(fd, msg_txt(1182)); // You cannot change guild leaders on this map.
return false;
}
@@ -5815,12 +5815,12 @@ ACMD(autolootitem)
*------------------------------------------*/
//ACMD(rain) {
// nullpo_retr(-1, sd);
-// if (maplist[sd->bl.m].flag.rain) {
-// maplist[sd->bl.m].flag.rain=0;
+// if (map->list[sd->bl.m].flag.rain) {
+// map->list[sd->bl.m].flag.rain=0;
// clif->weather(sd->bl.m);
// clif->message(fd, msg_txt(1201)); // The rain has stopped.
// } else {
-// maplist[sd->bl.m].flag.rain=1;
+// map->list[sd->bl.m].flag.rain=1;
// clif->weather(sd->bl.m);
// clif->message(fd, msg_txt(1202)); // It has started to rain.
// }
@@ -5832,12 +5832,12 @@ ACMD(autolootitem)
*------------------------------------------*/
ACMD(snow) {
nullpo_retr(-1, sd);
- if (maplist[sd->bl.m].flag.snow) {
- maplist[sd->bl.m].flag.snow=0;
+ if (map->list[sd->bl.m].flag.snow) {
+ map->list[sd->bl.m].flag.snow=0;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(1203)); // Snow has stopped falling.
} else {
- maplist[sd->bl.m].flag.snow=1;
+ map->list[sd->bl.m].flag.snow=1;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(1204)); // It has started to snow.
}
@@ -5850,12 +5850,12 @@ ACMD(snow) {
*------------------------------------------*/
ACMD(sakura) {
nullpo_retr(-1, sd);
- if (maplist[sd->bl.m].flag.sakura) {
- maplist[sd->bl.m].flag.sakura=0;
+ if (map->list[sd->bl.m].flag.sakura) {
+ map->list[sd->bl.m].flag.sakura=0;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(1205)); // Cherry tree leaves no longer fall.
} else {
- maplist[sd->bl.m].flag.sakura=1;
+ map->list[sd->bl.m].flag.sakura=1;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(1206)); // Cherry tree leaves have begun to fall.
}
@@ -5867,12 +5867,12 @@ ACMD(sakura) {
*------------------------------------------*/
ACMD(clouds) {
nullpo_retr(-1, sd);
- if (maplist[sd->bl.m].flag.clouds) {
- maplist[sd->bl.m].flag.clouds=0;
+ if (map->list[sd->bl.m].flag.clouds) {
+ map->list[sd->bl.m].flag.clouds=0;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(1207)); // The clouds has disappear.
} else {
- maplist[sd->bl.m].flag.clouds=1;
+ map->list[sd->bl.m].flag.clouds=1;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(1208)); // Clouds appear.
}
@@ -5885,12 +5885,12 @@ ACMD(clouds) {
*------------------------------------------*/
ACMD(clouds2) {
nullpo_retr(-1, sd);
- if (maplist[sd->bl.m].flag.clouds2) {
- maplist[sd->bl.m].flag.clouds2=0;
+ if (map->list[sd->bl.m].flag.clouds2) {
+ map->list[sd->bl.m].flag.clouds2=0;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(1209)); // The alternative clouds disappear.
} else {
- maplist[sd->bl.m].flag.clouds2=1;
+ map->list[sd->bl.m].flag.clouds2=1;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(1210)); // Alternative clouds appear.
}
@@ -5903,12 +5903,12 @@ ACMD(clouds2) {
*------------------------------------------*/
ACMD(fog) {
nullpo_retr(-1, sd);
- if (maplist[sd->bl.m].flag.fog) {
- maplist[sd->bl.m].flag.fog=0;
+ if (map->list[sd->bl.m].flag.fog) {
+ map->list[sd->bl.m].flag.fog=0;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(1211)); // The fog has gone.
} else {
- maplist[sd->bl.m].flag.fog=1;
+ map->list[sd->bl.m].flag.fog=1;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(1212)); // Fog hangs over.
}
@@ -5920,12 +5920,12 @@ ACMD(fog) {
*------------------------------------------*/
ACMD(leaves) {
nullpo_retr(-1, sd);
- if (maplist[sd->bl.m].flag.leaves) {
- maplist[sd->bl.m].flag.leaves=0;
+ if (map->list[sd->bl.m].flag.leaves) {
+ map->list[sd->bl.m].flag.leaves=0;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(1213)); // Leaves no longer fall.
} else {
- maplist[sd->bl.m].flag.leaves=1;
+ map->list[sd->bl.m].flag.leaves=1;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(1214)); // Fallen leaves fall.
}
@@ -5938,12 +5938,12 @@ ACMD(leaves) {
*------------------------------------------*/
ACMD(fireworks) {
nullpo_retr(-1, sd);
- if (maplist[sd->bl.m].flag.fireworks) {
- maplist[sd->bl.m].flag.fireworks=0;
+ if (map->list[sd->bl.m].flag.fireworks) {
+ map->list[sd->bl.m].flag.fireworks=0;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(1215)); // Fireworks have ended.
} else {
- maplist[sd->bl.m].flag.fireworks=1;
+ map->list[sd->bl.m].flag.fireworks=1;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(1216)); // Fireworks have launched.
}
@@ -5959,14 +5959,14 @@ ACMD(clearweather) {
/**
* No longer available, keeping here just in case it's back someday. [Ind]
**/
- //maplist[sd->bl.m].flag.rain=0;
- maplist[sd->bl.m].flag.snow=0;
- maplist[sd->bl.m].flag.sakura=0;
- maplist[sd->bl.m].flag.clouds=0;
- maplist[sd->bl.m].flag.clouds2=0;
- maplist[sd->bl.m].flag.fog=0;
- maplist[sd->bl.m].flag.fireworks=0;
- maplist[sd->bl.m].flag.leaves=0;
+ //map->list[sd->bl.m].flag.rain=0;
+ map->list[sd->bl.m].flag.snow=0;
+ map->list[sd->bl.m].flag.sakura=0;
+ map->list[sd->bl.m].flag.clouds=0;
+ map->list[sd->bl.m].flag.clouds2=0;
+ map->list[sd->bl.m].flag.fog=0;
+ map->list[sd->bl.m].flag.fireworks=0;
+ map->list[sd->bl.m].flag.leaves=0;
clif->weather(sd->bl.m);
clif->message(fd, msg_txt(291));
@@ -7238,7 +7238,7 @@ ACMD(whereis)
for (i = 0; i < ARRAYLENGTH(monster->spawn) && monster->spawn[i].qty; i++) {
j = map->mapindex2mapid(monster->spawn[i].mapindex);
if (j < 0) continue;
- snprintf(atcmd_output, sizeof atcmd_output, "%s (%d)", maplist[j].name, monster->spawn[i].qty);
+ snprintf(atcmd_output, sizeof atcmd_output, "%s (%d)", map->list[j].name, monster->spawn[i].qty);
clif->message(fd, atcmd_output);
}
if (i == 0)
@@ -7513,10 +7513,10 @@ ACMD(fakename)
* Ragnarok Resources
*------------------------------------------*/
ACMD(mapflag) {
-#define CHECKFLAG( cmd ) do { if ( maplist[ sd->bl.m ].flag.cmd ) clif->message(sd->fd,#cmd); } while(0)
+#define CHECKFLAG( cmd ) do { if ( map->list[ sd->bl.m ].flag.cmd ) clif->message(sd->fd,#cmd); } while(0)
#define SETFLAG( cmd ) do { \
if ( strcmp( flag_name , #cmd ) == 0 ) { \
- maplist[ sd->bl.m ].flag.cmd = flag; \
+ map->list[ sd->bl.m ].flag.cmd = flag; \
sprintf(atcmd_output,"[ @mapflag ] %s flag has been set to %s value = %hd",#cmd,flag?"On":"Off",flag); \
clif->message(sd->fd,atcmd_output); \
return true; \
@@ -7552,20 +7552,20 @@ ACMD(mapflag) {
for (i = 0; flag_name[i]; i++) flag_name[i] = TOLOWER(flag_name[i]); //lowercase
if ( strcmp( flag_name , "gvg" ) == 0 ) {
- if( flag && !maplist[sd->bl.m].flag.gvg )
- map->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_GVG_NAME));
- else if ( !flag && maplist[sd->bl.m].flag.gvg )
- map->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone);
+ if( flag && !map->list[sd->bl.m].flag.gvg )
+ map->zone_change2(sd->bl.m,strdb_get(map->zone_db, MAP_ZONE_GVG_NAME));
+ else if ( !flag && map->list[sd->bl.m].flag.gvg )
+ map->zone_change2(sd->bl.m,map->list[sd->bl.m].prev_zone);
} else if ( strcmp( flag_name , "pvp" ) == 0 ) {
- if( flag && !maplist[sd->bl.m].flag.pvp )
- map->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_PVP_NAME));
- else if ( !flag && maplist[sd->bl.m].flag.pvp )
- map->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone);
+ if( flag && !map->list[sd->bl.m].flag.pvp )
+ map->zone_change2(sd->bl.m,strdb_get(map->zone_db, MAP_ZONE_PVP_NAME));
+ else if ( !flag && map->list[sd->bl.m].flag.pvp )
+ map->zone_change2(sd->bl.m,map->list[sd->bl.m].prev_zone);
} else if ( strcmp( flag_name , "battleground" ) == 0 ) {
- if( flag && !maplist[sd->bl.m].flag.battleground )
- map->zone_change2(sd->bl.m,strdb_get(zone_db, MAP_ZONE_BG_NAME));
- else if ( !flag && maplist[sd->bl.m].flag.battleground )
- map->zone_change2(sd->bl.m,maplist[sd->bl.m].prev_zone);
+ if( flag && !map->list[sd->bl.m].flag.battleground )
+ map->zone_change2(sd->bl.m,strdb_get(map->zone_db, MAP_ZONE_BG_NAME));
+ else if ( !flag && map->list[sd->bl.m].flag.battleground )
+ map->zone_change2(sd->bl.m,map->list[sd->bl.m].prev_zone);
}
SETFLAG(autotrade); SETFLAG(allowks); SETFLAG(nomemo); SETFLAG(noteleport);
@@ -8004,11 +8004,11 @@ ACMD(ksprotection)
ACMD(allowks) {
nullpo_retr(-1,sd);
- if( maplist[sd->bl.m].flag.allowks ) {
- maplist[sd->bl.m].flag.allowks = 0;
+ if( map->list[sd->bl.m].flag.allowks ) {
+ map->list[sd->bl.m].flag.allowks = 0;
clif->message(fd, msg_txt(1330)); // [ Map K.S Protection Active ]
} else {
- maplist[sd->bl.m].flag.allowks = 1;
+ map->list[sd->bl.m].flag.allowks = 1;
clif->message(fd, msg_txt(1331)); // [ Map K.S Protection Inactive ]
}
return true;
@@ -8707,11 +8707,11 @@ ACMD(join) {
return false;
}
if( hChSys.local && strcmpi(name + 1, hChSys.local_name) == 0 ) {
- if( !maplist[sd->bl.m].channel ) {
+ if( !map->list[sd->bl.m].channel ) {
clif->chsys_mjoin(sd);
return true;
} else
- channel = maplist[sd->bl.m].channel;
+ channel = map->list[sd->bl.m].channel;
} else if( hChSys.ally && sd->status.guild_id && strcmpi(name + 1, hChSys.ally_name) == 0 ) {
struct guild *g = sd->guild;
if( !g ) return false;/* unlikely, but we wont let it crash anyway. */
@@ -8877,7 +8877,7 @@ ACMD(channel) {
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, maplist[sd->bl.m].channel ? db_size(maplist[sd->bl.m].channel->users) : 0);// - #%s ( %d users )
+ 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 )
clif->message(fd, atcmd_output);
}
if( hChSys.ally && sd->status.guild_id ) {
@@ -9815,7 +9815,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 ( maplist[sd->bl.m].nocommand && pc->get_group_level(sd) < maplist[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;
}
@@ -9938,9 +9938,9 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
clif->message(fd, msg_txt(1393)); // You can't use commands while dead
return true;
}
- for(i = 0; i < maplist[sd->bl.m].zone->disabled_commands_count; i++) {
- if( info->func == maplist[sd->bl.m].zone->disabled_commands[i]->cmd ) {
- if( pc->get_group_level(sd) < maplist[sd->bl.m].zone->disabled_commands[i]->group_lv ) {
+ 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 ) {
clif->colormes(sd->fd,COLOR_RED,"This command is disabled in this area");
return true;
} else
diff --git a/src/map/battle.c b/src/map/battle.c
index 98e132077..c79dee7ee 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -410,8 +410,8 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d
}
return damage*ratio/100;
}
-#ifdef RENEWAL
int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, struct weapon_atk *watk, int nk, bool n_ele, short s_ele, short s_ele_, int size, int type, int flag, int flag2){ // [malufett]
+#ifdef RENEWAL
int64 damage, eatk = 0;
struct status_change *sc;
struct map_session_data *sd;
@@ -470,8 +470,10 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u
damage = battle->calc_cardfix(BF_WEAPON, src, bl, nk, s_ele, s_ele_, damage, 0, flag2);
return damage;
-}
+#else
+ return 0;
#endif
+}
/*==========================================
* Calculates the standard damage of a normal attack assuming it hits,
* it calculates nothing extra fancy, is needed for magnum break's WATK_ELEMENT bonus. [Skotlex]
@@ -484,7 +486,7 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u
* &8: Skip target size adjustment (Extremity Fist?)
*&16: Arrow attack but BOW, REVOLVER, RIFLE, SHOTGUN, GATLING or GRENADE type weapon not equipped (i.e. shuriken, kunai and venom knives not affected by DEX)
*/
-#ifdef RENEWAL
+/* 'battle_calc_base_damage' is used on renewal, 'battle_calc_base_damage2' otherwise. */
int64 battle_calc_base_damage(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int nk, bool n_ele, short s_ele, short s_ele_, int type, int flag, int flag2) {
int64 damage, batk;
struct status_data *st = status->get_status_data(src);
@@ -495,8 +497,10 @@ int64 battle_calc_base_damage(struct block_list *src, struct block_list *bl, uin
damage = batk + 3 * battle->calc_weapon_damage(src, bl, skill_id, skill_lv, &st->lhw, nk, n_ele, s_ele, s_ele_, status_get_size(bl), type, flag, flag2) / 4;
else
damage = (batk << 1) + battle->calc_weapon_damage(src, bl, skill_id, skill_lv, &st->rhw, nk, n_ele, s_ele, s_ele_, status_get_size(bl), type, flag, flag2);
-#else
-static int64 battle_calc_base_damage(struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag) {
+
+ return damage;
+}
+int64 battle_calc_base_damage2(struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag) {
unsigned int atkmin=0, atkmax=0;
short type = 0;
int64 damage = 0;
@@ -572,7 +576,6 @@ static int64 battle_calc_base_damage(struct status_data *st, struct weapon_atk *
damage += damage * sd->weapon_atk_rate[sd->weapontype1] / 100;
}
}
-#endif
return damage;
}
@@ -791,7 +794,7 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target,
damage += 4;
if(sd->status.party_id && (skill2_lv=pc->checkskill(sd,TK_POWER)) > 0) {
- if( (i = party_foreachsamemap(party->sub_count, sd, 0)) > 1 )
+ if( (i = party->foreachsamemap(party->sub_count, sd, 0)) > 1 )
damage += 2 * skill2_lv * i * (damage /*+ unknown value*/) / 100 /*+ unknown value*/;
}
#else
@@ -805,7 +808,7 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target,
i = 2; //Star anger
else
ARR_FIND(0, MAX_PC_FEELHATE, i, status->get_class(target) == sd->hate_mob[i]);
- if ( i < MAX_PC_FEELHATE && (skill2_lv=pc->checkskill(sd,sg_info[i].anger_id)) && weapon ) {
+ if ( i < MAX_PC_FEELHATE && (skill2_lv=pc->checkskill(sd,pc->sg_info[i].anger_id)) && weapon ) {
int ratio = sd->status.base_level + status_get_dex(src) + status_get_luk(src);
if ( i == 2 ) ratio += status_get_str(src); //Star Anger
if (skill2_lv < 4 )
@@ -856,10 +859,10 @@ int64 battle_calc_elefix(struct block_list *src, struct block_list *target, uint
sc = status->get_sc(src);
if( sc && sc->data[SC_SUB_WEAPONPROPERTY] ) { // Descriptions indicate this means adding a percent of a normal attack in another element. [Skotlex]
- int64 temp = battle->calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, BL_CAST(BL_PC, src), (flag?2:0)) * sc->data[SC_SUB_WEAPONPROPERTY]->val2 / 100;
+ int64 temp = battle->calc_base_damage2(sstatus, &sstatus->rhw, sc, tstatus->size, BL_CAST(BL_PC, src), (flag?2:0)) * sc->data[SC_SUB_WEAPONPROPERTY]->val2 / 100;
damage += battle->attr_fix(src, target, temp, sc->data[SC_SUB_WEAPONPROPERTY]->val1, tstatus->def_ele, tstatus->ele_lv);
if( left ) {
- temp = battle->calc_base_damage(sstatus, &sstatus->lhw, sc, tstatus->size, BL_CAST(BL_PC, src), (flag?2:0)) * sc->data[SC_SUB_WEAPONPROPERTY]->val2 / 100;
+ temp = battle->calc_base_damage2(sstatus, &sstatus->lhw, sc, tstatus->size, BL_CAST(BL_PC, src), (flag?2:0)) * sc->data[SC_SUB_WEAPONPROPERTY]->val2 / 100;
damage += battle->attr_fix(src, target, temp, sc->data[SC_SUB_WEAPONPROPERTY]->val1, tstatus->def_ele, tstatus->ele_lv);
}
}
@@ -1556,7 +1559,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
c = 0;
memset (p_sd, 0, sizeof(p_sd));
- party_foreachsamemap(skill->check_condition_char_sub, sd, 3, &sd->bl, &c, &p_sd, skill_id);
+ party->foreachsamemap(skill->check_condition_char_sub, sd, 3, &sd->bl, &c, &p_sd, skill_id);
c = ( c > 1 ? rand()%c : 0 );
if( (psd = map->id2sd(p_sd[c])) && pc->checkskill(psd,WL_COMET) > 0 ){
@@ -3003,16 +3006,16 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
default:
if (flag & BF_SKILL) { //Skills get a different reduction than non-skills. [Skotlex]
if (flag&BF_WEAPON)
- damage = damage * maplist[bl->m].weapon_damage_rate / 100;
+ damage = damage * map->list[bl->m].weapon_damage_rate / 100;
if (flag&BF_MAGIC)
- damage = damage * maplist[bl->m].magic_damage_rate / 100;
+ damage = damage * map->list[bl->m].magic_damage_rate / 100;
if (flag&BF_MISC)
- damage = damage * maplist[bl->m].misc_damage_rate / 100;
+ damage = damage * map->list[bl->m].misc_damage_rate / 100;
} else { //Normal attacks get reductions based on range.
if (flag & BF_SHORT)
- damage = damage * maplist[bl->m].short_damage_rate / 100;
+ damage = damage * map->list[bl->m].short_damage_rate / 100;
if (flag & BF_LONG)
- damage = damage * maplist[bl->m].long_damage_rate / 100;
+ damage = damage * map->list[bl->m].long_damage_rate / 100;
}
if(!damage) damage = 1;
break;
@@ -3178,12 +3181,12 @@ int battle_range_type(struct block_list *src, struct block_list *target, uint16
return BF_LONG;
}
int battle_adjust_skill_damage(int m, unsigned short skill_id) {
- if( maplist[m].skill_count ) {
+ if( map->list[m].skill_count ) {
int i;
- ARR_FIND(0, maplist[m].skill_count, i, maplist[m].skills[i]->skill_id == skill_id );
+ ARR_FIND(0, map->list[m].skill_count, i, map->list[m].skills[i]->skill_id == skill_id );
- if( i < maplist[m].skill_count ) {
- return maplist[m].skills[i]->modifier;
+ if( i < map->list[m].skill_count ) {
+ return map->list[m].skills[i]->modifier;
}
}
@@ -3402,18 +3405,18 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
}
#ifndef HMAP_ZONE_DAMAGE_CAP_TYPE
if( target && skill_id ) {
- for(i = 0; i < maplist[target->m].zone->capped_skills_count; i++) {
- if( skill_id == maplist[target->m].zone->capped_skills[i]->nameid && (maplist[target->m].zone->capped_skills[i]->type & target->type) ) {
- if( target->type == BL_MOB && maplist[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) {
- if( (((TBL_MOB*)target)->status.mode&MD_BOSS) && !(maplist[target->m].zone->disabled_skills[i]->subtype&MZS_BOSS) )
+ for(i = 0; i < map->list[target->m].zone->capped_skills_count; i++) {
+ if( skill_id == map->list[target->m].zone->capped_skills[i]->nameid && (map->list[target->m].zone->capped_skills[i]->type & target->type) ) {
+ if( target->type == BL_MOB && map->list[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) {
+ if( (((TBL_MOB*)target)->status.mode&MD_BOSS) && !(map->list[target->m].zone->disabled_skills[i]->subtype&MZS_BOSS) )
continue;
- if( ((TBL_MOB*)target)->special_state.clone && !(maplist[target->m].zone->disabled_skills[i]->subtype&MZS_CLONE) )
+ if( ((TBL_MOB*)target)->special_state.clone && !(map->list[target->m].zone->disabled_skills[i]->subtype&MZS_CLONE) )
continue;
}
- if( ad.damage > maplist[target->m].zone->capped_skills[i]->cap )
- ad.damage = maplist[target->m].zone->capped_skills[i]->cap;
- if( ad.damage2 > maplist[target->m].zone->capped_skills[i]->cap )
- ad.damage2 = maplist[target->m].zone->capped_skills[i]->cap;
+ if( ad.damage > map->list[target->m].zone->capped_skills[i]->cap )
+ ad.damage = map->list[target->m].zone->capped_skills[i]->cap;
+ if( ad.damage2 > map->list[target->m].zone->capped_skills[i]->cap )
+ ad.damage2 = map->list[target->m].zone->capped_skills[i]->cap;
break;
}
}
@@ -3498,7 +3501,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
ad.damage=battle->calc_damage(src,target,&ad,ad.damage,skill_id,skill_lv);
if( map_flag_gvg2(target->m) )
ad.damage=battle->calc_gvg_damage(src,target,ad.damage,ad.div_,skill_id,skill_lv,ad.flag);
- else if( maplist[target->m].flag.battleground )
+ else if( map->list[target->m].flag.battleground )
ad.damage=battle->calc_bg_damage(src,target,ad.damage,ad.div_,skill_id,skill_lv,ad.flag);
switch( skill_id ) { /* post-calc modifiers */
@@ -3844,18 +3847,18 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
}
#ifndef HMAP_ZONE_DAMAGE_CAP_TYPE
if( target && skill_id ) {
- for(i = 0; i < maplist[target->m].zone->capped_skills_count; i++) {
- if( skill_id == maplist[target->m].zone->capped_skills[i]->nameid && (maplist[target->m].zone->capped_skills[i]->type & target->type) ) {
- if( target->type == BL_MOB && maplist[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) {
- if( (((TBL_MOB*)target)->status.mode&MD_BOSS) && !(maplist[target->m].zone->disabled_skills[i]->subtype&MZS_BOSS) )
+ for(i = 0; i < map->list[target->m].zone->capped_skills_count; i++) {
+ if( skill_id == map->list[target->m].zone->capped_skills[i]->nameid && (map->list[target->m].zone->capped_skills[i]->type & target->type) ) {
+ if( target->type == BL_MOB && map->list[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) {
+ if( (((TBL_MOB*)target)->status.mode&MD_BOSS) && !(map->list[target->m].zone->disabled_skills[i]->subtype&MZS_BOSS) )
continue;
- if( ((TBL_MOB*)target)->special_state.clone && !(maplist[target->m].zone->disabled_skills[i]->subtype&MZS_CLONE) )
+ if( ((TBL_MOB*)target)->special_state.clone && !(map->list[target->m].zone->disabled_skills[i]->subtype&MZS_CLONE) )
continue;
}
- if( md.damage > maplist[target->m].zone->capped_skills[i]->cap )
- md.damage = maplist[target->m].zone->capped_skills[i]->cap;
- if( md.damage2 > maplist[target->m].zone->capped_skills[i]->cap )
- md.damage2 = maplist[target->m].zone->capped_skills[i]->cap;
+ if( md.damage > map->list[target->m].zone->capped_skills[i]->cap )
+ md.damage = map->list[target->m].zone->capped_skills[i]->cap;
+ if( md.damage2 > map->list[target->m].zone->capped_skills[i]->cap )
+ md.damage2 = map->list[target->m].zone->capped_skills[i]->cap;
break;
}
}
@@ -3896,7 +3899,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
md.damage=battle->calc_damage(src,target,&md,md.damage,skill_id,skill_lv);
if( map_flag_gvg2(target->m) )
md.damage=battle->calc_gvg_damage(src,target,md.damage,md.div_,skill_id,skill_lv,md.flag);
- else if( maplist[target->m].flag.battleground )
+ else if( map->list[target->m].flag.battleground )
md.damage=battle->calc_bg_damage(src,target,md.damage,md.div_,skill_id,skill_lv,md.flag);
switch( skill_id ) {
@@ -4514,9 +4517,9 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
wd.damage2 = battle->calc_masteryfix(src, target, skill_id, skill_lv, wd.damage2, wd.div_, 1, flag.weapon);
}
#else
- wd.damage = battle->calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, sd, i);
+ wd.damage = battle->calc_base_damage2(sstatus, &sstatus->rhw, sc, tstatus->size, sd, i);
if (flag.lh)
- wd.damage2 = battle->calc_base_damage(sstatus, &sstatus->lhw, sc, tstatus->size, sd, i);
+ wd.damage2 = battle->calc_base_damage2(sstatus, &sstatus->lhw, sc, tstatus->size, sd, i);
#endif
if (nk&NK_SPLASHSPLIT){ // Divide ATK among targets
if(wflag>0)
@@ -4534,7 +4537,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
#ifndef RENEWAL
if(sd->status.party_id && (temp=pc->checkskill(sd,TK_POWER)) > 0){
- if( (i = party_foreachsamemap(party->sub_count, sd, 0)) > 1 ) // exclude the player himself [Inkfish]
+ if( (i = party->foreachsamemap(party->sub_count, sd, 0)) > 1 ) // exclude the player himself [Inkfish]
ATK_ADDRATE(2*temp*i);
}
#endif
@@ -4859,18 +4862,18 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
return wd; //Enough, rest is not needed.
#ifndef HMAP_ZONE_DAMAGE_CAP_TYPE
if( target && skill_id ) {
- for(i = 0; i < maplist[target->m].zone->capped_skills_count; i++) {
- if( skill_id == maplist[target->m].zone->capped_skills[i]->nameid && (maplist[target->m].zone->capped_skills[i]->type & target->type) ) {
- if( target->type == BL_MOB && maplist[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) {
- if( (((TBL_MOB*)target)->status.mode&MD_BOSS) && !(maplist[target->m].zone->disabled_skills[i]->subtype&MZS_BOSS) )
+ for(i = 0; i < map->list[target->m].zone->capped_skills_count; i++) {
+ if( skill_id == map->list[target->m].zone->capped_skills[i]->nameid && (map->list[target->m].zone->capped_skills[i]->type & target->type) ) {
+ if( target->type == BL_MOB && map->list[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) {
+ if( (((TBL_MOB*)target)->status.mode&MD_BOSS) && !(map->list[target->m].zone->disabled_skills[i]->subtype&MZS_BOSS) )
continue;
- if( ((TBL_MOB*)target)->special_state.clone && !(maplist[target->m].zone->disabled_skills[i]->subtype&MZS_CLONE) )
+ if( ((TBL_MOB*)target)->special_state.clone && !(map->list[target->m].zone->disabled_skills[i]->subtype&MZS_CLONE) )
continue;
}
- if( wd.damage > maplist[target->m].zone->capped_skills[i]->cap )
- wd.damage = maplist[target->m].zone->capped_skills[i]->cap;
- if( wd.damage2 > maplist[target->m].zone->capped_skills[i]->cap )
- wd.damage2 = maplist[target->m].zone->capped_skills[i]->cap;
+ if( wd.damage > map->list[target->m].zone->capped_skills[i]->cap )
+ wd.damage = map->list[target->m].zone->capped_skills[i]->cap;
+ if( wd.damage2 > map->list[target->m].zone->capped_skills[i]->cap )
+ wd.damage2 = map->list[target->m].zone->capped_skills[i]->cap;
break;
}
}
@@ -5047,13 +5050,13 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
wd.damage = battle->calc_damage(src,target,&wd,wd.damage,skill_id,skill_lv);
if( map_flag_gvg2(target->m) )
wd.damage=battle->calc_gvg_damage(src,target,wd.damage,wd.div_,skill_id,skill_lv,wd.flag);
- else if( maplist[target->m].flag.battleground )
+ else if( map->list[target->m].flag.battleground )
wd.damage=battle->calc_bg_damage(src,target,wd.damage,wd.div_,skill_id,skill_lv,wd.flag);
} else if(!wd.damage) {
wd.damage2 = battle->calc_damage(src,target,&wd,wd.damage2,skill_id,skill_lv);
if( map_flag_gvg2(target->m) )
wd.damage2 = battle->calc_gvg_damage(src,target,wd.damage2,wd.div_,skill_id,skill_lv,wd.flag);
- else if( maplist[target->m].flag.battleground )
+ else if( map->list[target->m].flag.battleground )
wd.damage = battle->calc_bg_damage(src,target,wd.damage2,wd.div_,skill_id,skill_lv,wd.flag);
} else {
#ifdef RENEWAL
@@ -5065,7 +5068,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
#endif
if( map_flag_gvg2(target->m) )
wd.damage = battle->calc_gvg_damage(src,target,wd.damage,wd.div_,skill_id,skill_lv,wd.flag);
- else if( maplist[target->m].flag.battleground )
+ else if( map->list[target->m].flag.battleground )
wd.damage = battle->calc_bg_damage(src,target,wd.damage,wd.div_,skill_id,skill_lv,wd.flag);
#ifndef RENEWAL
wd.damage2 = d2*100/d1 * wd.damage/100;
@@ -5118,18 +5121,18 @@ struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct bl
#ifdef HMAP_ZONE_DAMAGE_CAP_TYPE
if( target && skill_id ) {
int i;
- for(i = 0; i < maplist[target->m].zone->capped_skills_count; i++) {
- if( skill_id == maplist[target->m].zone->capped_skills[i]->nameid && (maplist[target->m].zone->capped_skills[i]->type & target->type) ) {
- if( target->type == BL_MOB && maplist[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) {
- if( (((TBL_MOB*)target)->status.mode&MD_BOSS) && !(maplist[target->m].zone->disabled_skills[i]->subtype&MZS_BOSS) )
+ for(i = 0; i < map->list[target->m].zone->capped_skills_count; i++) {
+ if( skill_id == map->list[target->m].zone->capped_skills[i]->nameid && (map->list[target->m].zone->capped_skills[i]->type & target->type) ) {
+ if( target->type == BL_MOB && map->list[target->m].zone->capped_skills[i]->subtype != MZS_NONE ) {
+ if( (((TBL_MOB*)target)->status.mode&MD_BOSS) && !(map->list[target->m].zone->disabled_skills[i]->subtype&MZS_BOSS) )
continue;
- if( ((TBL_MOB*)target)->special_state.clone && !(maplist[target->m].zone->disabled_skills[i]->subtype&MZS_CLONE) )
+ if( ((TBL_MOB*)target)->special_state.clone && !(map->list[target->m].zone->disabled_skills[i]->subtype&MZS_CLONE) )
continue;
}
- if( d.damage > maplist[target->m].zone->capped_skills[i]->cap )
- d.damage = maplist[target->m].zone->capped_skills[i]->cap;
- if( d.damage2 > maplist[target->m].zone->capped_skills[i]->cap )
- d.damage2 = maplist[target->m].zone->capped_skills[i]->cap;
+ if( d.damage > map->list[target->m].zone->capped_skills[i]->cap )
+ d.damage = map->list[target->m].zone->capped_skills[i]->cap;
+ if( d.damage2 > map->list[target->m].zone->capped_skills[i]->cap )
+ d.damage2 = map->list[target->m].zone->capped_skills[i]->cap;
break;
}
}
@@ -5801,7 +5804,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
switch( battle->get_current_skill(src) ) {
case RK_DRAGONBREATH:// it can only hit traps in pvp/gvg maps
case RK_DRAGONBREATH_WATER:
- if( !maplist[m].flag.pvp && !maplist[m].flag.gvg )
+ if( !map->list[m].flag.pvp && !map->list[m].flag.gvg )
break;
case 0://you can hit them without skills
case MA_REMOVETRAP:
@@ -5886,7 +5889,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
{
struct mob_data *md = BL_CAST(BL_MOB, t_bl);
- if( !((map->agit_flag || map->agit2_flag) && maplist[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )
+ if( !((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )
return 0; // Disable guardians/emperiums owned by Guilds on non-woe times.
break;
}
@@ -5929,7 +5932,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
state |= BCT_ENEMY; // Can kill anything
strip_enemy = 0;
} else if( sd->duel_group
- && !((!battle_config.duel_allow_pvp && maplist[m].flag.pvp) || (!battle_config.duel_allow_gvg && map_flag_gvg(m)))
+ && !((!battle_config.duel_allow_pvp && map->list[m].flag.pvp) || (!battle_config.duel_allow_gvg && map_flag_gvg(m)))
) {
if( t_bl->type == BL_PC && (sd->duel_group == ((TBL_PC*)t_bl)->duel_group) )
return (BCT_ENEMY&flag)?1:-1; // Duel targets can ONLY be your enemy, nothing else.
@@ -5946,7 +5949,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
case BL_MOB:
{
struct mob_data *md = BL_CAST(BL_MOB, s_bl);
- if( !((map->agit_flag || map->agit2_flag) && maplist[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )
+ if( !((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )
return 0; // Disable guardians/emperium owned by Guilds on non-woe times.
if( !md->special_state.ai )
@@ -5994,16 +5997,16 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if( map_flag_vs(m) ) {
//Check rivalry settings.
int sbg_id = 0, tbg_id = 0;
- if( maplist[m].flag.battleground ) {
+ if( map->list[m].flag.battleground ) {
sbg_id = bg->team_get_id(s_bl);
tbg_id = bg->team_get_id(t_bl);
}
if( flag&(BCT_PARTY|BCT_ENEMY) ) {
int s_party = status->get_party_id(s_bl);
if( s_party && s_party == status->get_party_id(t_bl)
- && !(maplist[m].flag.pvp && maplist[m].flag.pvp_noparty)
- && !(map_flag_gvg(m) && maplist[m].flag.gvg_noparty)
- && (!maplist[m].flag.battleground || sbg_id == tbg_id) )
+ && !(map->list[m].flag.pvp && map->list[m].flag.pvp_noparty)
+ && !(map_flag_gvg(m) && map->list[m].flag.gvg_noparty)
+ && (!map->list[m].flag.battleground || sbg_id == tbg_id) )
state |= BCT_PARTY;
else
state |= BCT_ENEMY;
@@ -6011,15 +6014,15 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if( flag&(BCT_GUILD|BCT_ENEMY) ) {
int s_guild = status->get_guild_id(s_bl);
int t_guild = status->get_guild_id(t_bl);
- if( !(maplist[m].flag.pvp && maplist[m].flag.pvp_noguild)
+ if( !(map->list[m].flag.pvp && map->list[m].flag.pvp_noguild)
&& s_guild && t_guild
&& (s_guild == t_guild || (!(flag&BCT_SAMEGUILD) && guild->isallied(s_guild, t_guild)))
- && (!maplist[m].flag.battleground || sbg_id == tbg_id) )
+ && (!map->list[m].flag.battleground || sbg_id == tbg_id) )
state |= BCT_GUILD;
else
state |= BCT_ENEMY;
}
- if( state&BCT_ENEMY && maplist[m].flag.battleground && sbg_id && sbg_id == tbg_id )
+ if( state&BCT_ENEMY && map->list[m].flag.battleground && sbg_id && sbg_id == tbg_id )
state &= ~BCT_ENEMY;
if( state&BCT_ENEMY && battle_config.pk_mode && !map_flag_gvg(m) && s_bl->type == BL_PC && t_bl->type == BL_PC )
@@ -6784,9 +6787,7 @@ void battle_defaults(void) {
battle->calc_masteryfix = battle_calc_masteryfix;
battle->calc_skillratio = battle_calc_skillratio;
battle->calc_sizefix = battle_calc_sizefix;
-#ifdef RENEWAL
battle->calc_weapon_damage = battle_calc_weapon_damage;
-#endif
battle->calc_defense = battle_calc_defense;
battle->get_master = battle_get_master;
battle->get_targeted = battle_gettargeted;
@@ -6804,6 +6805,7 @@ void battle_defaults(void) {
battle->blewcount_bonus = battle_blewcount_bonus;
battle->range_type = battle_range_type;
battle->calc_base_damage = battle_calc_base_damage;
+ battle->calc_base_damage2 = battle_calc_base_damage2;
battle->calc_misc_attack = battle_calc_misc_attack;
battle->calc_magic_attack = battle_calc_magic_attack;
battle->adjust_skill_damage = battle_adjust_skill_damage;
diff --git a/src/map/battle.h b/src/map/battle.h
index 8878962b8..6d5d5f186 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -523,10 +523,8 @@ struct battle_interface {
int (*calc_skillratio) (int attack_type, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int skillratio, int flag);
/* applies size modifiers */
int64 (*calc_sizefix) (struct map_session_data *sd, int64 damage, int type, int size, bool ignore);
-#ifdef RENEWAL
/* get weapon damage */
int64 (*calc_weapon_damage) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, struct weapon_atk *watk, int nk, bool n_ele, short s_ele, short s_ele_, int size, int type, int flag, int flag2);
-#endif
/* applies defense reductions */
int64 (*calc_defense) (int attack_type, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int flag, int pdef);
/* get master (who does this unit respond to?) */
@@ -554,12 +552,8 @@ struct battle_interface {
int (*blewcount_bonus) (struct map_session_data *sd, uint16 skill_id);
/* skill range criteria */
int (*range_type) (struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv);
- int64 (*calc_base_damage)
-#ifdef RENEWAL
- (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int nk, bool n_ele, short s_ele, short s_ele_, int type, int flag, int flag2);
-#else
- (struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag);
-#endif
+ int64 (*calc_base_damage) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int nk, bool n_ele, short s_ele, short s_ele_, int type, int flag, int flag2);
+ int64 (*calc_base_damage2) (struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag);
struct Damage (*calc_misc_attack) (struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int mflag);
struct Damage (*calc_magic_attack) (struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int mflag);
int (*adjust_skill_damage) (int m, unsigned short skill_id);
diff --git a/src/map/battleground.c b/src/map/battleground.c
index 160d2f96e..e7fe4085b 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -91,8 +91,8 @@ int bg_team_join(int bg_id, struct map_session_data *sd) {
bgd->members[i].x = sd->bl.x;
bgd->members[i].y = sd->bl.y;
/* populate 'where i came from' */
- if(maplist[sd->bl.m].flag.nosave || maplist[sd->bl.m].instance_id >= 0) {
- struct map_data *m=&maplist[sd->bl.m];
+ if(map->list[sd->bl.m].flag.nosave || map->list[sd->bl.m].instance_id >= 0) {
+ struct map_data *m=&map->list[sd->bl.m];
if(m->save.map)
memcpy(&bgd->members[i].source,&m->save,sizeof(struct point));
else
diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c
index 92bf9b869..2a9e6a88e 100644
--- a/src/map/buyingstore.c
+++ b/src/map/buyingstore.c
@@ -34,7 +34,7 @@ bool buyingstore_setup(struct map_session_data* sd, unsigned char slots)
return false;
}
- if( maplist[sd->bl.m].flag.novending ) {
+ if( map->list[sd->bl.m].flag.novending ) {
// custom: no vending maps
clif->message(sd->fd, msg_txt(276)); // "You can't open a shop on this map"
return false;
@@ -89,7 +89,7 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha
return;
}
- if( maplist[sd->bl.m].flag.novending ) {
+ if( map->list[sd->bl.m].flag.novending ) {
// custom: no vending maps
clif->message(sd->fd, msg_txt(276)); // "You can't open a shop on this map"
return;
diff --git a/src/map/chat.c b/src/map/chat.c
index d6fad4d94..187d40337 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -80,7 +80,7 @@ int chat_createpcchat(struct map_session_data* sd, const char* title, const char
return 0;
}
- if( maplist[sd->bl.m].flag.nochat ) {
+ if( map->list[sd->bl.m].flag.nochat ) {
clif->message(sd->fd, msg_txt(281));
return 0; //Can't create chatrooms on this map.
}
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 829dc22b9..01af69fbf 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -1076,14 +1076,14 @@ int chrif_recvfamelist(int fd) {
int num, size;
int total = 0, len = 8;
- memset(smith_fame_list, 0, sizeof(smith_fame_list));
- memset(chemist_fame_list, 0, sizeof(chemist_fame_list));
- memset(taekwon_fame_list, 0, sizeof(taekwon_fame_list));
+ memset(pc->smith_fame_list, 0, sizeof(pc->smith_fame_list));
+ memset(pc->chemist_fame_list, 0, sizeof(pc->chemist_fame_list));
+ memset(pc->taekwon_fame_list, 0, sizeof(pc->taekwon_fame_list));
size = RFIFOW(fd, 6); //Blacksmith block size
for (num = 0; len < size && num < MAX_FAME_LIST; num++) {
- memcpy(&smith_fame_list[num], RFIFOP(fd,len), sizeof(struct fame_list));
+ memcpy(&pc->smith_fame_list[num], RFIFOP(fd,len), sizeof(struct fame_list));
len += sizeof(struct fame_list);
}
@@ -1092,7 +1092,7 @@ int chrif_recvfamelist(int fd) {
size = RFIFOW(fd, 4); //Alchemist block size
for (num = 0; len < size && num < MAX_FAME_LIST; num++) {
- memcpy(&chemist_fame_list[num], RFIFOP(fd,len), sizeof(struct fame_list));
+ memcpy(&pc->chemist_fame_list[num], RFIFOP(fd,len), sizeof(struct fame_list));
len += sizeof(struct fame_list);
}
@@ -1101,7 +1101,7 @@ int chrif_recvfamelist(int fd) {
size = RFIFOW(fd, 2); //Total packet length
for (num = 0; len < size && num < MAX_FAME_LIST; num++) {
- memcpy(&taekwon_fame_list[num], RFIFOP(fd,len), sizeof(struct fame_list));
+ memcpy(&pc->taekwon_fame_list[num], RFIFOP(fd,len), sizeof(struct fame_list));
len += sizeof(struct fame_list);
}
@@ -1119,9 +1119,9 @@ int chrif_updatefamelist_ack(int fd) {
uint8 index;
switch (RFIFOB(fd,2)) {
- case RANKTYPE_BLACKSMITH: list = smith_fame_list; break;
- case RANKTYPE_ALCHEMIST: list = chemist_fame_list; break;
- case RANKTYPE_TAEKWON: list = taekwon_fame_list; break;
+ case RANKTYPE_BLACKSMITH: list = pc->smith_fame_list; break;
+ case RANKTYPE_ALCHEMIST: list = pc->chemist_fame_list; break;
+ case RANKTYPE_TAEKWON: list = pc->taekwon_fame_list; break;
default: return 0;
}
diff --git a/src/map/clif.c b/src/map/clif.c
index ed75e9aa0..357c4dc6a 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -860,9 +860,9 @@ static int clif_setlevel(struct block_list* bl) {
}
return lv;
}
-#if PACKETVER < 20091103
/* for 'packetver < 20091103' 0x78 non-pc-looking unit handling */
void clif_set_unit_idle2(struct block_list* bl, struct map_session_data *tsd, enum send_target target) {
+#if PACKETVER < 20091103
struct map_session_data* sd;
struct status_change* sc = status->get_sc(bl);
struct view_data* vd = status->get_viewdata(bl);
@@ -907,8 +907,10 @@ void clif_set_unit_idle2(struct block_list* bl, struct map_session_data *tsd, en
p.clevel = clif_setlevel(bl);
clif->send(&p,sizeof(p),tsd?&tsd->bl:bl,target);
-}
+#else
+ return;
#endif
+}
/*==========================================
* Prepares 'unit standing' packet
*------------------------------------------*/
@@ -996,9 +998,9 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu
}
}
-#if PACKETVER < 20091103
/* for 'packetver < 20091103' 0x7c non-pc-looking unit handling */
void clif_spawn_unit2(struct block_list* bl, enum send_target target) {
+#if PACKETVER < 20091103
struct map_session_data* sd;
struct status_change* sc = status->get_sc(bl);
struct view_data* vd = status->get_viewdata(bl);
@@ -1037,8 +1039,10 @@ void clif_spawn_unit2(struct block_list* bl, enum send_target target) {
p.xSize = p.ySize = (sd) ? 5 : 0;
clif->send(&p,sizeof(p),bl,target);
-}
+#else
+ return;
#endif
+}
void clif_spawn_unit(struct block_list* bl, enum send_target target) {
struct map_session_data* sd;
struct status_change* sc = status->get_sc(bl);
@@ -1251,22 +1255,22 @@ void clif_weather_check(struct map_session_data *sd) {
int16 m = sd->bl.m;
int fd = sd->fd;
- if (maplist[m].flag.snow)
+ if (map->list[m].flag.snow)
clif->specialeffect_single(&sd->bl, 162, fd);
- if (maplist[m].flag.clouds)
+ if (map->list[m].flag.clouds)
clif->specialeffect_single(&sd->bl, 233, fd);
- if (maplist[m].flag.clouds2)
+ if (map->list[m].flag.clouds2)
clif->specialeffect_single(&sd->bl, 516, fd);
- if (maplist[m].flag.fog)
+ if (map->list[m].flag.fog)
clif->specialeffect_single(&sd->bl, 515, fd);
- if (maplist[m].flag.fireworks) {
+ if (map->list[m].flag.fireworks) {
clif->specialeffect_single(&sd->bl, 297, fd);
clif->specialeffect_single(&sd->bl, 299, fd);
clif->specialeffect_single(&sd->bl, 301, fd);
}
- if (maplist[m].flag.sakura)
+ if (map->list[m].flag.sakura)
clif->specialeffect_single(&sd->bl, 163, fd);
- if (maplist[m].flag.leaves)
+ if (map->list[m].flag.leaves)
clif->specialeffect_single(&sd->bl, 333, fd);
}
/**
@@ -1319,10 +1323,10 @@ int clif_spawn(struct block_list *bl)
clif->specialeffect(bl,423,AREA);
else if(sd->state.size==SZ_MEDIUM)
clif->specialeffect(bl,421,AREA);
- if( sd->bg_id && maplist[sd->bl.m].flag.battleground )
+ if( sd->bg_id && map->list[sd->bl.m].flag.battleground )
clif->sendbgemblem_area(sd);
for( i = 0; i < sd->sc_display_count; i++ ) {
- clif->sc_load(&sd->bl, sd->bl.id,AREA,StatusIconChangeTable[sd->sc_display[i]->type],sd->sc_display[i]->val1,sd->sc_display[i]->val2,sd->sc_display[i]->val3);
+ clif->sc_load(&sd->bl, sd->bl.id,AREA,status->IconChangeTable[sd->sc_display[i]->type],sd->sc_display[i]->val1,sd->sc_display[i]->val2,sd->sc_display[i]->val3);
}
for(i = 1; i < 5; i++){
if( sd->charm[i] > 0 )
@@ -1638,7 +1642,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(maplist[m].custom_name ? maplist[maplist[m].instance_src_map].name : maplist[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));
@@ -4283,7 +4287,7 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds
clif->charm_single(sd->fd, dstsd, i);
}
for( i = 0; i < dstsd->sc_display_count; i++ ) {
- clif->sc_load(&sd->bl,dstsd->bl.id,SELF,StatusIconChangeTable[dstsd->sc_display[i]->type],dstsd->sc_display[i]->val1,dstsd->sc_display[i]->val2,dstsd->sc_display[i]->val3);
+ clif->sc_load(&sd->bl,dstsd->bl.id,SELF,status->IconChangeTable[dstsd->sc_display[i]->type],dstsd->sc_display[i]->val1,dstsd->sc_display[i]->val2,dstsd->sc_display[i]->val3);
}
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
@@ -4332,7 +4336,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) {
clif->specialeffect_single(bl,423,sd->fd);
else if(tsd->state.size==SZ_MEDIUM)
clif->specialeffect_single(bl,421,sd->fd);
- if( tsd->bg_id && maplist[tsd->bl.m].flag.battleground )
+ if( tsd->bg_id && map->list[tsd->bl.m].flag.battleground )
clif->sendbgemblem_single(sd->fd,tsd);
if ( tsd->status.robe )
clif->refreshlook(&sd->bl,bl->id,LOOK_ROBE,tsd->status.robe,SELF);
@@ -4574,7 +4578,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(maplist[m].custom_name ? maplist[maplist[m].instance_src_map].name : maplist[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));
@@ -6525,7 +6529,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(maplist[sd->bl.m].custom_name ? maplist[maplist[sd->bl.m].instance_src_map].name : maplist[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);
@@ -9286,24 +9290,24 @@ void clif_parse_WantToConnection(int fd, struct map_session_data* sd) {
chrif->authreq(sd);
}
void clif_hercules_chsys_mjoin(struct map_session_data *sd) {
- if( !maplist[sd->bl.m].channel ) {
- CREATE(maplist[sd->bl.m].channel, struct hChSysCh , 1);
- safestrncpy(maplist[sd->bl.m].channel->name, hChSys.local_name, HCHSYS_NAME_LENGTH);
- maplist[sd->bl.m].channel->type = hChSys_MAP;
- maplist[sd->bl.m].channel->m = sd->bl.m;
+ if( !map->list[sd->bl.m].channel ) {
+ CREATE(map->list[sd->bl.m].channel, struct hChSysCh , 1);
+ safestrncpy(map->list[sd->bl.m].channel->name, hChSys.local_name, HCHSYS_NAME_LENGTH);
+ map->list[sd->bl.m].channel->type = hChSys_MAP;
+ map->list[sd->bl.m].channel->m = sd->bl.m;
- clif->chsys_create(maplist[sd->bl.m].channel,NULL,NULL,hChSys.local_color);
+ clif->chsys_create(map->list[sd->bl.m].channel,NULL,NULL,hChSys.local_color);
}
- if( maplist[sd->bl.m].channel->banned && idb_exists(maplist[sd->bl.m].channel->banned, sd->status.account_id) ) {
+ if( map->list[sd->bl.m].channel->banned && idb_exists(map->list[sd->bl.m].channel->banned, sd->status.account_id) ) {
return;
}
- clif->chsys_join(maplist[sd->bl.m].channel,sd);
+ clif->chsys_join(map->list[sd->bl.m].channel,sd);
- if( !( maplist[sd->bl.m].channel->opt & hChSys_OPT_ANNOUNCE_JOIN ) ) {
+ if( !( map->list[sd->bl.m].channel->opt & hChSys_OPT_ANNOUNCE_JOIN ) ) {
char mout[60];
- sprintf(mout, msg_txt(1435),hChSys.local_name,maplist[sd->bl.m].name); // You're now in the '#%s' channel for '%s'
+ sprintf(mout, msg_txt(1435),hChSys.local_name,map->list[sd->bl.m].name); // You're now in the '#%s' channel for '%s'
clif->colormes(sd->fd, COLOR_DEFAULT, mout);
}
}
@@ -9362,14 +9366,14 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
pc->setinvincibletimer(sd,battle_config.pc_invincible_time);
}
- if( maplist[sd->bl.m].users++ == 0 && battle_config.dynamic_mobs )
+ if( map->list[sd->bl.m].users++ == 0 && battle_config.dynamic_mobs )
map->spawnmobs(sd->bl.m);
if( !(sd->sc.option&OPTION_INVISIBLE) ) { // increment the number of pvp players on the map
- maplist[sd->bl.m].users_pvp++;
+ map->list[sd->bl.m].users_pvp++;
}
- if( maplist[sd->bl.m].instance_id >= 0 ) {
- instances[maplist[sd->bl.m].instance_id].users++;
- instance->check_idle(maplist[sd->bl.m].instance_id);
+ if( map->list[sd->bl.m].instance_id >= 0 ) {
+ instance->list[map->list[sd->bl.m].instance_id].users++;
+ instance->check_idle(map->list[sd->bl.m].instance_id);
}
sd->state.debug_remove_map = 0; // temporary state to track double remove_map's [FlavioJS]
@@ -9388,9 +9392,9 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
if( sd->bg_id ) clif->bg_hp(sd); // BattleGround System
- if(maplist[sd->bl.m].flag.pvp && !(sd->sc.option&OPTION_INVISIBLE)) {
+ if(map->list[sd->bl.m].flag.pvp && !(sd->sc.option&OPTION_INVISIBLE)) {
if(!battle_config.pk_mode) { // remove pvp stuff for pk_mode [Valaris]
- if (!maplist[sd->bl.m].flag.pvp_nocalcrank)
+ if (!map->list[sd->bl.m].flag.pvp_nocalcrank)
sd->pvp_timer = timer->add(timer->gettick()+200, pc->calc_pvprank_timer, sd->bl.id, 0);
sd->pvp_rank = 0;
sd->pvp_lastusers = 0;
@@ -9404,7 +9408,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
if(sd->duel_group)
clif->map_property(sd, MAPPROPERTY_FREEPVPZONE);
- if (maplist[sd->bl.m].flag.gvg_dungeon)
+ if (map->list[sd->bl.m].flag.gvg_dungeon)
clif->map_property(sd, MAPPROPERTY_FREEPVPZONE); //TODO: Figure out the real packet to send here.
if( map_flag_gvg2(sd->bl.m) )
@@ -9496,13 +9500,13 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
if(homun_alive(sd->hd))
homun->init_timers(sd->hd);
- if (map->night_flag && maplist[sd->bl.m].flag.nightenabled) {
+ if (map->night_flag && map->list[sd->bl.m].flag.nightenabled) {
sd->state.night = 1;
clif->status_change(&sd->bl, SI_SKE, 1, 0, 0, 0, 0);
}
// Notify everyone that this char logged in [Skotlex].
- map->map_foreachpc(clif->friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 1);
+ map->foreachpc(clif->friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 1);
//Login Event
npc->script_event(sd, NPCE_LOGIN);
@@ -9534,10 +9538,10 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
#endif
if( (battle_config.bg_flee_penalty != 100 || battle_config.gvg_flee_penalty != 100)
&& (map_flag_gvg2(sd->state.pmap) || map_flag_gvg2(sd->bl.m)
- || maplist[sd->state.pmap].flag.battleground || maplist[sd->bl.m].flag.battleground) )
+ || map->list[sd->state.pmap].flag.battleground || map->list[sd->bl.m].flag.battleground) )
status_calc_bl(&sd->bl, SCB_FLEE); //Refresh flee penalty
- if( map->night_flag && maplist[sd->bl.m].flag.nightenabled ) {
+ if( map->night_flag && map->list[sd->bl.m].flag.nightenabled ) {
//Display night.
if( !sd->state.night ) {
sd->state.night = 1;
@@ -9548,13 +9552,13 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_SKE);
}
- if( maplist[sd->bl.m].flag.battleground ) {
+ if( map->list[sd->bl.m].flag.battleground ) {
clif->map_type(sd, MAPTYPE_BATTLEFIELD); // Battleground Mode
- if( maplist[sd->bl.m].flag.battleground == 2 )
+ if( map->list[sd->bl.m].flag.battleground == 2 )
clif->bg_updatescore_single(sd);
}
- if( maplist[sd->bl.m].flag.allowks && !map_flag_ks(sd->bl.m) ) {
+ if( map->list[sd->bl.m].flag.allowks && !map_flag_ks(sd->bl.m) ) {
char output[128];
sprintf(output, "[ Kill Steal Protection Disabled. KS is allowed in this map ]");
clif->broadcast(&sd->bl, output, strlen(output) + 1, BC_BLUE, SELF);
@@ -9564,7 +9568,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
status_calc_pc(sd, false);/* some conditions are map-dependent so we must recalculate */
sd->state.changemap = false;
- if( hChSys.local && hChSys.local_autojoin && !maplist[sd->bl.m].flag.chsysnolocalaj ) {
+ if( hChSys.local && hChSys.local_autojoin && !map->list[sd->bl.m].flag.chsysnolocalaj ) {
clif->chsys_mjoin(sd);
}
}
@@ -9586,7 +9590,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
clif->showvendingboard(&sd->bl,sd->message,0);
}
- if(maplist[sd->bl.m].flag.loadevent) // Lance
+ if(map->list[sd->bl.m].flag.loadevent) // Lance
npc->script_event(sd, NPCE_LOADMAP);
if (pc->checkskill(sd, SG_DEVIL) && !pc->nextjobexp(sd)) //blindness [Komurka]
@@ -10415,10 +10419,10 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
chname++;
if( hChSys.local && strcmpi(chname, hChSys.local_name) == 0 ) {
- if( !maplist[sd->bl.m].channel ) {
+ if( !map->list[sd->bl.m].channel ) {
clif->chsys_mjoin(sd);
}
- channel = maplist[sd->bl.m].channel;
+ channel = map->list[sd->bl.m].channel;
} else if( hChSys.ally && sd->status.guild_id && strcmpi(chname, hChSys.ally_name) == 0 ) {
struct guild *g = sd->guild;
if( !g ) return;
@@ -10699,7 +10703,7 @@ void clif_hercules_chsys_delete(struct hChSysCh *channel) {
}
db_destroy(channel->users);
if( channel->m ) {
- maplist[channel->m].channel = NULL;
+ map->list[channel->m].channel = NULL;
aFree(channel);
} else if ( channel->type == hChSys_ALLY )
aFree(channel);
@@ -12000,7 +12004,7 @@ void clif_parse_CreateParty(int fd, struct map_session_data *sd) {
char* name = (char*)RFIFOP(fd,2);
name[NAME_LENGTH-1] = '\0';
- if( maplist[sd->bl.m].flag.partylock ) {
+ if( map->list[sd->bl.m].flag.partylock ) {
// Party locked.
clif->message(fd, msg_txt(227));
return;
@@ -12019,7 +12023,7 @@ void clif_parse_CreateParty2(int fd, struct map_session_data *sd) {
int item2 = RFIFOB(fd,27);
name[NAME_LENGTH-1] = '\0';
- if( maplist[sd->bl.m].flag.partylock ) {
+ if( map->list[sd->bl.m].flag.partylock ) {
// Party locked.
clif->message(fd, msg_txt(227));
return;
@@ -12039,7 +12043,7 @@ void clif_parse_CreateParty2(int fd, struct map_session_data *sd) {
void clif_parse_PartyInvite(int fd, struct map_session_data *sd) {
struct map_session_data *t_sd;
- if(maplist[sd->bl.m].flag.partylock) {
+ if(map->list[sd->bl.m].flag.partylock) {
// Party locked.
clif->message(fd, msg_txt(227));
return;
@@ -12060,7 +12064,7 @@ void clif_parse_PartyInvite2(int fd, struct map_session_data *sd) {
char *name = (char*)RFIFOP(fd,2);
name[NAME_LENGTH-1] = '\0';
- if(maplist[sd->bl.m].flag.partylock) {
+ if(map->list[sd->bl.m].flag.partylock) {
// Party locked.
clif->message(fd, msg_txt(227));
return;
@@ -12097,7 +12101,7 @@ void clif_parse_ReplyPartyInvite2(int fd,struct map_session_data *sd)
/// Request to leave party (CZ_REQ_LEAVE_GROUP).
/// 0100
void clif_parse_LeaveParty(int fd, struct map_session_data *sd) {
- if(maplist[sd->bl.m].flag.partylock) {
+ if(map->list[sd->bl.m].flag.partylock) {
// Party locked.
clif->message(fd, msg_txt(227));
return;
@@ -12109,7 +12113,7 @@ void clif_parse_LeaveParty(int fd, struct map_session_data *sd) {
/// Request to expel a party member (CZ_REQ_EXPEL_GROUP_MEMBER).
/// 0103 <account id>.L <char name>.24B
void clif_parse_RemovePartyMember(int fd, struct map_session_data *sd) {
- if(maplist[sd->bl.m].flag.partylock) {
+ if(map->list[sd->bl.m].flag.partylock) {
// Party locked.
clif->message(fd, msg_txt(227));
return;
@@ -12186,7 +12190,6 @@ void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd) {
party->changeleader(sd, map->id2sd(RFIFOL(fd,2)));
}
-#ifndef PARTY_RECRUIT
/// Party Booking in KRO [Spiria]
///
@@ -12194,6 +12197,7 @@ void clif_parse_PartyChangeLeader(int fd, struct map_session_data* sd) {
/// 0802 <level>.W <map id>.W { <job>.W }*6
void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd)
{
+#ifndef PARTY_RECRUIT
short level = RFIFOW(fd,2);
short mapid = RFIFOW(fd,4);
short job[PARTY_BOOKING_JOBS];
@@ -12203,6 +12207,9 @@ void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd)
job[i] = RFIFOB(fd,6+i*2);
party->booking_register(sd, level, mapid, job);
+#else
+ return;
+#endif
}
@@ -12214,12 +12221,16 @@ void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd)
/// 2 = already registered
void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag)
{
+#ifndef PARTY_RECRUIT
int fd = sd->fd;
WFIFOHEAD(fd,packet_len(0x803));
WFIFOW(fd,0) = 0x803;
WFIFOW(fd,2) = flag;
WFIFOSET(fd,packet_len(0x803));
+#else
+ return;
+#endif
}
@@ -12227,6 +12238,7 @@ void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag)
/// 0804 <level>.W <map id>.W <job>.W <last index>.L <result count>.W
void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd)
{
+#ifndef PARTY_RECRUIT
short level = RFIFOW(fd,2);
short mapid = RFIFOW(fd,4);
short job = RFIFOW(fd,6);
@@ -12234,6 +12246,9 @@ void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd)
short resultcount = RFIFOW(fd,12);
party->booking_search(sd, level, mapid, job, lastindex, resultcount);
+#else
+ return;
+#endif
}
@@ -12244,6 +12259,7 @@ void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd)
/// 1 = yes
void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results, int count, bool more_result)
{
+#ifndef PARTY_RECRUIT
int i, j;
int size = sizeof(struct party_booking_ad_info); // structure size (48)
struct party_booking_ad_info *pb_ad;
@@ -12263,6 +12279,9 @@ void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results,
WFIFOW(fd,i*size+41+j*2) = pb_ad->p_detail.job[j];
}
WFIFOSET(fd,WFIFOW(fd,2));
+#else
+ return;
+#endif
}
@@ -12270,8 +12289,12 @@ void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results,
/// 0806
void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd)
{
+#ifndef PARTY_RECRUIT
if(party->booking_delete(sd))
clif->PartyBookingDeleteAck(sd, 0);
+#else
+ return;
+#endif
}
@@ -12284,12 +12307,16 @@ void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd)
/// 3 = nothing registered
void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag)
{
+#ifndef PARTY_RECRUIT
int fd = sd->fd;
WFIFOHEAD(fd,packet_len(0x807));
WFIFOW(fd,0) = 0x807;
WFIFOW(fd,2) = flag;
WFIFOSET(fd,packet_len(0x807));
+#else
+ return;
+#endif
}
@@ -12297,6 +12324,7 @@ void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag)
/// 0808 { <job>.W }*6
void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd)
{
+#ifndef PARTY_RECRUIT
short job[PARTY_BOOKING_JOBS];
int i;
@@ -12304,6 +12332,9 @@ void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd)
job[i] = RFIFOW(fd,2+i*2);
party->booking_update(sd, job);
+#else
+ return;
+#endif
}
@@ -12311,6 +12342,7 @@ void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd)
/// 0809 <index>.L <char name>.24B <expire time>.L <level>.W <map id>.W { <job>.W }*6
void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad)
{
+#ifndef PARTY_RECRUIT
int i;
uint8 buf[38+PARTY_BOOKING_JOBS*2];
@@ -12326,6 +12358,9 @@ void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_boo
WBUFW(buf,38+i*2) = pb_ad->p_detail.job[i];
clif->send(buf, packet_len(0x809), &sd->bl, ALL_CLIENT);
+#else
+ return;
+#endif
}
@@ -12333,6 +12368,7 @@ void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_boo
/// 080a <index>.L { <job>.W }*6
void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad)
{
+#ifndef PARTY_RECRUIT
int i;
uint8 buf[6+PARTY_BOOKING_JOBS*2];
@@ -12343,6 +12379,9 @@ void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_boo
for(i=0; i<PARTY_BOOKING_JOBS; i++)
WBUFW(buf,6+i*2) = pb_ad->p_detail.job[i];
clif->send(buf,packet_len(0x80a),&sd->bl,ALL_CLIENT); // Now UPDATE all client.
+#else
+ return;
+#endif
}
@@ -12350,26 +12389,33 @@ void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_boo
/// 080b <index>.L
void clif_PartyBookingDeleteNotify(struct map_session_data* sd, int index)
{
+#ifndef PARTY_RECRUIT
uint8 buf[6];
WBUFW(buf,0) = 0x80b;
WBUFL(buf,2) = index;
clif->send(buf, packet_len(0x80b), &sd->bl, ALL_CLIENT); // Now UPDATE all client.
+#else
+ return;
+#endif
}
-#else
/// Modified version of Party Booking System for 2012-04-10 or 2012-04-18 (RagexeRE).
/// Code written by mkbu95, Spiria, Yommy and Ind
/// Request to register a party booking advertisment (CZ_PARTY_RECRUIT_REQ_REGISTER).
/// 08e5 <level>.W <notice>.37B
-void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd)
+void clif_parse_PartyRecruitRegisterReq(int fd, struct map_session_data* sd)
{
+#ifdef PARTY_RECRUIT
short level = RFIFOW(fd,2);
const char *notice = (const char*)RFIFOP(fd, 4);
- party->booking_register(sd, level, notice);
+ party->recruit_register(sd, level, notice);
+#else
+ return;
+#endif
}
/// Party booking search results (ZC_PARTY_RECRUIT_ACK_SEARCH).
@@ -12377,8 +12423,9 @@ void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd)
/// more results:
/// 0 = no
/// 1 = yes
-void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results, int count, bool more_result)
+void clif_PartyRecruitSearchAck(int fd, struct party_booking_ad_info** results, int count, bool more_result)
{
+#ifdef PARTY_RECRUIT
int i;
int size = sizeof(struct party_booking_ad_info);
struct party_booking_ad_info *pb_ad;
@@ -12399,6 +12446,9 @@ void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results,
}
WFIFOSET(fd,WFIFOW(fd,2));
+#else
+ return;
+#endif
}
/// Result of request to register a party booking advertisment (ZC_PARTY_RECRUIT_ACK_REGISTER).
@@ -12407,34 +12457,46 @@ void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results,
/// 0 = success
/// 1 = failure
/// 2 = already registered
-void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag)
+void clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag)
{
+#ifdef PARTY_RECRUIT
int fd = sd->fd;
WFIFOHEAD(fd, packet_len(0x8e6));
WFIFOW(fd, 0) = 0x8e6;
WFIFOW(fd, 2) = flag;
WFIFOSET(fd, packet_len(0x8e6));
+#else
+ return;
+#endif
}
/// Request to search for party booking advertisments (CZ_PARTY_RECRUIT_REQ_SEARCH).
/// 08e7 <level>.W <map id>.W <last index>.L <result count>.W
-void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd)
+void clif_parse_PartyRecruitSearchReq(int fd, struct map_session_data* sd)
{
+#ifdef PARTY_RECRUIT
short level = RFIFOW(fd, 2);
short mapid = RFIFOW(fd, 4);
unsigned long lastindex = RFIFOL(fd, 6);
short resultcount = RFIFOW(fd, 10);
- party->booking_search(sd, level, mapid, lastindex, resultcount);
+ party->recruit_search(sd, level, mapid, lastindex, resultcount);
+#else
+ return;
+#endif
}
/// Request to delete own party booking advertisment (CZ_PARTY_RECRUIT_REQ_DELETE).
/// 08e9
-void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd)
+void clif_parse_PartyRecruitDeleteReq(int fd, struct map_session_data* sd)
{
+#ifdef PARTY_RECRUIT
if(party->booking_delete(sd))
- clif->PartyBookingDeleteAck(sd, 0);
+ clif->PartyRecruitDeleteAck(sd, 0);
+#else
+ return;
+#endif
}
/// Result of request to delete own party booking advertisment (ZC_PARTY_RECRUIT_ACK_DELETE).
@@ -12444,31 +12506,40 @@ void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd)
/// 1 = success (auto-removed expired ad)
/// 2 = failure
/// 3 = nothing registered
-void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag)
+void clif_PartyRecruitDeleteAck(struct map_session_data* sd, int flag)
{
+#ifdef PARTY_RECRUIT
int fd = sd->fd;
WFIFOHEAD(fd, packet_len(0x8ea));
WFIFOW(fd, 0) = 0x8ea;
WFIFOW(fd, 2) = flag;
WFIFOSET(fd, packet_len(0x8ea));
+#else
+ return;
+#endif
}
/// Request to update party booking advertisment (CZ_PARTY_RECRUIT_REQ_UPDATE).
/// 08eb <notice>.37B
-void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data *sd)
+void clif_parse_PartyRecruitUpdateReq(int fd, struct map_session_data *sd)
{
+#ifdef PARTY_RECRUIT
const char *notice;
notice = (const char*)RFIFOP(fd, 2);
- party->booking_update(sd, notice);
+ party->recruit_update(sd, notice);
+#else
+ return;
+#endif
}
/// Notification about new party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_INSERT).
/// 08ec <index>.L <expire time>.L <char name>.24B <level>.W <notice>.37B
-void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad)
+void clif_PartyRecruitInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad)
{
+#ifdef PARTY_RECRUIT
unsigned char buf[2+6+6+24+4+37+1];
if (pb_ad == NULL)
@@ -12481,12 +12552,16 @@ void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_boo
WBUFW(buf,34) = pb_ad->p_detail.level;
memcpy(WBUFP(buf, 36), pb_ad->p_detail.notice, PB_NOTICE_LENGTH);
clif->send(buf, packet_len(0x8ec), &sd->bl, ALL_CLIENT);
+#else
+ return;
+#endif
}
/// Notification about updated party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_UPDATE).
/// 08ed <index>.L <notice>.37B
-void clif_PartyBookingUpdateNotify(struct map_session_data *sd, struct party_booking_ad_info* pb_ad)
+void clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_booking_ad_info* pb_ad)
{
+#ifdef PARTY_RECRUIT
unsigned char buf[2+6+37+1];
WBUFW(buf, 0) = 0x8ed;
@@ -12494,51 +12569,71 @@ void clif_PartyBookingUpdateNotify(struct map_session_data *sd, struct party_boo
memcpy(WBUFP(buf, 6), pb_ad->p_detail.notice, PB_NOTICE_LENGTH);
clif->send(buf, packet_len(0x8ed), &sd->bl, ALL_CLIENT);
+#else
+ return;
+#endif
}
/// Notification about deleted party booking advertisment (ZC_PARTY_RECRUIT_NOTIFY_DELETE).
/// 08ee <index>.L
-void clif_PartyBookingDeleteNotify(struct map_session_data* sd, int index)
+void clif_PartyRecruitDeleteNotify(struct map_session_data* sd, int index)
{
+#ifdef PARTY_RECRUIT
unsigned char buf[2+6+1];
WBUFW(buf, 0) = 0x8ee;
WBUFL(buf, 2) = index;
clif->send(buf, packet_len(0x8ee), &sd->bl, ALL_CLIENT);
+#else
+ return;
+#endif
}
/// Request to add to filtering list (PARTY_RECRUIT_ADD_FILTERLINGLIST).
/// 08ef <index>.L
void clif_parse_PartyBookingAddFilteringList(int fd, struct map_session_data *sd)
{
+#ifdef PARTY_RECRUIT
int index = RFIFOL(fd, 2);
clif->PartyBookingAddFilteringList(index, sd);
+#else
+ return;
+#endif
}
/// Request to remove from filtering list (PARTY_RECRUIT_SUB_FILTERLINGLIST).
/// 08f0 <GID>.L
void clif_parse_PartyBookingSubFilteringList(int fd, struct map_session_data *sd)
{
+#ifdef PARTY_RECRUIT
int gid = RFIFOL(fd, 2);
clif->PartyBookingSubFilteringList(gid, sd);
+#else
+ return;
+#endif
}
/// Request to recruit volunteer (PARTY_RECRUIT_REQ_VOLUNTEER).
/// 08f1 <index>.L
void clif_parse_PartyBookingReqVolunteer(int fd, struct map_session_data *sd)
{
+#ifdef PARTY_RECRUIT
int index = RFIFOL(fd, 2);
clif->PartyBookingVolunteerInfo(index, sd);
+#else
+ return;
+#endif
}
/// Request volunteer information (PARTY_RECRUIT_VOLUNTEER_INFO).
/// 08f2 <AID>.L <job>.L <level>.W <char name>.24B
void clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd)
{
+#ifdef PARTY_RECRUIT
unsigned char buf[2+4+4+2+24+1];
WBUFW(buf, 0) = 0x8f2;
@@ -12548,6 +12643,9 @@ void clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd)
memcpy(WBUFP(buf, 12), sd->status.name, NAME_LENGTH);
clif->send(buf, packet_len(0x8f2), &sd->bl, ALL_CLIENT);
+#else
+ return;
+#endif
}
#if 0 //Disabled for now. Needs more info.
@@ -12591,44 +12689,61 @@ void clif_PartyBookingFailedRecall(int fd, struct map_session_data *sd)
/// 08f9 <refuse AID>.L
void clif_parse_PartyBookingRefuseVolunteer(int fd, struct map_session_data *sd)
{
+#ifdef PARTY_RECRUIT
unsigned long aid = RFIFOL(fd, 2);
clif->PartyBookingRefuseVolunteer(aid, sd);
+#else
+ return;
+#endif
}
/// 08fa <index>.L
void clif_PartyBookingRefuseVolunteer(unsigned long aid, struct map_session_data *sd)
{
+#ifdef PARTY_RECRUIT
unsigned char buf[2+6];
WBUFW(buf, 0) = 0x8fa;
WBUFL(buf, 2) = aid;
clif->send(buf, packet_len(0x8fa), &sd->bl, ALL_CLIENT);
+#else
+ return;
+#endif
}
/// 08fb <index>.L
void clif_parse_PartyBookingCancelVolunteer(int fd, struct map_session_data *sd)
{
+#ifdef PARTY_RECRUIT
int index = RFIFOL(fd, 2);
clif->PartyBookingCancelVolunteer(index, sd);
+#else
+ return;
+#endif
}
/// 0909 <index>.L
void clif_PartyBookingCancelVolunteer(int index, struct map_session_data *sd)
{
+#ifdef PARTY_RECRUIT
unsigned char buf[2+6+1];
WBUFW(buf, 0) = 0x909;
WBUFL(buf, 2) = index;
clif->send(buf, packet_len(0x909), &sd->bl, ALL_CLIENT);
+#else
+ return;
+#endif
}
/// 090b <gid>.L <char name>.24B
void clif_PartyBookingAddFilteringList(int index, struct map_session_data *sd)
{
+#ifdef PARTY_RECRUIT
unsigned char buf[2+6+24+1];
WBUFW(buf, 0) = 0x90b;
@@ -12636,11 +12751,15 @@ void clif_PartyBookingAddFilteringList(int index, struct map_session_data *sd)
memcpy(WBUFP(buf, 6), sd->status.name, NAME_LENGTH);
clif->send(buf, packet_len(0x90b), &sd->bl, ALL_CLIENT);
+#else
+ return;
+#endif
}
/// 090c <gid>.L <char name>.24B
void clif_PartyBookingSubFilteringList(int gid, struct map_session_data *sd)
{
+#ifdef PARTY_RECRUIT
unsigned char buf[2+6+24+1];
WBUFW(buf, 0) = 0x90c;
@@ -12648,6 +12767,9 @@ void clif_PartyBookingSubFilteringList(int gid, struct map_session_data *sd)
memcpy(WBUFP(buf, 6), sd->status.name, NAME_LENGTH);
clif->send(buf, packet_len(0x90c), &sd->bl, ALL_CLIENT);
+#else
+ return;
+#endif
}
#if 0
@@ -12661,7 +12783,6 @@ void clif_PartyBookingRefuseVolunteerToPM(struct map_session_data *sd)
{
}
#endif //if 0
-#endif
/// Request to close own vending (CZ_REQ_CLOSESTORE).
/// 012e
@@ -12730,7 +12851,7 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd) {
if( sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOROOM )
return;
- if( maplist[sd->bl.m].flag.novending ) {
+ if( map->list[sd->bl.m].flag.novending ) {
clif->message (sd->fd, msg_txt(276)); // "You can't open a shop on this map"
return;
}
@@ -12751,7 +12872,7 @@ void clif_parse_CreateGuild(int fd,struct map_session_data *sd) {
char* name = (char*)RFIFOP(fd,6);
name[NAME_LENGTH-1] = '\0';
- if(maplist[sd->bl.m].flag.guildlock) {
+ if(map->list[sd->bl.m].flag.guildlock) {
//Guild locked.
clif->message(fd, msg_txt(228));
return;
@@ -12914,7 +13035,7 @@ clif_sub_guild_invite(int fd, struct map_session_data *sd, struct map_session_da
return 1;
}
- if (maplist[sd->bl.m].flag.guildlock) {
+ if (map->list[sd->bl.m].flag.guildlock) {
//Guild locked.
clif->message(fd, msg_txt(228));
return 1;
@@ -12961,7 +13082,7 @@ void clif_parse_GuildReplyInvite(int fd,struct map_session_data *sd)
/// Request to leave guild (CZ_REQ_LEAVE_GUILD).
/// 0159 <guild id>.L <account id>.L <char id>.L <reason>.40B
void clif_parse_GuildLeave(int fd,struct map_session_data *sd) {
- if(maplist[sd->bl.m].flag.guildlock) {
+ if(map->list[sd->bl.m].flag.guildlock) {
//Guild locked.
clif->message(fd, msg_txt(228));
return;
@@ -12978,7 +13099,7 @@ void clif_parse_GuildLeave(int fd,struct map_session_data *sd) {
/// Request to expel a member of a guild (CZ_REQ_BAN_GUILD).
/// 015b <guild id>.L <account id>.L <char id>.L <reason>.40B
void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd) {
- if( maplist[sd->bl.m].flag.guildlock || sd->bg_id ) {
+ if( map->list[sd->bl.m].flag.guildlock || sd->bg_id ) {
// Guild locked.
clif->message(fd, msg_txt(228));
return;
@@ -13029,7 +13150,7 @@ void clif_parse_GuildRequestAlliance(int fd, struct map_session_data *sd) {
if(!sd->state.gmaster_flag)
return;
- if(maplist[sd->bl.m].flag.guildlock) {
+ if(map->list[sd->bl.m].flag.guildlock) {
//Guild locked.
clif->message(fd, msg_txt(228));
return;
@@ -13067,7 +13188,7 @@ void clif_parse_GuildDelAlliance(int fd, struct map_session_data *sd) {
if(!sd->state.gmaster_flag)
return;
- if(maplist[sd->bl.m].flag.guildlock) {
+ if(map->list[sd->bl.m].flag.guildlock) {
//Guild locked.
clif->message(fd, msg_txt(228));
return;
@@ -13084,7 +13205,7 @@ void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) {
if(!sd->state.gmaster_flag)
return;
- if(maplist[sd->bl.m].flag.guildlock) {
+ if(map->list[sd->bl.m].flag.guildlock) {
//Guild locked.
clif->message(fd, msg_txt(228));
return;
@@ -13108,7 +13229,7 @@ void clif_parse_GuildOpposition(int fd, struct map_session_data *sd) {
/// now guild name; might have been (intended) email, since the
/// field name and size is same as the one in CH_DELETE_CHAR.
void clif_parse_GuildBreak(int fd, struct map_session_data *sd) {
- if( maplist[sd->bl.m].flag.guildlock ) {
+ if( map->list[sd->bl.m].flag.guildlock ) {
//Guild locked.
clif->message(fd, msg_txt(228));
return;
@@ -14000,9 +14121,9 @@ void clif_ranklist_sub(unsigned char *buf, enum fame_list_type type) {
int i;
switch( type ) {
- case RANKTYPE_BLACKSMITH: list = smith_fame_list; break;
- case RANKTYPE_ALCHEMIST: list = chemist_fame_list; break;
- case RANKTYPE_TAEKWON: list = taekwon_fame_list; break;
+ case RANKTYPE_BLACKSMITH: list = pc->smith_fame_list; break;
+ case RANKTYPE_ALCHEMIST: list = pc->chemist_fame_list; break;
+ case RANKTYPE_TAEKWON: list = pc->taekwon_fame_list; break;
default: return; // Unsupported
}
@@ -14208,7 +14329,7 @@ void clif_parse_FeelSaveOk(int fd,struct map_session_data *sd)
sd->feel_map[i].index = map_id2index(sd->bl.m);
sd->feel_map[i].m = sd->bl.m;
- pc_setglobalreg(sd,sg_info[i].feel_var,sd->feel_map[i].index);
+ pc_setglobalreg(sd,pc->sg_info[i].feel_var,sd->feel_map[i].index);
//Are these really needed? Shouldn't they show up automatically from the feel save packet?
// clif_misceffect2(&sd->bl, 0x1b0);
@@ -15950,8 +16071,8 @@ void clif_bg_updatescore(int16 m) {
bl.m = m;
WBUFW(buf,0) = 0x2de;
- WBUFW(buf,2) = maplist[m].bgscore_lion;
- WBUFW(buf,4) = maplist[m].bgscore_eagle;
+ WBUFW(buf,2) = map->list[m].bgscore_lion;
+ WBUFW(buf,4) = map->list[m].bgscore_eagle;
clif->send(buf,packet_len(0x2de),&bl,ALL_SAMEMAP);
}
@@ -15962,8 +16083,8 @@ void clif_bg_updatescore_single(struct map_session_data *sd) {
WFIFOHEAD(fd,packet_len(0x2de));
WFIFOW(fd,0) = 0x2de;
- WFIFOW(fd,2) = maplist[sd->bl.m].bgscore_lion;
- WFIFOW(fd,4) = maplist[sd->bl.m].bgscore_eagle;
+ WFIFOW(fd,2) = map->list[sd->bl.m].bgscore_lion;
+ WFIFOW(fd,4) = map->list[sd->bl.m].bgscore_eagle;
WFIFOSET(fd,packet_len(0x2de));
}
@@ -16017,20 +16138,20 @@ int clif_instance(int instance_id, int type, int flag) {
unsigned char buf[255];
enum send_target target = PARTY;
- switch( instances[instance_id].owner_type ) {
+ switch( instance->list[instance_id].owner_type ) {
case IOT_NONE:
return 0;
case IOT_GUILD:
target = GUILD;
- sd = guild->getavailablesd(guild->search(instances[instance_id].owner_id));
+ sd = guild->getavailablesd(guild->search(instance->list[instance_id].owner_id));
break;
case IOT_PARTY:
/* default is already PARTY */
- sd = party->getavailablesd(party->search(instances[instance_id].owner_id));
+ sd = party->getavailablesd(party->search(instance->list[instance_id].owner_id));
break;
case IOT_CHAR:
target = SELF;
- sd = map->id2sd(instances[instance_id].owner_id);
+ sd = map->id2sd(instance->list[instance_id].owner_id);
break;
}
@@ -16043,7 +16164,7 @@ int clif_instance(int instance_id, int type, int flag) {
// Required to start the instancing information window on Client
// This window re-appear each "refresh" of client automatically until type 4 is send to client.
WBUFW(buf,0) = 0x02CB;
- memcpy(WBUFP(buf,2),instances[instance_id].name,INSTANCE_NAME_LENGTH);
+ memcpy(WBUFP(buf,2),instance->list[instance_id].name,INSTANCE_NAME_LENGTH);
WBUFW(buf,63) = flag;
clif->send(buf,packet_len(0x02CB),&sd->bl,target);
break;
@@ -16058,13 +16179,13 @@ int clif_instance(int instance_id, int type, int flag) {
case 4:
// S 0x2cd <Instance Name>.61B <Instance Remaining Time>.L <Instance Noplayers close time>.L
WBUFW(buf,0) = 0x02CD;
- memcpy(WBUFP(buf,2),instances[instance_id].name,61);
+ memcpy(WBUFP(buf,2),instance->list[instance_id].name,61);
if( type == 3 ) {
- WBUFL(buf,63) = instances[instance_id].progress_timeout;
+ WBUFL(buf,63) = instance->list[instance_id].progress_timeout;
WBUFL(buf,67) = 0;
} else {
WBUFL(buf,63) = 0;
- WBUFL(buf,67) = instances[instance_id].idle_timeout;
+ WBUFL(buf,67) = instance->list[instance_id].idle_timeout;
}
clif->send(buf,packet_len(0x02CD),&sd->bl,target);
break;
@@ -16086,24 +16207,24 @@ int clif_instance(int instance_id, int type, int flag) {
void clif_instance_join(int fd, int instance_id)
{
- if( instances[instance_id].idle_timer != INVALID_TIMER ) {
+ if( instance->list[instance_id].idle_timer != INVALID_TIMER ) {
WFIFOHEAD(fd,packet_len(0x02CD));
WFIFOW(fd,0) = 0x02CD;
- memcpy(WFIFOP(fd,2),instances[instance_id].name,61);
+ memcpy(WFIFOP(fd,2),instance->list[instance_id].name,61);
WFIFOL(fd,63) = 0;
- WFIFOL(fd,67) = instances[instance_id].idle_timeout;
+ WFIFOL(fd,67) = instance->list[instance_id].idle_timeout;
WFIFOSET(fd,packet_len(0x02CD));
- } else if( instances[instance_id].progress_timer != INVALID_TIMER ) {
+ } else if( instance->list[instance_id].progress_timer != INVALID_TIMER ) {
WFIFOHEAD(fd,packet_len(0x02CD));
WFIFOW(fd,0) = 0x02CD;
- memcpy(WFIFOP(fd,2),instances[instance_id].name,61);
- WFIFOL(fd,63) = instances[instance_id].progress_timeout;
+ memcpy(WFIFOP(fd,2),instance->list[instance_id].name,61);
+ WFIFOL(fd,63) = instance->list[instance_id].progress_timeout;
WFIFOL(fd,67) = 0;
WFIFOSET(fd,packet_len(0x02CD));
} else {
WFIFOHEAD(fd,packet_len(0x02CB));
WFIFOW(fd,0) = 0x02CB;
- memcpy(WFIFOP(fd,2),instances[instance_id].name,61);
+ memcpy(WFIFOP(fd,2),instance->list[instance_id].name,61);
WFIFOW(fd,63) = 0;
WFIFOSET(fd,packet_len(0x02CB));
}
@@ -17358,14 +17479,14 @@ void clif_maptypeproperty2(struct block_list *bl,enum send_target t) {
p.PacketType = maptypeproperty2Type;
p.type = 0x28;
- p.flag.party = maplist[bl->m].flag.pvp ? 1 : 0;
+ p.flag.party = map->list[bl->m].flag.pvp ? 1 : 0;
p.flag.guild = map_flag_gvg(bl->m) ? 1 : 0;
p.flag.siege = map_flag_gvg2(bl->m) ? 1: 0;
p.flag.mineffect = map_flag_gvg(bl->m); // FIXME/CHECKME Forcing /mineffect in castles during WoE (probably redundant? I'm not sure)
p.flag.nolockon = 0; // TODO
- p.flag.countpk = maplist[bl->m].flag.pvp ? 1 : 0;
- p.flag.nopartyformation = maplist[bl->m].flag.partylock ? 1 : 0;
- p.flag.bg = maplist[bl->m].flag.battleground ? 1 : 0;
+ p.flag.countpk = map->list[bl->m].flag.pvp ? 1 : 0;
+ p.flag.nopartyformation = map->list[bl->m].flag.partylock ? 1 : 0;
+ p.flag.bg = map->list[bl->m].flag.battleground ? 1 : 0;
p.flag.noitemconsumption = 0; // TODO
p.flag.summonstarmiracle = 0; // TODO
p.flag.usecart = 1; // TODO
@@ -17984,10 +18105,8 @@ void clif_defaults(void) {
clif->clearunit_delayed_sub = clif_clearunit_delayed_sub;
clif->set_unit_idle = clif_set_unit_idle;
clif->spawn_unit = clif_spawn_unit;
-#if PACKETVER < 20091103
clif->spawn_unit2 = clif_spawn_unit2;
clif->set_unit_idle2 = clif_set_unit_idle2;
-#endif
clif->set_unit_walking = clif_set_unit_walking;
clif->calc_walkdelay = clif_calc_walkdelay;
clif->getareachar_skillunit = clif_getareachar_skillunit;
@@ -18342,14 +18461,18 @@ void clif_defaults(void) {
clif->PartyBookingUpdateNotify = clif_PartyBookingUpdateNotify;
clif->PartyBookingDeleteNotify = clif_PartyBookingDeleteNotify;
clif->PartyBookingInsertNotify = clif_PartyBookingInsertNotify;
+ clif->PartyRecruitRegisterAck = clif_PartyRecruitRegisterAck;
+ clif->PartyRecruitDeleteAck = clif_PartyRecruitDeleteAck;
+ clif->PartyRecruitSearchAck = clif_PartyRecruitSearchAck;
+ clif->PartyRecruitUpdateNotify = clif_PartyRecruitUpdateNotify;
+ clif->PartyRecruitDeleteNotify = clif_PartyRecruitDeleteNotify;
+ clif->PartyRecruitInsertNotify = clif_PartyRecruitInsertNotify;
/* Group Search System Update */
-#ifdef PARTY_RECRUIT
clif->PartyBookingVolunteerInfo = clif_PartyBookingVolunteerInfo;
clif->PartyBookingRefuseVolunteer = clif_PartyBookingRefuseVolunteer;
clif->PartyBookingCancelVolunteer = clif_PartyBookingCancelVolunteer;
clif->PartyBookingAddFilteringList = clif_PartyBookingAddFilteringList;
clif->PartyBookingSubFilteringList = clif_PartyBookingSubFilteringList;
-#endif
/* buying store-related */
clif->buyingstore_open = clif_buyingstore_open;
clif->buyingstore_open_failed = clif_buyingstore_open_failed;
@@ -18498,6 +18621,10 @@ void clif_defaults(void) {
clif->pPartyBookingSearchReq = clif_parse_PartyBookingSearchReq;
clif->pPartyBookingDeleteReq = clif_parse_PartyBookingDeleteReq;
clif->pPartyBookingUpdateReq = clif_parse_PartyBookingUpdateReq;
+ clif->pPartyRecruitRegisterReq = clif_parse_PartyRecruitRegisterReq;
+ clif->pPartyRecruitSearchReq = clif_parse_PartyRecruitSearchReq;
+ clif->pPartyRecruitDeleteReq = clif_parse_PartyRecruitDeleteReq;
+ clif->pPartyRecruitUpdateReq = clif_parse_PartyRecruitUpdateReq;
clif->pCloseVending = clif_parse_CloseVending;
clif->pVendingListReq = clif_parse_VendingListReq;
clif->pPurchaseReq = clif_parse_PurchaseReq;
@@ -18613,11 +18740,9 @@ void clif_defaults(void) {
clif->pPartyTick = clif_parse_PartyTick;
clif->pGuildInvite2 = clif_parse_GuildInvite2;
/* Group Search System Update */
-#ifdef PARTY_RECRUIT
clif->pPartyBookingAddFilter = clif_parse_PartyBookingAddFilteringList;
clif->pPartyBookingSubFilter = clif_parse_PartyBookingSubFilteringList;
clif->pPartyBookingReqVolunteer = clif_parse_PartyBookingReqVolunteer;
clif->pPartyBookingRefuseVolunteer = clif_parse_PartyBookingRefuseVolunteer;
clif->pPartyBookingCancelVolunteer = clif_parse_PartyBookingCancelVolunteer;
-#endif
}
diff --git a/src/map/clif.h b/src/map/clif.h
index 1e054db1d..1a2748353 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -546,10 +546,8 @@ struct clif_interface {
int (*clearunit_delayed_sub) (int tid, unsigned int tick, int id, intptr_t data);
void (*set_unit_idle) (struct block_list* bl, struct map_session_data *tsd,enum send_target target);
void (*spawn_unit) (struct block_list* bl, enum send_target target);
-#if PACKETVER < 20091103
void (*spawn_unit2) (struct block_list* bl, enum send_target target);
void (*set_unit_idle2) (struct block_list* bl, struct map_session_data *tsd, enum send_target target);
-#endif
void (*set_unit_walking) (struct block_list* bl, struct map_session_data *tsd,struct unit_data* ud, enum send_target target);
int (*calc_walkdelay) (struct block_list *bl,int delay, int type, int damage, int div_);
void (*getareachar_skillunit) (struct map_session_data *sd, struct skill_unit *su);
@@ -904,14 +902,18 @@ struct clif_interface {
void (*PartyBookingUpdateNotify) (struct map_session_data* sd, struct party_booking_ad_info* pb_ad);
void (*PartyBookingDeleteNotify) (struct map_session_data* sd, int index);
void (*PartyBookingInsertNotify) (struct map_session_data* sd, struct party_booking_ad_info* pb_ad);
+ void (*PartyRecruitRegisterAck) (struct map_session_data *sd, int flag);
+ void (*PartyRecruitDeleteAck) (struct map_session_data* sd, int flag);
+ void (*PartyRecruitSearchAck) (int fd, struct party_booking_ad_info** results, int count, bool more_result);
+ void (*PartyRecruitUpdateNotify) (struct map_session_data* sd, struct party_booking_ad_info* pb_ad);
+ void (*PartyRecruitDeleteNotify) (struct map_session_data* sd, int index);
+ void (*PartyRecruitInsertNotify) (struct map_session_data* sd, struct party_booking_ad_info* pb_ad);
/* Group Search System Update */
-#ifdef PARTY_RECRUIT
void (*PartyBookingVolunteerInfo) (int index, struct map_session_data *sd);
void (*PartyBookingRefuseVolunteer) (unsigned long 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);
-#endif
/* buying store-related */
void (*buyingstore_open) (struct map_session_data* sd);
void (*buyingstore_open_failed) (struct map_session_data* sd, unsigned short result, unsigned int weight);
@@ -1060,6 +1062,10 @@ struct clif_interface {
void (*pPartyBookingSearchReq) (int fd, struct map_session_data* sd);
void (*pPartyBookingDeleteReq) (int fd, struct map_session_data* sd);
void (*pPartyBookingUpdateReq) (int fd, struct map_session_data* sd);
+ void (*pPartyRecruitRegisterReq) (int fd, struct map_session_data* sd);
+ void (*pPartyRecruitSearchReq) (int fd, struct map_session_data* sd);
+ void (*pPartyRecruitDeleteReq) (int fd, struct map_session_data* sd);
+ void (*pPartyRecruitUpdateReq) (int fd, struct map_session_data* sd);
void (*pCloseVending) (int fd, struct map_session_data* sd);
void (*pVendingListReq) (int fd, struct map_session_data* sd);
void (*pPurchaseReq) (int fd, struct map_session_data* sd);
@@ -1173,13 +1179,11 @@ struct clif_interface {
void (*pPartyTick) (int fd, struct map_session_data *sd);
void (*pGuildInvite2) (int fd, struct map_session_data *sd);
/* Group Search System Update */
-#ifdef PARTY_RECRUIT
void (*pPartyBookingAddFilter) (int fd, struct map_session_data *sd);
void (*pPartyBookingSubFilter) (int fd, struct map_session_data *sd);
void (*pPartyBookingReqVolunteer) (int fd, struct map_session_data *sd);
void (*pPartyBookingRefuseVolunteer) (int fd, struct map_session_data *sd);
void (*pPartyBookingCancelVolunteer) (int fd, struct map_session_data *sd);
-#endif
};
struct clif_interface *clif;
diff --git a/src/map/duel.c b/src/map/duel.c
index a993ee667..4e41865d4 100644
--- a/src/map/duel.c
+++ b/src/map/duel.c
@@ -69,7 +69,7 @@ void duel_showinfo(const unsigned int did, struct map_session_data* sd) {
duel->list[did].members_count + duel->list[did].invites_count);
clif->disp_onlyself(sd, output, strlen(output));
- map->map_foreachpc(duel_showinfo_sub, sd, &p);
+ map->foreachpc(duel_showinfo_sub, sd, &p);
}
int duel_create(struct map_session_data* sd, const unsigned int maxpl) {
@@ -126,7 +126,7 @@ void duel_leave(const unsigned int did, struct map_session_data* sd) {
duel->list[did].members_count--;
if(duel->list[did].members_count == 0) {
- map->map_foreachpc(duel_leave_sub, did);
+ map->foreachpc(duel_leave_sub, did);
duel->count--;
}
diff --git a/src/map/duel.h b/src/map/duel.h
index 7802f6163..d1ec58415 100644
--- a/src/map/duel.h
+++ b/src/map/duel.h
@@ -1,5 +1,7 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
+
#ifndef _DUEL_H_
#define _DUEL_H_
@@ -11,8 +13,6 @@ struct duel {
#define MAX_DUEL 1024
-
-
/*=====================================
* Interface : duel.h
* Generated by HerculesInterfaceMaker
diff --git a/src/map/elemental.c b/src/map/elemental.c
index 12e8f4c4e..3251ca992 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -39,22 +39,24 @@
#include <string.h>
#include <math.h>
+struct elemental_interface elemental_s;
+
int elemental_search_index(int class_) {
int i;
- ARR_FIND(0, MAX_ELEMENTAL_CLASS, i, elemental->elemental_db[i].class_ == class_);
+ ARR_FIND(0, MAX_ELEMENTAL_CLASS, i, elemental->db[i].class_ == class_);
return (i == MAX_ELEMENTAL_CLASS)?-1:i;
}
bool elemental_class(int class_) {
- return (bool)(elemental_search_index(class_) > -1);
+ return (bool)(elemental->search_index(class_) > -1);
}
struct view_data * elemental_get_viewdata(int class_) {
- int i = elemental_search_index(class_);
+ int i = elemental->search_index(class_);
if( i < 0 )
return 0;
- return &elemental->elemental_db[i].vd;
+ return &elemental->db[i].vd;
}
int elemental_create(struct map_session_data *sd, int class_, unsigned int lifetime) {
@@ -64,10 +66,10 @@ int elemental_create(struct map_session_data *sd, int class_, unsigned int lifet
nullpo_retr(1,sd);
- if( (i = elemental_search_index(class_)) < 0 )
+ if( (i = elemental->search_index(class_)) < 0 )
return 0;
- db = &elemental->elemental_db[i];
+ db = &elemental->db[i];
memset(&ele,0,sizeof(struct s_elemental));
ele.char_id = sd->status.char_id;
@@ -75,27 +77,27 @@ int elemental_create(struct map_session_data *sd, int class_, unsigned int lifet
ele.mode = EL_MODE_PASSIVE; // Initial mode
i = db->status.size+1; // summon level
- //[(Caster�s Max HP/ 3 ) + (Caster�s INT x 10 )+ (Caster�s Job Level x 20 )] x [(Elemental Summon Level + 2) / 3]
+ //[(Caster's Max HP/ 3 ) + (Caster's INT x 10 )+ (Caster's Job Level x 20 )] x [(Elemental Summon Level + 2) / 3]
ele.hp = ele.max_hp = (sd->battle_status.max_hp/3 + sd->battle_status.int_*10 + sd->status.job_level) * ((i + 2) / 3);
- //Caster�s Max SP /4
+ //Caster's Max SP /4
ele.sp = ele.max_sp = sd->battle_status.max_sp/4;
- //Caster�s [ Max SP / (18 / Elemental Summon Skill Level) 1- 100 ]
+ //Caster's [ Max SP / (18 / Elemental Summon Skill Level) 1- 100 ]
ele.atk = (sd->battle_status.max_sp / (18 / i) * 1 - 100);
- //Caster�s [ Max SP / (18 / Elemental Summon Skill Level) ]
+ //Caster's [ Max SP / (18 / Elemental Summon Skill Level) ]
ele.atk2 = sd->battle_status.max_sp / 18;
- //Caster�s HIT + (Caster�s Base Level )
+ //Caster's HIT + (Caster's Base Level)
ele.hit = sd->battle_status.hit + sd->status.base_level;
- //[Elemental Summon Skill Level x (Caster�s INT / 2 + Caster�s DEX / 4)]
+ //[Elemental Summon Skill Level x (Caster's INT / 2 + Caster's DEX / 4)]
ele.matk = i * (sd->battle_status.int_ / 2 + sd->battle_status.dex / 4);
- //150 + [Caster�s DEX / 10] + [Elemental Summon Skill Level x 3 ]
+ //150 + [Caster's DEX / 10] + [Elemental Summon Skill Level x 3 ]
ele.amotion = 150 + sd->battle_status.dex / 10 + i * 3;
- //Caster�s DEF + (Caster�s Base Level / (5 � Elemental Summon Skill Level)
+ //Caster's DEF + (Caster's Base Level / (5 - Elemental Summon Skill Level)
ele.def = sd->battle_status.def + sd->status.base_level / (5-i);
- //Caster�s MDEF + (Caster�s INT / (5 - Elemental Summon Skill Level)
+ //Caster's MDEF + (Caster's INT / (5 - Elemental Summon Skill Level)
ele.mdef = sd->battle_status.mdef + sd->battle_status.int_ / (5-i);
- //Caster�s FLEE + (Caster�s Base Level / (5 � Elemental Summon Skill Level)
+ //Caster's FLEE + (Caster's Base Level / (5 - Elemental Summon Skill Level)
ele.flee = sd->status.base_level / (5-i);
- //Caster�s HIT + (Caster�s Base Level )
+ //Caster's HIT + (Caster's Base Level)
ele.hit = sd->battle_status.hit + sd->status.base_level;
//per individual bonuses
@@ -167,7 +169,7 @@ int elemental_save(struct elemental_data *ed) {
return 1;
}
-static int elemental_summon_end(int tid, unsigned int tick, int id, intptr_t data) {
+int elemental_summon_end_timer(int tid, unsigned int tick, int id, intptr_t data) {
struct map_session_data *sd;
struct elemental_data *ed;
@@ -177,7 +179,7 @@ static int elemental_summon_end(int tid, unsigned int tick, int id, intptr_t dat
return 1;
if( ed->summon_timer != tid ) {
- ShowError("elemental_summon_end %d != %d.\n", ed->summon_timer, tid);
+ ShowError("elemental_summon_end_timer %d != %d.\n", ed->summon_timer, tid);
return 0;
}
@@ -190,7 +192,7 @@ static int elemental_summon_end(int tid, unsigned int tick, int id, intptr_t dat
void elemental_summon_stop(struct elemental_data *ed) {
nullpo_retv(ed);
if( ed->summon_timer != INVALID_TIMER )
- timer->delete(ed->summon_timer, elemental_summon_end);
+ timer->delete(ed->summon_timer, elemental->summon_end_timer);
ed->summon_timer = INVALID_TIMER;
}
@@ -215,7 +217,7 @@ int elemental_delete(struct elemental_data *ed, int reply) {
void elemental_summon_init(struct elemental_data *ed) {
if( ed->summon_timer == INVALID_TIMER )
- ed->summon_timer = timer->add(timer->gettick() + ed->elemental.life_time, elemental_summon_end, ed->master->bl.id, 0);
+ ed->summon_timer = timer->add(timer->gettick() + ed->elemental.life_time, elemental->summon_end_timer, ed->master->bl.id, 0);
ed->regen.state.block = 0;
}
@@ -224,7 +226,7 @@ int elemental_data_received(struct s_elemental *ele, bool flag) {
struct map_session_data *sd;
struct elemental_data *ed;
struct s_elemental_db *db;
- int i = elemental_search_index(ele->class_);
+ int i = elemental->search_index(ele->class_);
if( (sd = map->charid2sd(ele->char_id)) == NULL )
return 0;
@@ -234,7 +236,7 @@ int elemental_data_received(struct s_elemental *ele, bool flag) {
return 0;
}
- db = &elemental->elemental_db[i];
+ db = &elemental->db[i];
if( !sd->ed ) { // Initialize it after first summon.
sd->ed = ed = (struct elemental_data*)aCalloc(1,sizeof(struct elemental_data));
ed->bl.type = BL_ELEM;
@@ -259,7 +261,7 @@ int elemental_data_received(struct s_elemental *ele, bool flag) {
status_calc_elemental(ed,1);
ed->last_spdrain_time = ed->last_thinktime = timer->gettick();
ed->summon_timer = INVALID_TIMER;
- elemental_summon_init(ed);
+ elemental->summon_init(ed);
} else {
memcpy(&sd->ed->elemental, ele, sizeof(struct s_elemental));
ed = sd->ed;
@@ -598,7 +600,7 @@ int elemental_set_target( struct map_session_data *sd, struct block_list *bl ) {
return 1;
}
-static int elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap) {
+int elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap) {
struct elemental_data *ed;
struct block_list **target;
int dist;
@@ -634,7 +636,7 @@ static int elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap
return 0;
}
-static int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *sd, unsigned int tick) {
+int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *sd, unsigned int tick) {
struct block_list *target = NULL;
int master_dist, view_range, mode;
@@ -713,7 +715,7 @@ static int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_
target = map->id2bl(ed->ud.target);
if( !target )
- map->foreachinrange(elemental_ai_sub_timer_activesearch, &ed->bl, view_range, BL_CHAR, ed, &target, status_get_mode(&ed->bl));
+ map->foreachinrange(elemental->ai_sub_timer_activesearch, &ed->bl, view_range, BL_CHAR, ed, &target, status_get_mode(&ed->bl));
if( !target ) { //No targets available.
elemental->unlocktarget(ed);
@@ -743,16 +745,16 @@ static int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_
return 0;
}
-static int elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) {
+int elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) {
unsigned int tick = va_arg(ap,unsigned int);
if(sd->status.ele_id && sd->ed)
- elemental_ai_sub_timer(sd->ed,sd,tick);
+ elemental->ai_sub_timer(sd->ed,sd,tick);
return 0;
}
-static int elemental_ai_timer(int tid, unsigned int tick, int id, intptr_t data) {
- map->map_foreachpc(elemental_ai_sub_foreachclient,tick);
+int elemental_ai_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ map->foreachpc(elemental->ai_sub_foreachclient,tick);
return 0;
}
@@ -765,7 +767,9 @@ int read_elementaldb(void) {
struct status_data *estatus;
sprintf(line, "%s/%s", map->db_path, "elemental_db.txt");
- memset(elemental->elemental_db,0,sizeof(elemental->elemental_db));
+
+ if( runflag == MAPSERVER_ST_RUNNING ) //only necessary after we're up
+ memset(elemental->db,0,sizeof(elemental->db));
fp = fopen(line, "r");
if( !fp ) {
@@ -792,7 +796,7 @@ int read_elementaldb(void) {
continue;
}
- db = &elemental->elemental_db[j];
+ db = &elemental->db[j];
db->class_ = atoi(str[0]);
safestrncpy(db->sprite, str[1], NAME_LENGTH);
safestrncpy(db->name, str[2], NAME_LENGTH);
@@ -882,7 +886,7 @@ int read_elemental_skilldb(void) {
}
class_ = atoi(str[0]);
- ARR_FIND(0, MAX_ELEMENTAL_CLASS, i, class_ == elemental->elemental_db[i].class_);
+ ARR_FIND(0, MAX_ELEMENTAL_CLASS, i, class_ == elemental->db[i].class_);
if( i == MAX_ELEMENTAL_CLASS ) {
ShowError("read_elemental_skilldb : Class not found in elemental_db for skill entry, line %d.\n", k);
continue;
@@ -894,7 +898,7 @@ int read_elemental_skilldb(void) {
continue;
}
- db = &elemental->elemental_db[i];
+ db = &elemental->db[i];
skill_lv = atoi(str[2]);
skillmode = atoi(str[3]);
@@ -919,7 +923,7 @@ int read_elemental_skilldb(void) {
}
void reload_elementaldb(void) {
- read_elementaldb();
+ elemental->read_db();
elemental->reload_skilldb();
}
@@ -928,11 +932,11 @@ void reload_elemental_skilldb(void) {
}
int do_init_elemental(void) {
- read_elementaldb();
+ elemental->read_db();
elemental->read_skilldb();
- timer->add_func_list(elemental_ai_timer,"elemental_ai_timer");
- timer->add_interval(timer->gettick()+MIN_ELETHINKTIME,elemental_ai_timer,0,0,MIN_ELETHINKTIME);
+ timer->add_func_list(elemental->ai_timer,"elemental_ai_timer");
+ timer->add_interval(timer->gettick()+MIN_ELETHINKTIME,elemental->ai_timer,0,0,MIN_ELETHINKTIME);
return 0;
}
@@ -949,6 +953,13 @@ void do_final_elemental(void) {
void elemental_defaults(void) {
elemental = &elemental_s;
+ /* */
+ elemental->init = do_init_elemental;
+ elemental->final = do_final_elemental;
+
+ /* */
+ memset(elemental->db,0,sizeof(elemental->db));
+
/* funcs */
elemental->class = elemental_class;
@@ -978,8 +989,15 @@ void elemental_defaults(void) {
elemental->skill_get_requirements = elemental_skill_get_requirements;
elemental->read_skilldb = read_elemental_skilldb;
- elemental->reload_elementaldb = reload_elementaldb;
+ elemental->reload_db = reload_elementaldb;
elemental->reload_skilldb = reload_elemental_skilldb;
- elemental->do_init_elemental = do_init_elemental;
- elemental->do_final_elemental = do_final_elemental;
+
+ elemental->search_index = elemental_search_index;
+ elemental->summon_init = elemental_summon_init;
+ elemental->summon_end_timer = elemental_summon_end_timer;
+ elemental->ai_sub_timer_activesearch = elemental_ai_sub_timer_activesearch;
+ elemental->ai_sub_timer = elemental_ai_sub_timer;
+ elemental->ai_sub_foreachclient = elemental_ai_sub_foreachclient;
+ elemental->ai_timer = elemental_ai_timer;
+ elemental->read_db = read_elementaldb;
}
diff --git a/src/map/elemental.h b/src/map/elemental.h
index ccc3bcb5f..b42d5c0b7 100644
--- a/src/map/elemental.h
+++ b/src/map/elemental.h
@@ -1,9 +1,16 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
+
#ifndef _ELEMENTAL_H_
#define _ELEMENTAL_H_
+
#include "status.h" // struct status_data, struct status_change
#include "unit.h" // struct unit_data
+
+/**
+ * Defines
+ **/
#define MIN_ELETHINKTIME 100
#define MIN_ELEDISTANCE 2
#define MAX_ELEDISTANCE 5
@@ -13,10 +20,18 @@
#define EL_SKILLMODE_PASIVE 0x1
#define EL_SKILLMODE_ASSIST 0x2
#define EL_SKILLMODE_AGGRESSIVE 0x4
+
+#define elemental_stop_walking(ed, type) unit->stop_walking(&(ed)->bl, type)
+#define elemental_stop_attack(ed) unit->stop_attack(&(ed)->bl)
+
+/**
+ * Structures
+ **/
struct elemental_skill {
unsigned short id, lv;
short mode;
};
+
struct s_elemental_db {
int class_;
char sprite[NAME_LENGTH], name[NAME_LENGTH];
@@ -26,6 +41,7 @@ struct s_elemental_db {
struct view_data vd;
struct elemental_skill skill[MAX_ELESKILLTREE];
};
+
struct elemental_data {
struct block_list bl;
struct unit_data ud;
@@ -46,9 +62,6 @@ struct elemental_data {
int target_id, attacked_id;
};
-#define elemental_stop_walking(ed, type) unit->stop_walking(&(ed)->bl, type)
-#define elemental_stop_attack(ed) unit->stop_attack(&(ed)->bl)
-
/*=====================================
* Interface : elemental.h
* Generated by HerculesInterfaceMaker
@@ -57,8 +70,11 @@ struct elemental_data {
struct elemental_interface {
/* vars */
- struct s_elemental_db elemental_db[MAX_ELEMENTAL_CLASS]; // Elemental Database
+ struct s_elemental_db db[MAX_ELEMENTAL_CLASS]; // Elemental Database
+ /* */
+ int (*init) (void);
+ void (*final) (void);
/* funcs */
bool (*class) (int class_);
struct view_data * (*get_viewdata) (int class_);
@@ -87,11 +103,18 @@ struct elemental_interface {
struct skill_condition (*skill_get_requirements) (uint16 skill_id, uint16 skill_lv);
int (*read_skilldb) (void);
- void (*reload_elementaldb) (void);
+ void (*reload_db) (void);
void (*reload_skilldb) (void);
- int (*do_init_elemental) (void);
- void (*do_final_elemental) (void);
-} elemental_s;
+
+ int (*search_index) (int class_);
+ void (*summon_init) (struct elemental_data *ed);
+ int (*summon_end_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*ai_sub_timer_activesearch) (struct block_list *bl, va_list ap);
+ int (*ai_sub_timer) (struct elemental_data *ed, struct map_session_data *sd, unsigned int tick);
+ int (*ai_sub_foreachclient) (struct map_session_data *sd, va_list ap);
+ int (*ai_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*read_db) (void);
+};
struct elemental_interface *elemental;
diff --git a/src/map/guild.c b/src/map/guild.c
index 797b3b370..30f989f58 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -32,50 +32,10 @@
struct guild_interface guild_s;
-static DBMap* guild_db; // int guild_id -> struct guild*
-static DBMap* castle_db; // int castle_id -> struct guild_castle*
-static DBMap* guild_expcache_db; // int char_id -> struct guild_expcache*
-static DBMap* guild_infoevent_db; // int guild_id -> struct eventlist*
-
-struct eventlist {
- char name[EVENT_NAME_LENGTH];
- struct eventlist *next;
-};
-
-//Constant related to the flash of the Guild EXP cache
-#define GUILD_SEND_XY_INVERVAL 5000 // Interval of sending coordinates and HP
-#define GUILD_PAYEXP_INVERVAL 10000 //Interval (maximum survival time of the cache, in milliseconds)
-#define GUILD_PAYEXP_LIST 8192 //The maximum number of cache
-
-//Guild EXP cache
-
-struct guild_expcache {
- int guild_id, account_id, char_id;
- uint64 exp;
-};
-static struct eri *expcache_ers; //For handling of guild exp payment.
-
-#define MAX_GUILD_SKILL_REQUIRE 5
-struct{
- int id;
- int max;
- struct{
- short id;
- short lv;
- }need[MAX_GUILD_SKILL_REQUIRE];
-} guild_skill_tree[MAX_GUILDSKILL];
-
-int guild_payexp_timer(int tid, unsigned int tick, int id, intptr_t data);
-static int guild_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data);
-
-/* guild flags cache */
-struct npc_data **guild_flags;
-unsigned short guild_flags_count;
-
/*==========================================
* Retrieves and validates the sd pointer for this guild member [Skotlex]
*------------------------------------------*/
-static TBL_PC* guild_sd_check(int guild_id, int account_id, int char_id) {
+TBL_PC* guild_sd_check(int guild_id, int account_id, int char_id) {
TBL_PC* sd = map->id2sd(account_id);
if (!(sd && sd->status.char_id == char_id))
@@ -90,15 +50,14 @@ static TBL_PC* guild_sd_check(int guild_id, int account_id, int char_id) {
return sd;
}
- // Modified [Komurka]
+// Modified [Komurka]
int guild_skill_get_max (int id) {
if (id < GD_SKILLBASE || id >= GD_SKILLBASE+MAX_GUILDSKILL)
return 0;
- return guild_skill_tree[id-GD_SKILLBASE].max;
+ return guild->skill_tree[id-GD_SKILLBASE].max;
}
// Retrive skill_lv learned by guild
-
int guild_checkskill(struct guild *g, int id) {
int idx = id - GD_SKILLBASE;
if (idx < 0 || idx >= MAX_GUILDSKILL)
@@ -109,7 +68,7 @@ int guild_checkskill(struct guild *g, int id) {
/*==========================================
* guild_skill_tree.txt reading - from jA [Komurka]
*------------------------------------------*/
-static bool guild_read_guildskill_tree_db(char* split[], int columns, int current)
+bool guild_read_guildskill_tree_db(char* split[], int columns, int current)
{// <skill id>,<max lv>,<req id1>,<req lv1>,<req id2>,<req lv2>,<req id3>,<req lv3>,<req id4>,<req lv4>,<req id5>,<req lv5>
int k, id, skill_id;
@@ -122,18 +81,18 @@ static bool guild_read_guildskill_tree_db(char* split[], int columns, int curren
return false;
}
- guild_skill_tree[id].id = skill_id;
- guild_skill_tree[id].max = atoi(split[1]);
+ guild->skill_tree[id].id = skill_id;
+ guild->skill_tree[id].max = atoi(split[1]);
- if( guild_skill_tree[id].id == GD_GLORYGUILD && battle_config.require_glory_guild && guild_skill_tree[id].max == 0 )
+ if( guild->skill_tree[id].id == GD_GLORYGUILD && battle_config.require_glory_guild && guild->skill_tree[id].max == 0 )
{// enable guild's glory when required for emblems
- guild_skill_tree[id].max = 1;
+ guild->skill_tree[id].max = 1;
}
for( k = 0; k < MAX_GUILD_SKILL_REQUIRE; k++ )
{
- guild_skill_tree[id].need[k].id = atoi(split[k*2+2]);
- guild_skill_tree[id].need[k].lv = atoi(split[k*2+3]);
+ guild->skill_tree[id].need[k].id = atoi(split[k*2+2]);
+ guild->skill_tree[id].need[k].lv = atoi(split[k*2+3]);
}
return true;
@@ -155,14 +114,14 @@ int guild_check_skill_require(struct guild *g,int id)
for(i=0;i<MAX_GUILD_SKILL_REQUIRE;i++)
{
- if(guild_skill_tree[idx].need[i].id == 0) break;
- if(guild_skill_tree[idx].need[i].lv > guild->checkskill(g,guild_skill_tree[idx].need[i].id))
+ if(guild->skill_tree[idx].need[i].id == 0) break;
+ if(guild->skill_tree[idx].need[i].lv > guild->checkskill(g,guild->skill_tree[idx].need[i].id))
return 0;
}
return 1;
}
-static bool guild_read_castledb(char* str[], int columns, int current)
+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]);
@@ -176,7 +135,7 @@ static bool guild_read_castledb(char* str[], int columns, int current)
safestrncpy(gc->castle_name, str[2], sizeof(gc->castle_name));
safestrncpy(gc->castle_event, str[3], sizeof(gc->castle_event));
- idb_put(castle_db,gc->castle_id,gc);
+ idb_put(guild->castle_db,gc->castle_id,gc);
//intif->guild_castle_info(gc->castle_id);
@@ -186,14 +145,14 @@ static bool guild_read_castledb(char* str[], int columns, int current)
/// lookup: guild id -> guild*
struct guild* guild_search(int guild_id)
{
- return (struct guild*)idb_get(guild_db,guild_id);
+ return (struct guild*)idb_get(guild->db,guild_id);
}
/// lookup: guild name -> guild*
struct guild* guild_searchname(char* str)
{
struct guild* g;
- DBIterator *iter = db_iterator(guild_db);
+ DBIterator *iter = db_iterator(guild->db);
for( g = dbi_first(iter); dbi_exists(iter); g = dbi_next(iter) )
{
@@ -208,14 +167,14 @@ struct guild* guild_searchname(char* str)
/// lookup: castle id -> castle*
struct guild_castle* guild_castle_search(int gcid)
{
- return (struct guild_castle*)idb_get(castle_db,gcid);
+ return (struct guild_castle*)idb_get(guild->castle_db,gcid);
}
/// lookup: map index -> castle*
struct guild_castle* guild_mapindex2gc(short mapindex)
{
struct guild_castle* gc;
- DBIterator *iter = db_iterator(castle_db);
+ DBIterator *iter = db_iterator(guild->castle_db);
for( gc = dbi_first(iter); dbi_exists(iter); gc = dbi_next(iter) )
{
@@ -303,7 +262,7 @@ int guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) {
(g = guild->search(c->guild_id)) == NULL ||
(i = guild->getindex(g, c->account_id, c->char_id)) < 0
) {
- ers_free(expcache_ers, c);
+ ers_free(guild->expcache_ers, c);
return 0;
}
@@ -316,13 +275,13 @@ int guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) {
GMI_EXP,&g->member[i].exp,sizeof(g->member[i].exp));
c->exp=0;
- ers_free(expcache_ers, c);
+ ers_free(guild->expcache_ers, c);
return 0;
}
int guild_payexp_timer(int tid, unsigned int tick, int id, intptr_t data)
{
- guild_expcache_db->clear(guild_expcache_db,guild_payexp_timer_sub);
+ guild->expcache_db->clear(guild->expcache_db,guild->payexp_timer_sub);
return 0;
}
@@ -355,9 +314,9 @@ int guild_send_xy_timer_sub(DBKey key, DBData *data, va_list ap)
}
//Code from party_send_xy_timer [Skotlex]
-static int guild_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
+int guild_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
{
- guild_db->foreach(guild_db,guild_send_xy_timer_sub,tick);
+ guild->db->foreach(guild->db,guild->send_xy_timer_sub,tick);
return 0;
}
@@ -392,7 +351,7 @@ int guild_create(struct map_session_data *sd, const char *name)
return 0;
}
- guild_makemember(&m,sd);
+ guild->makemember(&m,sd);
m.position=0;
intif->guild_create(name,&m);
return 1;
@@ -440,7 +399,7 @@ int guild_npc_request_info(int guild_id,const char *event)
ev=(struct eventlist *)aCalloc(sizeof(struct eventlist),1);
memcpy(ev->name,event,strlen(event));
//The one in the db (if present) becomes the next event from this.
- if (guild_infoevent_db->put(guild_infoevent_db, DB->i2key(guild_id), DB->ptr2data(ev), &prev))
+ if (guild->infoevent_db->put(guild->infoevent_db, DB->i2key(guild_id), DB->ptr2data(ev), &prev))
ev->next = DB->data2ptr(&prev);
}
@@ -501,12 +460,12 @@ int guild_recv_info(struct guild *sg) {
nullpo_ret(sg);
- if((g = (struct guild*)idb_get(guild_db,sg->guild_id))==NULL) {
+ if((g = (struct guild*)idb_get(guild->db,sg->guild_id))==NULL) {
guild_new = true;
g=(struct guild *)aCalloc(1,sizeof(struct guild));
g->instance = NULL;
g->instances = 0;
- idb_put(guild_db,sg->guild_id,g);
+ idb_put(guild->db,sg->guild_id,g);
if( hChSys.ally ) {
struct hChSysCh *channel;
@@ -554,7 +513,7 @@ int guild_recv_info(struct guild *sg) {
}
before=*sg;
//Perform the check on the user because the first load
- guild_check_member(sg);
+ guild->check_member(sg);
if ((sd = map->nick2sd(sg->master)) != NULL) {
//If the guild master is online the first time the guild_info is received,
//that means he was the first to join, so apply guild skill blocking here.
@@ -583,7 +542,7 @@ int guild_recv_info(struct guild *sg) {
for(i=bm=m=0;i<g->max_member;i++){
if(g->member[i].account_id>0){
- sd = g->member[i].sd = guild_sd_check(g->guild_id, g->member[i].account_id, g->member[i].char_id);
+ sd = g->member[i].sd = guild->sd_check(g->guild_id, g->member[i].account_id, g->member[i].char_id);
if (sd) clif->charnameupdate(sd); // [LuzZza]
m++;
}else
@@ -618,7 +577,7 @@ int guild_recv_info(struct guild *sg) {
}
//Occurrence of an event
- if (guild_infoevent_db->remove(guild_infoevent_db, DB->i2key(sg->guild_id), &data)) {
+ if (guild->infoevent_db->remove(guild->infoevent_db, DB->i2key(sg->guild_id), &data)) {
struct eventlist *ev = DB->data2ptr(&data), *ev2;
while(ev) {
npc->event_do(ev->name);
@@ -662,7 +621,7 @@ int guild_invite(struct map_session_data *sd, struct map_session_data *tsd) {
if( tsd->status.guild_id > 0
|| tsd->guild_invite > 0
- || ((map->agit_flag || map->agit2_flag) && maplist[tsd->bl.m].flag.gvg_castle)
+ || ((map->agit_flag || map->agit2_flag) && map->list[tsd->bl.m].flag.gvg_castle)
) {
//Can't invite people inside castles. [Skotlex]
clif->guild_inviteack(sd,0);
@@ -731,7 +690,7 @@ int guild_reply_invite(struct map_session_data* sd, int guild_id, int flag) {
return 0;
}
- guild_makemember(&m,sd);
+ guild->makemember(&m,sd);
intif->guild_addmember(guild_id, &m);
//TODO: send a minimap update to this player
}
@@ -847,7 +806,7 @@ int guild_leave(struct map_session_data* sd, int guild_id, int account_id, int c
if( sd->status.account_id != account_id
|| sd->status.char_id != char_id
|| sd->status.guild_id != guild_id
- || ((map->agit_flag || map->agit2_flag) && maplist[sd->bl.m].flag.gvg_castle)
+ || ((map->agit_flag || map->agit2_flag) && map->list[sd->bl.m].flag.gvg_castle)
)
return 0;
@@ -879,7 +838,7 @@ int guild_expulsion(struct map_session_data* sd, int guild_id, int account_id, i
//Can't leave inside guild castles.
if ((tsd = map->id2sd(account_id))
&& tsd->status.char_id == char_id
- && ((map->agit_flag || map->agit2_flag) && maplist[tsd->bl.m].flag.gvg_castle)
+ && ((map->agit_flag || map->agit2_flag) && map->list[tsd->bl.m].flag.gvg_castle)
)
return 0;
@@ -1015,7 +974,7 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin
g->connect_member=om;
//Ensure validity of pointer (ie: player logs in/out, changes map-server)
- g->member[idx].sd = guild_sd_check(guild_id, account_id, char_id);
+ g->member[idx].sd = guild->sd_check(guild_id, account_id, char_id);
if(oldonline!=online)
clif->guild_memberlogin_notice(g, idx, online);
@@ -1095,8 +1054,7 @@ int guild_memberposition_changed(struct guild *g,int idx,int pos)
/*====================================================
* Change guild title or member
*---------------------------------------------------*/
-int guild_change_position(int guild_id,int idx,
- int mode,int exp_mode,const char *name)
+int guild_change_position(int guild_id,int idx,int mode,int exp_mode,const char *name)
{
struct guild_position p;
@@ -1202,7 +1160,7 @@ int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data)
}
}
{// update guardians (mobs)
- DBIterator* iter = db_iterator(castle_db);
+ DBIterator* iter = db_iterator(guild->castle_db);
struct guild_castle* gc;
for( gc = (struct guild_castle*)dbi_first(iter) ; dbi_exists(iter); gc = (struct guild_castle*)dbi_next(iter) )
{
@@ -1228,9 +1186,9 @@ int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data)
dbi_destroy(iter);
}
{// update npcs (flags or other npcs that used flagemblem to attach to this guild)
- for( i = 0; i < guild_flags_count; i++ ) {
- if( guild_flags[i] && guild_flags[i]->u.scr.guild_id == guild_id ) {
- clif->guild_emblem_area(&guild_flags[i]->bl);
+ for( i = 0; i < guild->flags_count; i++ ) {
+ if( guild->flags[i] && guild->flags[i]->u.scr.guild_id == guild_id ) {
+ clif->guild_emblem_area(&guild->flags[i]->bl);
}
}
}
@@ -1240,12 +1198,12 @@ int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data)
/**
* @see DBCreateData
*/
-static DBData create_expcache(DBKey key, va_list args)
+DBData create_expcache(DBKey key, va_list args)
{
struct guild_expcache *c;
struct map_session_data *sd = va_arg(args, struct map_session_data*);
- c = ers_alloc(expcache_ers, struct guild_expcache);
+ c = ers_alloc(guild->expcache_ers, struct guild_expcache);
c->guild_id = sd->status.guild_id;
c->account_id = sd->status.account_id;
c->char_id = sd->status.char_id;
@@ -1276,7 +1234,7 @@ unsigned int guild_payexp(struct map_session_data *sd,unsigned int exp) {
exp = exp * per / 100;
//Otherwise tax everything.
- c = DB->data2ptr(guild_expcache_db->ensure(guild_expcache_db, DB->i2key(sd->status.char_id), create_expcache, sd));
+ c = DB->data2ptr(guild->expcache_db->ensure(guild->expcache_db, DB->i2key(sd->status.char_id), guild->create_expcache, sd));
if (c->exp > UINT64_MAX - exp)
c->exp = UINT64_MAX;
@@ -1299,7 +1257,7 @@ int guild_getexp(struct map_session_data *sd,int exp)
if (sd->status.guild_id == 0 || sd->guild == NULL)
return 0;
- c = DB->data2ptr(guild_expcache_db->ensure(guild_expcache_db, DB->i2key(sd->status.char_id), create_expcache, sd));
+ c = DB->data2ptr(guild->expcache_db->ensure(guild->expcache_db, DB->i2key(sd->status.char_id), guild->create_expcache, sd));
if (c->exp > UINT64_MAX - exp)
c->exp = UINT64_MAX;
else
@@ -1459,11 +1417,11 @@ int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd)
if(sd->status.guild_id == tsd->status.guild_id)
return 0;
- if( guild_get_alliance_count(g[0],0) >= battle_config.max_guild_alliance ) {
+ if( guild->get_alliance_count(g[0],0) >= battle_config.max_guild_alliance ) {
clif->guild_allianceack(sd,4);
return 0;
}
- if( guild_get_alliance_count(g[1],0) >= battle_config.max_guild_alliance ) {
+ if( guild->get_alliance_count(g[1],0) >= battle_config.max_guild_alliance ) {
clif->guild_allianceack(sd,3);
return 0;
}
@@ -1511,12 +1469,12 @@ int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag)
g=sd->guild;
tg=tsd->guild;
- if(g==NULL || guild_get_alliance_count(g,0) >= battle_config.max_guild_alliance){
+ if(g==NULL || guild->get_alliance_count(g,0) >= battle_config.max_guild_alliance){
clif->guild_allianceack(sd,4);
clif->guild_allianceack(tsd,3);
return 0;
}
- if(tg==NULL || guild_get_alliance_count(tg,0) >= battle_config.max_guild_alliance){
+ if(tg==NULL || guild->get_alliance_count(tg,0) >= battle_config.max_guild_alliance){
clif->guild_allianceack(sd,3);
clif->guild_allianceack(tsd,4);
return 0;
@@ -1582,7 +1540,7 @@ int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd)
if(sd->status.guild_id == tsd->status.guild_id)
return 0;
- if( guild_get_alliance_count(g,1) >= battle_config.max_guild_alliance ) {
+ if( guild->get_alliance_count(g,1) >= battle_config.max_guild_alliance ) {
clif->guild_oppositionack(sd,1);
return 0;
}
@@ -1765,15 +1723,15 @@ int guild_broken(int guild_id,int flag)
}
}
- guild_db->foreach(guild_db,guild_broken_sub,guild_id);
- castle_db->foreach(castle_db,castle_guild_broken_sub,guild_id);
+ guild->db->foreach(guild->db,guild->broken_sub,guild_id);
+ guild->castle_db->foreach(guild->castle_db,guild->castle_broken_sub,guild_id);
gstorage->delete(guild_id);
if( hChSys.ally ) {
if( g->channel != NULL ) {
clif->chsys_delete(( struct hChSysCh * )g->channel);
}
}
- idb_remove(guild_db,guild_id);
+ idb_remove(guild->db,guild_id);
return 0;
}
@@ -1911,7 +1869,7 @@ int guild_break(struct map_session_data *sd,char *name) {
void guild_castle_map_init(void)
{
DBIterator* iter = NULL;
- int num = db_size(castle_db);
+ int num = db_size(guild->castle_db);
if (num > 0) {
struct guild_castle* gc = NULL;
@@ -1919,7 +1877,7 @@ void guild_castle_map_init(void)
CREATE(castle_ids, int, num);
cursor = castle_ids;
- iter = db_iterator(castle_db);
+ iter = db_iterator(guild->castle_db);
for (gc = dbi_first(iter); dbi_exists(iter); gc = dbi_next(iter)) {
*(cursor++) = gc->castle_id;
}
@@ -2015,7 +1973,7 @@ void guild_castle_reconnect(int castle_id, int index, int value)
static struct linkdb_node *gc_save_pending = NULL;
if (castle_id < 0) { // char-server reconnected
- linkdb_foreach(&gc_save_pending, guild_castle_reconnect_sub);
+ linkdb_foreach(&gc_save_pending, guild->castle_reconnect_sub);
linkdb_final(&gc_save_pending);
} else {
int *data;
@@ -2107,7 +2065,7 @@ int guild_checkcastles(struct guild *g)
{
int nb_cas = 0;
struct guild_castle* gc = NULL;
- DBIterator *iter = db_iterator(castle_db);
+ DBIterator *iter = db_iterator(guild->castle_db);
for (gc = dbi_first(iter); dbi_exists(iter); gc = dbi_next(iter)) {
if (gc->guild_id == g->guild_id) {
@@ -2133,38 +2091,38 @@ void guild_flag_add(struct npc_data *nd) {
int i;
/* check */
- for( i = 0; i < guild_flags_count; i++ ) {
- if( guild_flags[i] && guild_flags[i]->bl.id == nd->bl.id ) {
+ for( i = 0; i < guild->flags_count; i++ ) {
+ if( guild->flags[i] && guild->flags[i]->bl.id == nd->bl.id ) {
return;/* exists, most likely updated the id. */
}
}
- i = guild_flags_count;/* save the current slot */
+ i = guild->flags_count;/* save the current slot */
/* add */
- RECREATE(guild_flags,struct npc_data*,++guild_flags_count);
+ RECREATE(guild->flags,struct npc_data*,++guild->flags_count);
/* save */
- guild_flags[i] = nd;
+ guild->flags[i] = nd;
}
void guild_flag_remove(struct npc_data *nd) {
int i, cursor;
- if( guild_flags_count == 0 )
+ if( guild->flags_count == 0 )
return;
/* find it */
- for( i = 0; i < guild_flags_count; i++ ) {
- if( guild_flags[i] && guild_flags[i]->bl.id == nd->bl.id ) {/* found */
- guild_flags[i] = NULL;
+ for( i = 0; i < guild->flags_count; i++ ) {
+ if( guild->flags[i] && guild->flags[i]->bl.id == nd->bl.id ) {/* found */
+ guild->flags[i] = NULL;
break;
}
}
/* compact list */
- for( i = 0, cursor = 0; i < guild_flags_count; i++ ) {
- if( guild_flags[i] == NULL )
+ for( i = 0, cursor = 0; i < guild->flags_count; i++ ) {
+ if( guild->flags[i] == NULL )
continue;
if( cursor != i ) {
- memmove(&guild_flags[cursor], &guild_flags[i], sizeof(struct npc_data*));
+ memmove(&guild->flags[cursor], &guild->flags[i], sizeof(struct npc_data*));
}
cursor++;
@@ -2175,7 +2133,7 @@ void guild_flag_remove(struct npc_data *nd) {
/**
* @see DBApply
*/
-static int eventlist_db_final(DBKey key, DBData *data, va_list ap) {
+int eventlist_db_final(DBKey key, DBData *data, va_list ap) {
struct eventlist *next = NULL;
struct eventlist *current = DB->data2ptr(data);
while (current != NULL) {
@@ -2189,15 +2147,15 @@ static int eventlist_db_final(DBKey key, DBData *data, va_list ap) {
/**
* @see DBApply
*/
-static int guild_expcache_db_final(DBKey key, DBData *data, va_list ap) {
- ers_free(expcache_ers, DB->data2ptr(data));
+int guild_expcache_db_final(DBKey key, DBData *data, va_list ap) {
+ ers_free(guild->expcache_ers, DB->data2ptr(data));
return 0;
}
/**
* @see DBApply
*/
-static int guild_castle_db_final(DBKey key, DBData *data, va_list ap) {
+int guild_castle_db_final(DBKey key, DBData *data, va_list ap) {
struct guild_castle* gc = DB->data2ptr(data);
if( gc->temp_guardians )
aFree(gc->temp_guardians);
@@ -2208,36 +2166,33 @@ static int guild_castle_db_final(DBKey key, DBData *data, va_list ap) {
/* called when scripts are reloaded/unloaded */
void guild_flags_clear(void) {
int i;
- for( i = 0; i < guild_flags_count; i++ ) {
- if( guild_flags[i] )
- guild_flags[i] = NULL;
+ for( i = 0; i < guild->flags_count; i++ ) {
+ if( guild->flags[i] )
+ guild->flags[i] = NULL;
}
- guild_flags_count = 0;
+ guild->flags_count = 0;
}
void do_init_guild(void) {
- guild_db = idb_alloc(DB_OPT_RELEASE_DATA);
- castle_db = idb_alloc(DB_OPT_BASE);
- guild_expcache_db = idb_alloc(DB_OPT_BASE);
- guild_infoevent_db = idb_alloc(DB_OPT_BASE);
- expcache_ers = ers_new(sizeof(struct guild_expcache),"guild.c::expcache_ers",ERS_OPT_NONE);
-
- guild_flags_count = 0;
-
- sv->readdb(map->db_path, "castle_db.txt", ',', 4, 5, -1, &guild_read_castledb);
+ guild->db = idb_alloc(DB_OPT_RELEASE_DATA);
+ guild->castle_db = idb_alloc(DB_OPT_BASE);
+ guild->expcache_db = idb_alloc(DB_OPT_BASE);
+ guild->infoevent_db = idb_alloc(DB_OPT_BASE);
+ guild->expcache_ers = ers_new(sizeof(struct guild_expcache),"guild.c::expcache_ers",ERS_OPT_NONE);
+
+ sv->readdb(map->db_path, "castle_db.txt", ',', 4, 5, -1, guild->read_castledb);
- memset(guild_skill_tree,0,sizeof(guild_skill_tree));
- sv->readdb(map->db_path, "guild_skill_tree.txt", ',', 2+MAX_GUILD_SKILL_REQUIRE*2, 2+MAX_GUILD_SKILL_REQUIRE*2, -1, &guild_read_guildskill_tree_db); //guild skill tree [Komurka]
+ sv->readdb(map->db_path, "guild_skill_tree.txt", ',', 2+MAX_GUILD_SKILL_REQUIRE*2, 2+MAX_GUILD_SKILL_REQUIRE*2, -1, guild->read_guildskill_tree_db); //guild skill tree [Komurka]
- timer->add_func_list(guild_payexp_timer,"guild_payexp_timer");
- timer->add_func_list(guild_send_xy_timer, "guild_send_xy_timer");
- timer->add_interval(timer->gettick()+GUILD_PAYEXP_INVERVAL,guild_payexp_timer,0,0,GUILD_PAYEXP_INVERVAL);
- timer->add_interval(timer->gettick()+GUILD_SEND_XY_INVERVAL,guild_send_xy_timer,0,0,GUILD_SEND_XY_INVERVAL);
+ timer->add_func_list(guild->payexp_timer,"guild_payexp_timer");
+ timer->add_func_list(guild->send_xy_timer, "guild_send_xy_timer");
+ timer->add_interval(timer->gettick()+GUILD_PAYEXP_INVERVAL,guild->payexp_timer,0,0,GUILD_PAYEXP_INVERVAL);
+ timer->add_interval(timer->gettick()+GUILD_SEND_XY_INVERVAL,guild->send_xy_timer,0,0,GUILD_SEND_XY_INVERVAL);
}
void do_final_guild(void) {
- DBIterator *iter = db_iterator(guild_db);
+ DBIterator *iter = db_iterator(guild->db);
struct guild *g;
for( g = dbi_first(iter); dbi_exists(iter); g = dbi_next(iter) ) {
@@ -2251,13 +2206,14 @@ void do_final_guild(void) {
dbi_destroy(iter);
- db_destroy(guild_db);
- castle_db->destroy(castle_db,guild_castle_db_final);
- guild_expcache_db->destroy(guild_expcache_db,guild_expcache_db_final);
- guild_infoevent_db->destroy(guild_infoevent_db,eventlist_db_final);
- ers_destroy(expcache_ers);
-
- aFree(guild_flags);/* never empty; created on boot */
+ db_destroy(guild->db);
+ guild->castle_db->destroy(guild->castle_db,guild->castle_db_final);
+ guild->expcache_db->destroy(guild->expcache_db,guild->expcache_db_final);
+ guild->infoevent_db->destroy(guild->infoevent_db,guild->eventlist_db_final);
+ ers_destroy(guild->expcache_ers);
+
+ if( guild->flags )
+ aFree(guild->flags);
}
void guild_defaults(void) {
guild = &guild_s;
@@ -2265,6 +2221,18 @@ void guild_defaults(void) {
guild->init = do_init_guild;
guild->final = do_final_guild;
/* */
+ guild->db = NULL;
+ guild->castle_db = NULL;
+ guild->expcache_db = NULL;
+ guild->infoevent_db = NULL;
+ /* */
+ guild->expcache_ers = NULL;
+ /* */
+ memset(guild->skill_tree, 0, sizeof(guild->skill_tree));
+ /* guild flags cache */
+ guild->flags = NULL;
+ guild->flags_count = 0;
+ /* */
guild->skill_get_max = guild_skill_get_max;
/* */
guild->checkskill = guild_checkskill;
@@ -2341,4 +2309,22 @@ void guild_defaults(void) {
guild->flags_clear = guild_flags_clear;
/* guild aura */
guild->aura_refresh = guild_guildaura_refresh;
+ /* */
+ guild->payexp_timer = guild_payexp_timer;
+ guild->sd_check = guild_sd_check;
+ guild->read_guildskill_tree_db = guild_read_guildskill_tree_db;
+ guild->read_castledb = guild_read_castledb;
+ guild->payexp_timer_sub = guild_payexp_timer_sub;
+ guild->send_xy_timer_sub = guild_send_xy_timer_sub;
+ guild->send_xy_timer = guild_send_xy_timer;
+ guild->create_expcache = create_expcache;
+ guild->eventlist_db_final = eventlist_db_final;
+ guild->expcache_db_final = guild_expcache_db_final;
+ guild->castle_db_final = guild_castle_db_final;
+ guild->broken_sub = guild_broken_sub;
+ guild->castle_broken_sub = castle_guild_broken_sub;
+ guild->makemember = guild_makemember;
+ guild->check_member = guild_check_member;
+ guild->get_alliance_count = guild_get_alliance_count;
+ guild->castle_reconnect_sub = guild_castle_reconnect_sub;
}
diff --git a/src/map/guild.h b/src/map/guild.h
index 1f61df09e..566ca7ce4 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -6,14 +6,32 @@
#define _GUILD_H_
//#include "../common/mmo.h"
+#include "map.h" // NAME_LENGTH
+
+/**
+ * Declarations
+ **/
struct guild;
struct guild_member;
struct guild_position;
struct guild_castle;
-#include "map.h" // NAME_LENGTH
struct map_session_data;
struct mob_data;
+/**
+ * Defines
+ **/
+#define GUILD_SEND_XY_INVERVAL 5000 // Interval of sending coordinates and HP
+#define GUILD_PAYEXP_INVERVAL 10000 //Interval (maximum survival time of the cache, in milliseconds)
+#define MAX_GUILD_SKILL_REQUIRE 5
+
+/**
+ * Structures
+ **/
+struct eventlist {
+ char name[EVENT_NAME_LENGTH];
+ struct eventlist *next;
+};
//For quick linking to a guardian's info. [Skotlex]
struct guardian_data {
int number; //0-MAX_GUARDIANS-1 = Guardians. MAX_GUARDIANS = Emperium.
@@ -23,11 +41,36 @@ struct guardian_data {
char guild_name[NAME_LENGTH];
struct guild_castle* castle;
};
+struct guild_expcache {
+ int guild_id, account_id, char_id;
+ uint64 exp;
+};
+struct s_guild_skill_tree {
+ int id;
+ int max;
+ struct {
+ short id;
+ short lv;
+ } need[MAX_GUILD_SKILL_REQUIRE];
+};
+
struct guild_interface {
void (*init) (void);
void (*final) (void);
/* */
+ DBMap* db; // int guild_id -> struct guild*
+ DBMap* castle_db; // int castle_id -> struct guild_castle*
+ DBMap* expcache_db; // int char_id -> struct guild_expcache*
+ DBMap* infoevent_db; // int guild_id -> struct eventlist*
+ /* */
+ struct eri *expcache_ers; //For handling of guild exp payment.
+ /* */
+ struct s_guild_skill_tree skill_tree[MAX_GUILDSKILL];
+ /* guild flags cache */
+ struct npc_data **flags;
+ unsigned short flags_count;
+ /* */
int (*skill_get_max) (int id);
/* */
int (*checkskill) (struct guild *g,int id);
@@ -104,6 +147,24 @@ struct guild_interface {
void (*flags_clear) (void);
/* guild aura */
void (*aura_refresh) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
+ /* */
+ int (*payexp_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ TBL_PC* (*sd_check) (int guild_id, int account_id, int char_id);
+ bool (*read_guildskill_tree_db) (char* split[], int columns, int current);
+ bool (*read_castledb) (char* str[], int columns, int current);
+ int (*payexp_timer_sub) (DBKey key, DBData *data, va_list ap);
+ int (*send_xy_timer_sub) (DBKey key, DBData *data, va_list ap);
+ int (*send_xy_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ DBData (*create_expcache) (DBKey key, va_list args);
+ int (*eventlist_db_final) (DBKey key, DBData *data, va_list ap);
+ int (*expcache_db_final) (DBKey key, DBData *data, va_list ap);
+ int (*castle_db_final) (DBKey key, DBData *data, va_list ap);
+ int (*broken_sub) (DBKey key, DBData *data, va_list ap);
+ int (*castle_broken_sub) (DBKey key, DBData *data, va_list ap);
+ void (*makemember) (struct guild_member *m,struct map_session_data *sd);
+ int (*check_member) (struct guild *g);
+ int (*get_alliance_count) (struct guild *g,int flag);
+ void (*castle_reconnect_sub) (void *key, void *data, va_list ap);
};
struct guild_interface *guild;
diff --git a/src/map/homunculus.h b/src/map/homunculus.h
index a90faf2e2..9562ed5c3 100644
--- a/src/map/homunculus.h
+++ b/src/map/homunculus.h
@@ -28,8 +28,6 @@ struct s_homunculus_db {
unsigned char element, race, base_size, evo_size;
};
-extern struct s_homunculus_db homunculus_db[MAX_HOMUNCULUS_CLASS];
-
enum {
HOMUNCULUS_CLASS,
HOMUNCULUS_FOOD
diff --git a/src/map/instance.c b/src/map/instance.c
index 5ef089fae..6ae1d6141 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -33,7 +33,7 @@ bool instance_is_valid(int instance_id) {
return false;
}
- if( instances[instance_id].state == INSTANCE_FREE ) {// uninitialized/freed instance slot
+ if( instance->list[instance_id].state == INSTANCE_FREE ) {// uninitialized/freed instance slot
return false;
}
@@ -88,30 +88,30 @@ int instance_create(int owner_id, const char *name, enum instance_owner_type typ
}
if( type != IOT_NONE && *icptr ) {
- ARR_FIND(0, *icptr, i, strcmp(instances[iptr[i]].name,name) == 0 );
+ ARR_FIND(0, *icptr, i, strcmp(instance->list[iptr[i]].name,name) == 0 );
if( i != *icptr )
return -4;/* already got this instance */
}
- ARR_FIND(0, instance->instances, i, instances[i].state == INSTANCE_FREE);
+ ARR_FIND(0, instance->instances, i, instance->list[i].state == INSTANCE_FREE);
if( i == instance->instances )
- RECREATE(instances, struct instance_data, ++instance->instances);
-
- instances[i].state = INSTANCE_IDLE;
- instances[i].id = i;
- instances[i].idle_timer = INVALID_TIMER;
- instances[i].idle_timeout = instances[i].idle_timeoutval = 0;
- instances[i].progress_timer = INVALID_TIMER;
- instances[i].progress_timeout = 0;
- instances[i].users = 0;
- instances[i].map = NULL;
- instances[i].num_map = 0;
- instances[i].owner_id = owner_id;
- instances[i].owner_type = type;
- instances[i].vars = idb_alloc(DB_OPT_RELEASE_DATA);
-
- safestrncpy( instances[i].name, name, sizeof(instances[i].name) );
+ RECREATE(instance->list, struct instance_data, ++instance->instances);
+
+ instance->list[i].state = INSTANCE_IDLE;
+ instance->list[i].id = i;
+ instance->list[i].idle_timer = INVALID_TIMER;
+ instance->list[i].idle_timeout = instance->list[i].idle_timeoutval = 0;
+ instance->list[i].progress_timer = INVALID_TIMER;
+ instance->list[i].progress_timeout = 0;
+ instance->list[i].users = 0;
+ instance->list[i].map = NULL;
+ instance->list[i].num_map = 0;
+ instance->list[i].owner_id = owner_id;
+ instance->list[i].owner_type = type;
+ instance->list[i].vars = idb_alloc(DB_OPT_RELEASE_DATA);
+
+ safestrncpy( instance->list[i].name, name, sizeof(instance->list[i].name) );
if( type != IOT_NONE ) {
ARR_FIND(0, *icptr, j, iptr[j] == -1);
@@ -159,95 +159,95 @@ int instance_add_map(const char *name, int instance_id, bool usebasename, const
return -2;
}
- if( maplist[m].instance_id >= 0 ) {
+ if( map->list[m].instance_id >= 0 ) {
// Source map already belong to a Instance.
ShowError("instance_add_map: trying to instance already instanced map %s.\n", name);
return -4;
}
- ARR_FIND( instance->start_id, map->map_num, i, maplist[i].name[0] == 0 ); // Searching for a Free Map
+ ARR_FIND( instance->start_id, map->count, i, map->list[i].name[0] == 0 ); // Searching for a Free Map
- if( i < map->map_num )
+ if( i < map->count )
im = i; // Unused map found (old instance)
else {
- im = map->map_num; // Using next map index
- RECREATE(maplist,struct map_data,++map->map_num);
+ im = map->count; // Using next map index
+ RECREATE(map->list,struct map_data,++map->count);
}
- if( maplist[m].cell == (struct mapcell *)0xdeadbeaf )
- map->cellfromcache(&maplist[m]);
+ if( map->list[m].cell == (struct mapcell *)0xdeadbeaf )
+ map->cellfromcache(&map->list[m]);
- memcpy( &maplist[im], &maplist[m], sizeof(struct map_data) ); // Copy source map
+ memcpy( &map->list[im], &map->list[m], sizeof(struct map_data) ); // Copy source map
if( map_name != NULL ) {
- snprintf(maplist[im].name, MAP_NAME_LENGTH, "%s", map_name);
- maplist[im].custom_name = true;
+ snprintf(map->list[im].name, MAP_NAME_LENGTH, "%s", map_name);
+ map->list[im].custom_name = true;
} else
- snprintf(maplist[im].name, MAP_NAME_LENGTH, (usebasename ? "%.3d#%s" : "%.3d%s"), instance_id, name); // Generate Name for Instance Map
- maplist[im].index = mapindex_addmap(-1, maplist[im].name); // Add map index
+ 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
- maplist[im].channel = NULL;
+ map->list[im].channel = NULL;
- if( !maplist[im].index ) {
- maplist[im].name[0] = '\0';
+ if( !map->list[im].index ) {
+ map->list[im].name[0] = '\0';
ShowError("instance_add_map: no more free map indexes.\n");
return -3; // No free map index
}
// Reallocate cells
- num_cell = maplist[im].xs * maplist[im].ys;
- CREATE( maplist[im].cell, struct mapcell, num_cell );
- memcpy( maplist[im].cell, maplist[m].cell, num_cell * sizeof(struct mapcell) );
+ num_cell = map->list[im].xs * map->list[im].ys;
+ CREATE( map->list[im].cell, struct mapcell, num_cell );
+ memcpy( map->list[im].cell, map->list[m].cell, num_cell * sizeof(struct mapcell) );
- size = maplist[im].bxs * maplist[im].bys * sizeof(struct block_list*);
- maplist[im].block = (struct block_list**)aCalloc(size, 1);
- maplist[im].block_mob = (struct block_list**)aCalloc(size, 1);
+ size = map->list[im].bxs * map->list[im].bys * sizeof(struct block_list*);
+ map->list[im].block = (struct block_list**)aCalloc(size, 1);
+ map->list[im].block_mob = (struct block_list**)aCalloc(size, 1);
- memset(maplist[im].npc, 0x00, sizeof(maplist[i].npc));
- maplist[im].npc_num = 0;
+ memset(map->list[im].npc, 0x00, sizeof(map->list[i].npc));
+ map->list[im].npc_num = 0;
- memset(maplist[im].moblist, 0x00, sizeof(maplist[im].moblist));
- maplist[im].mob_delete_timer = INVALID_TIMER;
+ memset(map->list[im].moblist, 0x00, sizeof(map->list[im].moblist));
+ map->list[im].mob_delete_timer = INVALID_TIMER;
//Mimic unit
- if( maplist[m].unit_count ) {
- maplist[im].unit_count = maplist[m].unit_count;
- CREATE( maplist[im].units, struct mapflag_skill_adjust*, maplist[im].unit_count );
+ if( map->list[m].unit_count ) {
+ map->list[im].unit_count = map->list[m].unit_count;
+ CREATE( map->list[im].units, struct mapflag_skill_adjust*, map->list[im].unit_count );
- for(i = 0; i < maplist[im].unit_count; i++) {
- CREATE( maplist[im].units[i], struct mapflag_skill_adjust, 1);
- memcpy( maplist[im].units[i],maplist[m].units[i],sizeof(struct mapflag_skill_adjust));
+ for(i = 0; i < map->list[im].unit_count; i++) {
+ CREATE( map->list[im].units[i], struct mapflag_skill_adjust, 1);
+ memcpy( map->list[im].units[i],map->list[m].units[i],sizeof(struct mapflag_skill_adjust));
}
}
//Mimic skills
- if( maplist[m].skill_count ) {
- maplist[im].skill_count = maplist[m].skill_count;
- CREATE( maplist[im].skills, struct mapflag_skill_adjust*, maplist[im].skill_count );
+ if( map->list[m].skill_count ) {
+ map->list[im].skill_count = map->list[m].skill_count;
+ CREATE( map->list[im].skills, struct mapflag_skill_adjust*, map->list[im].skill_count );
- for(i = 0; i < maplist[im].skill_count; i++) {
- CREATE( maplist[im].skills[i], struct mapflag_skill_adjust, 1);
- memcpy( maplist[im].skills[i],maplist[m].skills[i],sizeof(struct mapflag_skill_adjust));
+ for(i = 0; i < map->list[im].skill_count; i++) {
+ CREATE( map->list[im].skills[i], struct mapflag_skill_adjust, 1);
+ memcpy( map->list[im].skills[i],map->list[m].skills[i],sizeof(struct mapflag_skill_adjust));
}
}
//Mimic zone mf
- if( maplist[m].zone_mf_count ) {
- maplist[im].zone_mf_count = maplist[m].zone_mf_count;
- CREATE( maplist[im].zone_mf, char *, maplist[im].zone_mf_count );
+ if( map->list[m].zone_mf_count ) {
+ map->list[im].zone_mf_count = map->list[m].zone_mf_count;
+ CREATE( map->list[im].zone_mf, char *, map->list[im].zone_mf_count );
- for(i = 0; i < maplist[im].zone_mf_count; i++) {
- CREATE(maplist[im].zone_mf[i], char, MAP_ZONE_MAPFLAG_LENGTH);
- safestrncpy(maplist[im].zone_mf[i],maplist[m].zone_mf[i],MAP_ZONE_MAPFLAG_LENGTH);
+ for(i = 0; i < map->list[im].zone_mf_count; i++) {
+ CREATE(map->list[im].zone_mf[i], char, MAP_ZONE_MAPFLAG_LENGTH);
+ safestrncpy(map->list[im].zone_mf[i],map->list[m].zone_mf[i],MAP_ZONE_MAPFLAG_LENGTH);
}
}
- maplist[im].m = im;
- maplist[im].instance_id = instance_id;
- maplist[im].instance_src_map = m;
- maplist[m].flag.src4instance = 1; // Flag this map as a src map for instances
+ map->list[im].m = im;
+ map->list[im].instance_id = instance_id;
+ map->list[im].instance_src_map = m;
+ map->list[m].flag.src4instance = 1; // Flag this map as a src map for instances
- RECREATE(instances[instance_id].map, unsigned short, ++instances[instance_id].num_map);
+ RECREATE(instance->list[instance_id].map, unsigned short, ++instance->list[instance_id].num_map);
- instances[instance_id].map[instances[instance_id].num_map - 1] = im; // Attach to actual instance
- map->addmap2db(&maplist[im]);
+ instance->list[instance_id].map[instance->list[instance_id].num_map - 1] = im; // Attach to actual instance
+ map->addmap2db(&map->list[im]);
return im;
}
@@ -264,9 +264,9 @@ int instance_map2imap(int16 m, int instance_id) {
return -1;
}
- for( i = 0; i < instances[instance_id].num_map; i++ ) {
- if( instances[instance_id].map[i] && maplist[instances[instance_id].map[i]].instance_src_map == m )
- return instances[instance_id].map[i];
+ for( i = 0; i < instance->list[instance_id].num_map; i++ ) {
+ if( instance->list[instance_id].map[i] && map->list[instance->list[instance_id].map[i]].instance_src_map == m )
+ return instance->list[instance_id].map[i];
}
return -1;
}
@@ -277,9 +277,9 @@ int instance_map2imap(int16 m, int instance_id) {
* result : mapid of map "m" in this instance
*--------------------------------------*/
int instance_mapid2imapid(int16 m, int instance_id) {
- if( maplist[m].flag.src4instance == 0 )
+ if( map->list[m].flag.src4instance == 0 )
return m; // not instances found for this map
- else if( maplist[m].instance_id >= 0 ) { // This map is a instance, not a src map instance
+ else if( map->list[m].instance_id >= 0 ) { // This map is a instance, not a src map instance
ShowError("map_instance_mapid2imapid: already instanced (%d / %d)\n", m, instance_id);
return -1;
}
@@ -313,10 +313,10 @@ void instance_init(int instance_id) {
if( !instance->valid(instance_id) )
return; // nothing to do
- for( i = 0; i < instances[instance_id].num_map; i++ )
- map->foreachinmap(instance_map_npcsub, maplist[instances[instance_id].map[i]].instance_src_map, BL_NPC, instances[instance_id].map[i]);
+ for( i = 0; i < instance->list[instance_id].num_map; i++ )
+ map->foreachinmap(instance_map_npcsub, map->list[instance->list[instance_id].map[i]].instance_src_map, BL_NPC, instance->list[instance_id].map[i]);
- instances[instance_id].state = INSTANCE_BUSY;
+ instance->list[instance_id].state = INSTANCE_BUSY;
}
/*--------------------------------------
@@ -367,70 +367,70 @@ int instance_cleanup_sub(struct block_list *bl, va_list ap) {
void instance_del_map(int16 m) {
int i;
- if( m <= 0 || maplist[m].instance_id == -1 ) {
+ if( m <= 0 || map->list[m].instance_id == -1 ) {
ShowError("instance_del_map: tried to remove non-existing instance map (%d)\n", m);
return;
}
- map->map_foreachpc(instance_del_load, m);
+ map->foreachpc(instance_del_load, m);
map->foreachinmap(instance_cleanup_sub, m, BL_ALL);
- if( maplist[m].mob_delete_timer != INVALID_TIMER )
- timer->delete(maplist[m].mob_delete_timer, map->removemobs_timer);
+ 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));
// Free memory
- aFree(maplist[m].cell);
- aFree(maplist[m].block);
- aFree(maplist[m].block_mob);
+ aFree(map->list[m].cell);
+ aFree(map->list[m].block);
+ aFree(map->list[m].block_mob);
- if( maplist[m].unit_count ) {
- for(i = 0; i < maplist[m].unit_count; i++) {
- aFree(maplist[m].units[i]);
+ if( map->list[m].unit_count ) {
+ for(i = 0; i < map->list[m].unit_count; i++) {
+ aFree(map->list[m].units[i]);
}
- if( maplist[m].units )
- aFree(maplist[m].units);
+ if( map->list[m].units )
+ aFree(map->list[m].units);
}
- if( maplist[m].skill_count ) {
- for(i = 0; i < maplist[m].skill_count; i++) {
- aFree(maplist[m].skills[i]);
+ if( map->list[m].skill_count ) {
+ for(i = 0; i < map->list[m].skill_count; i++) {
+ aFree(map->list[m].skills[i]);
}
- if( maplist[m].skills )
- aFree(maplist[m].skills);
+ if( map->list[m].skills )
+ aFree(map->list[m].skills);
}
- if( maplist[m].zone_mf_count ) {
- for(i = 0; i < maplist[m].zone_mf_count; i++) {
- aFree(maplist[m].zone_mf[i]);
+ if( map->list[m].zone_mf_count ) {
+ for(i = 0; i < map->list[m].zone_mf_count; i++) {
+ aFree(map->list[m].zone_mf[i]);
}
- if( maplist[m].zone_mf )
- aFree(maplist[m].zone_mf);
+ if( map->list[m].zone_mf )
+ aFree(map->list[m].zone_mf);
}
// Remove from instance
- for( i = 0; i < instances[maplist[m].instance_id].num_map; i++ ) {
- if( instances[maplist[m].instance_id].map[i] == m ) {
- instances[maplist[m].instance_id].num_map--;
- for( ; i < instances[maplist[m].instance_id].num_map; i++ )
- instances[maplist[m].instance_id].map[i] = instances[maplist[m].instance_id].map[i+1];
+ for( i = 0; i < instance->list[map->list[m].instance_id].num_map; i++ ) {
+ if( instance->list[map->list[m].instance_id].map[i] == m ) {
+ instance->list[map->list[m].instance_id].num_map--;
+ for( ; i < instance->list[map->list[m].instance_id].num_map; i++ )
+ instance->list[map->list[m].instance_id].map[i] = instance->list[map->list[m].instance_id].map[i+1];
i = -1;
break;
}
}
- if( i == instances[maplist[m].instance_id].num_map )
- ShowError("map_instance_del: failed to remove %s from instance list (%s): %d\n", maplist[m].name, instances[maplist[m].instance_id].name, m);
+ if( i == instance->list[map->list[m].instance_id].num_map )
+ ShowError("map_instance_del: failed to remove %s from instance list (%s): %d\n", map->list[m].name, instance->list[map->list[m].instance_id].name, m);
- if( maplist[m].channel )
- clif->chsys_delete(maplist[m].channel);
-
- map->removemapdb(&maplist[m]);
- memset(&maplist[m], 0x00, sizeof(maplist[0]));
- maplist[m].name[0] = 0;
- maplist[m].instance_id = -1;
- maplist[m].mob_delete_timer = INVALID_TIMER;
+ if( map->list[m].channel )
+ clif->chsys_delete(map->list[m].channel);
+
+ map->removemapdb(&map->list[m]);
+ memset(&map->list[m], 0x00, sizeof(map->list[0]));
+ map->list[m].name[0] = 0;
+ map->list[m].instance_id = -1;
+ map->list[m].mob_delete_timer = INVALID_TIMER;
}
/*--------------------------------------
@@ -456,41 +456,41 @@ void instance_destroy(int instance_id) {
if( !instance->valid(instance_id) )
return; // nothing to do
- if( instances[instance_id].progress_timeout && instances[instance_id].progress_timeout <= now )
+ if( instance->list[instance_id].progress_timeout && instance->list[instance_id].progress_timeout <= now )
type = 1;
- else if( instances[instance_id].idle_timeout && instances[instance_id].idle_timeout <= now )
+ else if( instance->list[instance_id].idle_timeout && instance->list[instance_id].idle_timeout <= now )
type = 2;
else
type = 3;
clif->instance(instance_id, 5, type); // Report users this instance has been destroyed
- switch ( instances[instance_id].owner_type ) {
+ switch ( instance->list[instance_id].owner_type ) {
case IOT_NONE:
break;
case IOT_CHAR:
- if( ( sd = map->id2sd(instances[instance_id].owner_id) ) == NULL ) {
+ if( ( sd = map->id2sd(instance->list[instance_id].owner_id) ) == NULL ) {
break;
}
iptr = sd->instance;
icptr = &sd->instances;
break;
case IOT_PARTY:
- if( ( p = party->search(instances[instance_id].owner_id) ) == NULL ) {
+ if( ( p = party->search(instance->list[instance_id].owner_id) ) == NULL ) {
break;
}
iptr = p->instance;
icptr = &p->instances;
break;
case IOT_GUILD:
- if( ( g = guild->search(instances[instance_id].owner_id) ) == NULL ) {
+ if( ( g = guild->search(instance->list[instance_id].owner_id) ) == NULL ) {
break;
}
iptr = g->instance;
icptr = &g->instances;
break;
default:
- ShowError("instance_destroy: unknown type %d for owner_id %d and name '%s'.\n", instances[instance_id].owner_type,instances[instance_id].owner_id,instances[instance_id].name);
+ ShowError("instance_destroy: unknown type %d for owner_id %d and name '%s'.\n", instance->list[instance_id].owner_type,instance->list[instance_id].owner_id,instance->list[instance_id].name);
break;
}
@@ -500,27 +500,27 @@ void instance_destroy(int instance_id) {
iptr[j] = -1;
}
- while( instances[instance_id].num_map && last != instances[instance_id].map[0] ) { // Remove all maps from instance
- last = instances[instance_id].map[0];
- instance->del_map( instances[instance_id].map[0] );
+ while( instance->list[instance_id].num_map && last != instance->list[instance_id].map[0] ) { // Remove all maps from instance
+ last = instance->list[instance_id].map[0];
+ instance->del_map( instance->list[instance_id].map[0] );
}
- if( instances[instance_id].vars )
- db_destroy(instances[instance_id].vars);
+ if( instance->list[instance_id].vars )
+ db_destroy(instance->list[instance_id].vars);
- if( instances[instance_id].progress_timer != INVALID_TIMER )
- timer->delete( instances[instance_id].progress_timer, instance_destroy_timer);
- if( instances[instance_id].idle_timer != INVALID_TIMER )
- timer->delete( instances[instance_id].idle_timer, instance_destroy_timer);
+ if( instance->list[instance_id].progress_timer != INVALID_TIMER )
+ timer->delete( instance->list[instance_id].progress_timer, instance->destroy_timer);
+ if( instance->list[instance_id].idle_timer != INVALID_TIMER )
+ timer->delete( instance->list[instance_id].idle_timer, instance->destroy_timer);
- instances[instance_id].vars = NULL;
+ instance->list[instance_id].vars = NULL;
- if( instances[instance_id].map )
- aFree(instances[instance_id].map);
+ if( instance->list[instance_id].map )
+ aFree(instance->list[instance_id].map);
- instances[instance_id].map = NULL;
- instances[instance_id].state = INSTANCE_FREE;
- instances[instance_id].num_map = 0;
+ instance->list[instance_id].map = NULL;
+ instance->list[instance_id].state = INSTANCE_FREE;
+ instance->list[instance_id].num_map = 0;
}
/*--------------------------------------
@@ -530,20 +530,20 @@ void instance_check_idle(int instance_id) {
bool idle = true;
unsigned int now = (unsigned int)time(NULL);
- if( !instance->valid(instance_id) || instances[instance_id].idle_timeoutval == 0 )
+ if( !instance->valid(instance_id) || instance->list[instance_id].idle_timeoutval == 0 )
return;
- if( instances[instance_id].users )
+ if( instance->list[instance_id].users )
idle = false;
- if( instances[instance_id].idle_timer != INVALID_TIMER && !idle ) {
- timer->delete(instances[instance_id].idle_timer, instance_destroy_timer);
- instances[instance_id].idle_timer = INVALID_TIMER;
- instances[instance_id].idle_timeout = 0;
+ if( instance->list[instance_id].idle_timer != INVALID_TIMER && !idle ) {
+ timer->delete(instance->list[instance_id].idle_timer, instance->destroy_timer);
+ instance->list[instance_id].idle_timer = INVALID_TIMER;
+ instance->list[instance_id].idle_timeout = 0;
clif->instance(instance_id, 3, 0); // Notify instance users normal instance expiration
- } else if( instances[instance_id].idle_timer == INVALID_TIMER && idle ) {
- instances[instance_id].idle_timeout = now + instances[instance_id].idle_timeoutval;
- instances[instance_id].idle_timer = timer->add( timer->gettick() + instances[instance_id].idle_timeoutval * 1000, instance_destroy_timer, instance_id, 0);
+ } else if( instance->list[instance_id].idle_timer == INVALID_TIMER && idle ) {
+ instance->list[instance_id].idle_timeout = now + instance->list[instance_id].idle_timeoutval;
+ instance->list[instance_id].idle_timer = timer->add( timer->gettick() + instance->list[instance_id].idle_timeoutval * 1000, instance->destroy_timer, instance_id, 0);
clif->instance(instance_id, 4, 0); // Notify instance users it will be destroyed of no user join it again in "X" time
}
}
@@ -558,30 +558,30 @@ void instance_set_timeout(int instance_id, unsigned int progress_timeout, unsign
if( !instance->valid(instance_id) )
return;
- if( instances[instance_id].progress_timer != INVALID_TIMER )
- timer->delete( instances[instance_id].progress_timer, instance_destroy_timer);
- if( instances[instance_id].idle_timer != INVALID_TIMER )
- timer->delete( instances[instance_id].idle_timer, instance_destroy_timer);
+ if( instance->list[instance_id].progress_timer != INVALID_TIMER )
+ timer->delete( instance->list[instance_id].progress_timer, instance->destroy_timer);
+ if( instance->list[instance_id].idle_timer != INVALID_TIMER )
+ timer->delete( instance->list[instance_id].idle_timer, instance->destroy_timer);
if( progress_timeout ) {
- instances[instance_id].progress_timeout = now + progress_timeout;
- instances[instance_id].progress_timer = timer->add( timer->gettick() + progress_timeout * 1000, instance_destroy_timer, instance_id, 0);
+ instance->list[instance_id].progress_timeout = now + progress_timeout;
+ instance->list[instance_id].progress_timer = timer->add( timer->gettick() + progress_timeout * 1000, instance->destroy_timer, instance_id, 0);
} else {
- instances[instance_id].progress_timeout = 0;
- instances[instance_id].progress_timer = INVALID_TIMER;
+ instance->list[instance_id].progress_timeout = 0;
+ instance->list[instance_id].progress_timer = INVALID_TIMER;
}
if( idle_timeout ) {
- instances[instance_id].idle_timeoutval = idle_timeout;
- instances[instance_id].idle_timer = INVALID_TIMER;
- instance_check_idle(instance_id);
+ instance->list[instance_id].idle_timeoutval = idle_timeout;
+ instance->list[instance_id].idle_timer = INVALID_TIMER;
+ instance->check_idle(instance_id);
} else {
- instances[instance_id].idle_timeoutval = 0;
- instances[instance_id].idle_timeout = 0;
- instances[instance_id].idle_timer = INVALID_TIMER;
+ instance->list[instance_id].idle_timeoutval = 0;
+ instance->list[instance_id].idle_timeout = 0;
+ instance->list[instance_id].idle_timer = INVALID_TIMER;
}
- if( instances[instance_id].idle_timer == INVALID_TIMER && instances[instance_id].progress_timer != INVALID_TIMER )
+ if( instance->list[instance_id].idle_timer == INVALID_TIMER && instance->list[instance_id].progress_timer != INVALID_TIMER )
clif->instance(instance_id, 3, 0);
}
@@ -592,9 +592,9 @@ void instance_check_kick(struct map_session_data *sd) {
int16 m = sd->bl.m;
clif->instance_leave(sd->fd);
- if( maplist[m].instance_id >= 0 ) { // User was on the instance map
- if( maplist[m].save.map )
- pc->setpos(sd, maplist[m].save.map, maplist[m].save.x, maplist[m].save.y, CLR_TELEPORT);
+ if( map->list[m].instance_id >= 0 ) { // User was on the instance map
+ if( map->list[m].save.map )
+ pc->setpos(sd, map->list[m].save.map, map->list[m].save.x, map->list[m].save.y, CLR_TELEPORT);
else
pc->setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT);
}
@@ -607,14 +607,15 @@ void do_final_instance(void) {
instance->destroy(i);
}
- if( instances )
- aFree(instances);
+ if( instance->list )
+ aFree(instance->list);
+ instance->list = NULL;
instance->instances = 0;
}
void do_init_instance(void) {
- timer->add_func_list(instance_destroy_timer, "instance_destroy_timer");
+ timer->add_func_list(instance->destroy_timer, "instance_destroy_timer");
}
void instance_defaults(void) {
@@ -627,7 +628,8 @@ void instance_defaults(void) {
instance->start_id = 0;
/* count */
instance->instances = 0;
-
+ /* */
+ instance->list = NULL;
/* */
instance->create = instance_create;
instance->add_map = instance_add_map;
@@ -640,4 +642,5 @@ void instance_defaults(void) {
instance->check_kick = instance_check_kick;
instance->set_timeout = instance_set_timeout;
instance->valid = instance_is_valid;
+ instance->destroy_timer = instance_destroy_timer;
}
diff --git a/src/map/instance.h b/src/map/instance.h
index 164aaf662..ba6d26d59 100644
--- a/src/map/instance.h
+++ b/src/map/instance.h
@@ -42,14 +42,14 @@ struct instance_data {
unsigned int idle_timeout, idle_timeoutval;
};
-struct instance_data *instances;
-
struct instance_interface {
void (*init) (void);
void (*final) (void);
/* start point */
unsigned short start_id;
- unsigned short instances;
+ unsigned short instances;/* count */
+ /* */
+ struct instance_data *list;/* pointer to a chunk of consecutive memory, access via instance->list[0]..etc */
/* */
int (*create) (int party_id, const char *name, enum instance_owner_type type);
int (*add_map) (const char *name, int instance_id, bool usebasename, const char *map_name);
@@ -62,6 +62,7 @@ struct instance_interface {
void (*check_kick) (struct map_session_data *sd);
void (*set_timeout) (int instance_id, unsigned int progress_timeout, unsigned int idle_timeout);
bool (*valid) (int instance_id);
+ int (*destroy_timer) (int tid, unsigned int tick, int id, intptr_t data);
};
struct instance_interface *instance;
diff --git a/src/map/intif.c b/src/map/intif.c
index 97ff8a681..f31ab0f5a 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -33,18 +33,7 @@
#include <string.h>
-static const int packet_len_table[]={
- -1,-1,27,-1, -1, 0,37,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3800-0x380f
- 0, 0, 0, 0, 0, 0, 0, 0, -1,11, 0, 0, 0, 0, 0, 0, //0x3810
- 39,-1,15,15, 14,19, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3820
- 10,-1,15, 0, 79,19, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830
- -1, 0, 0,14, 0, 0, 0, 0, -1,74,-1,11, 11,-1, 0, 0, //0x3840
- -1,-1, 7, 7, 7,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3850 Auctions [Zephyrus]
- -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish]
- -1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 3, 3, 0, //0x3870 Mercenaries [Zephyrus] / Elemental [pakpil]
- 11,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880
- -1,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator]
-};
+struct intif_interface intif_s;
#define inter_fd chrif->fd // alias
@@ -465,8 +454,8 @@ int intif_party_changemap(struct map_session_data *sd,int online) {
if(!sd)
return 0;
- if( (m=map->mapindex2mapid(sd->mapindex)) >= 0 && maplist[m].instance_id >= 0 )
- mapindex = map_id2index(maplist[m].instance_src_map);
+ if( (m=map->mapindex2mapid(sd->mapindex)) >= 0 && map->list[m].instance_id >= 0 )
+ mapindex = map_id2index(map->list[m].instance_src_map);
else
mapindex = sd->mapindex;
@@ -850,7 +839,7 @@ int intif_homunculus_requestdelete(int homun_id)
// Packets receive from inter server
// Wisp/Page reception // rewritten by [Yor]
-int intif_parse_WisMessage(int fd) {
+void intif_parse_WisMessage(int fd) {
struct map_session_data* sd;
char *wisp_source;
char name[NAME_LENGTH];
@@ -863,11 +852,11 @@ int intif_parse_WisMessage(int fd) {
if(sd == NULL || strcmp(sd->status.name, name) != 0) {
//Not found
intif_wis_replay(id,1);
- return 0;
+ return;
}
if(sd->state.ignoreAll) {
intif_wis_replay(id, 2);
- return 0;
+ return;
}
wisp_source = (char *) RFIFOP(fd,8); // speed up [Yor]
for(i=0; i < MAX_IGNORE_LIST &&
@@ -878,17 +867,15 @@ int intif_parse_WisMessage(int fd) {
if (i < MAX_IGNORE_LIST && sd->ignore[i].name[0] != '\0')
{ //Ignored
intif_wis_replay(id, 2);
- return 0;
+ return;
}
//Success to send whisper.
clif->wis_message(sd->fd, wisp_source, (char*)RFIFOP(fd,56),RFIFOW(fd,2)-56);
intif_wis_replay(id,0); // succes
- return 0;
}
// Wisp/page transmission result reception
-int intif_parse_WisEnd(int fd)
-{
+void intif_parse_WisEnd(int fd) {
struct map_session_data* sd;
if (battle_config.etc_log)
@@ -897,11 +884,10 @@ int intif_parse_WisEnd(int fd)
if (sd != NULL)
clif->wis_end(sd->fd, RFIFOB(fd,26));
- return 0;
+ return;
}
-static int mapif_parse_WisToGM_sub(struct map_session_data* sd,va_list va)
-{
+int mapif_parse_WisToGM_sub(struct map_session_data* sd,va_list va) {
int permission = va_arg(va, int);
char *wisp_name;
char *message;
@@ -918,7 +904,7 @@ static int mapif_parse_WisToGM_sub(struct map_session_data* sd,va_list va)
// Received wisp message from map-server via char-server for ALL gm
// 0x3003/0x3803 <packet_len>.w <wispname>.24B <permission>.l <message>.?B
-int mapif_parse_WisToGM(int fd)
+void mapif_parse_WisToGM(int fd)
{
int permission, mes_len;
char Wisp_name[NAME_LENGTH];
@@ -932,15 +918,14 @@ int mapif_parse_WisToGM(int fd)
safestrncpy(Wisp_name, (char*)RFIFOP(fd,4), NAME_LENGTH);
safestrncpy(message, (char*)RFIFOP(fd,32), mes_len);
// information is sent to all online GM
- map->map_foreachpc(mapif_parse_WisToGM_sub, permission, Wisp_name, message, mes_len);
+ map->foreachpc(mapif_parse_WisToGM_sub, permission, Wisp_name, message, mes_len);
if (message != mbuf)
aFree(message);
- return 0;
}
// Request player registre
-int intif_parse_Registers(int fd)
+void intif_parse_Registers(int fd)
{
int j,p,len,max, flag;
struct map_session_data *sd;
@@ -955,7 +940,7 @@ int intif_parse_Registers(int fd)
if (sd && RFIFOB(fd,12) == 3 && sd->status.char_id != char_id)
sd = NULL; //Character registry from another character.
}
- if (!sd) return 1;
+ if (!sd) return;
flag = (sd->save_reg.global_num == -1 || sd->save_reg.account_num == -1 || sd->save_reg.account2_num == -1);
@@ -977,7 +962,7 @@ int intif_parse_Registers(int fd)
break;
default:
ShowError("intif_parse_Registers: Unrecognized type %d\n",RFIFOB(fd,12));
- return 0;
+ return;
}
for(j=0,p=13;j<max && p<RFIFOW(fd,2);j++){
sscanf((char*)RFIFOP(fd,p), "%31c%n", reg[j].str,&len);
@@ -991,10 +976,9 @@ int intif_parse_Registers(int fd)
if (flag && sd->save_reg.global_num > -1 && sd->save_reg.account_num > -1 && sd->save_reg.account2_num > -1)
pc->reg_received(sd); //Received all registry values, execute init scripts and what-not. [Skotlex]
- return 1;
}
-int intif_parse_LoadGuildStorage(int fd)
+void intif_parse_LoadGuildStorage(int fd)
{
struct guild_storage *gstor;
struct map_session_data *sd;
@@ -1002,168 +986,143 @@ int intif_parse_LoadGuildStorage(int fd)
guild_id = RFIFOL(fd,8);
if(guild_id <= 0)
- return 1;
+ return;
sd=map->id2sd( RFIFOL(fd,4) );
if(sd==NULL){
ShowError("intif_parse_LoadGuildStorage: user not found %d\n",RFIFOL(fd,4));
- return 1;
+ return;
}
gstor=gstorage->id2storage(guild_id);
if(!gstor) {
ShowWarning("intif_parse_LoadGuildStorage: error guild_id %d not exist\n",guild_id);
- return 1;
+ return;
}
if (gstor->storage_status == 1) { // Already open.. lets ignore this update
ShowWarning("intif_parse_LoadGuildStorage: storage received for a client already open (User %d:%d)\n", sd->status.account_id, sd->status.char_id);
- return 1;
+ return;
}
if (gstor->dirty) { // Already have storage, and it has been modified and not saved yet! Exploit! [Skotlex]
ShowWarning("intif_parse_LoadGuildStorage: received storage for an already modified non-saved storage! (User %d:%d)\n", sd->status.account_id, sd->status.char_id);
- return 1;
+ return;
}
if( RFIFOW(fd,2)-12 != sizeof(struct guild_storage) ){
ShowError("intif_parse_LoadGuildStorage: data size error %d %d\n",RFIFOW(fd,2)-12 , sizeof(struct guild_storage));
gstor->storage_status = 0;
- return 1;
+ return;
}
memcpy(gstor,RFIFOP(fd,12),sizeof(struct guild_storage));
gstorage->open(sd);
- return 0;
}
// ACK guild_storage saved
-int intif_parse_SaveGuildStorage(int fd)
+void intif_parse_SaveGuildStorage(int fd)
{
gstorage->saved(/*RFIFOL(fd,2), */RFIFOL(fd,6));
- return 0;
}
// ACK party creation
-int intif_parse_PartyCreated(int fd)
+void intif_parse_PartyCreated(int fd)
{
if(battle_config.etc_log)
ShowInfo("intif: party created by account %d\n\n", RFIFOL(fd,2));
party->created(RFIFOL(fd,2), RFIFOL(fd,6),RFIFOB(fd,10),RFIFOL(fd,11), (char *)RFIFOP(fd,15));
- return 0;
}
// Receive party info
-int intif_parse_PartyInfo(int fd)
+void intif_parse_PartyInfo(int fd)
{
if( RFIFOW(fd,2) == 12 ){
ShowWarning("intif: party noinfo (char_id=%d party_id=%d)\n", RFIFOL(fd,4), RFIFOL(fd,8));
party->recv_noinfo(RFIFOL(fd,8), RFIFOL(fd,4));
- return 0;
+ return;
}
if( RFIFOW(fd,2) != 8+sizeof(struct party) )
ShowError("intif: party info : data size error (char_id=%d party_id=%d packet_len=%d expected_len=%d)\n", RFIFOL(fd,4), RFIFOL(fd,8), RFIFOW(fd,2), 8+sizeof(struct party));
party->recv_info((struct party *)RFIFOP(fd,8), RFIFOL(fd,4));
- return 0;
}
// ACK adding party member
-int intif_parse_PartyMemberAdded(int fd)
+void intif_parse_PartyMemberAdded(int fd)
{
if(battle_config.etc_log)
ShowInfo("intif: party member added Party (%d), Account(%d), Char(%d)\n",RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
party->member_added(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10), RFIFOB(fd, 14));
- return 0;
}
// ACK changing party option
-int intif_parse_PartyOptionChanged(int fd)
+void intif_parse_PartyOptionChanged(int fd)
{
party->optionchanged(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOW(fd,10),RFIFOW(fd,12),RFIFOB(fd,14));
- return 0;
}
// ACK member leaving party
-int intif_parse_PartyMemberWithdraw(int fd)
+void intif_parse_PartyMemberWithdraw(int fd)
{
if(battle_config.etc_log)
ShowInfo("intif: party member withdraw: Party(%d), Account(%d), Char(%d)\n",RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
party->member_withdraw(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
- return 0;
}
// ACK party break
-int intif_parse_PartyBroken(int fd)
-{
+void intif_parse_PartyBroken(int fd) {
party->broken(RFIFOL(fd,2));
- return 0;
}
// ACK party on new map
-int intif_parse_PartyMove(int fd)
+void intif_parse_PartyMove(int fd)
{
party->recv_movemap(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOW(fd,14),RFIFOB(fd,16),RFIFOW(fd,17));
- return 0;
}
// ACK party messages
-int intif_parse_PartyMessage(int fd)
-{
+void intif_parse_PartyMessage(int fd) {
party->recv_message(RFIFOL(fd,4),RFIFOL(fd,8),(char *) RFIFOP(fd,12),RFIFOW(fd,2)-12);
- return 0;
}
// ACK guild creation
-int intif_parse_GuildCreated(int fd)
-{
+void intif_parse_GuildCreated(int fd) {
guild->created(RFIFOL(fd,2),RFIFOL(fd,6));
- return 0;
}
// ACK guild infos
-int intif_parse_GuildInfo(int fd)
-{
+void intif_parse_GuildInfo(int fd) {
if(RFIFOW(fd,2) == 8) {
ShowWarning("intif: guild noinfo %d\n",RFIFOL(fd,4));
guild->recv_noinfo(RFIFOL(fd,4));
- return 0;
+ return;
}
if( RFIFOW(fd,2)!=sizeof(struct guild)+4 )
ShowError("intif: guild info : data size error Gid: %d recv size: %d Expected size: %d\n",RFIFOL(fd,4),RFIFOW(fd,2),sizeof(struct guild)+4);
guild->recv_info((struct guild *)RFIFOP(fd,4));
- return 0;
}
// ACK adding guild member
-int intif_parse_GuildMemberAdded(int fd)
-{
+void intif_parse_GuildMemberAdded(int fd) {
if(battle_config.etc_log)
ShowInfo("intif: guild member added %d %d %d %d\n",RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14));
guild->member_added(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14));
- return 0;
}
// ACK member leaving guild
-int intif_parse_GuildMemberWithdraw(int fd)
-{
+void intif_parse_GuildMemberWithdraw(int fd) {
guild->member_withdraw(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),(char *)RFIFOP(fd,55),(char *)RFIFOP(fd,15));
- return 0;
}
// ACK guild member basic info
-int intif_parse_GuildMemberInfoShort(int fd)
-{
+void intif_parse_GuildMemberInfoShort(int fd) {
guild->recv_memberinfoshort(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOW(fd,17));
- return 0;
}
// ACK guild break
-int intif_parse_GuildBroken(int fd)
-{
+void intif_parse_GuildBroken(int fd) {
guild->broken(RFIFOL(fd,2),RFIFOB(fd,6));
- return 0;
}
// basic guild info change notice
// 0x3839 <packet len>.w <guild id>.l <type>.w <data>.?b
-int intif_parse_GuildBasicInfoChanged(int fd)
-{
+void intif_parse_GuildBasicInfoChanged(int fd) {
//int len = RFIFOW(fd,2) - 10;
int guild_id = RFIFOL(fd,4);
int type = RFIFOW(fd,8);
@@ -1171,21 +1130,18 @@ int intif_parse_GuildBasicInfoChanged(int fd)
struct guild* g = guild->search(guild_id);
if( g == NULL )
- return 0;
+ return;
switch(type) {
- case GBI_EXP: g->exp = RFIFOQ(fd,10); break;
- case GBI_GUILDLV: g->guild_lv = RFIFOW(fd,10); break;
- case GBI_SKILLPOINT: g->skill_point = RFIFOL(fd,10); break;
+ case GBI_EXP: g->exp = RFIFOQ(fd,10); break;
+ case GBI_GUILDLV: g->guild_lv = RFIFOW(fd,10); break;
+ case GBI_SKILLPOINT: g->skill_point = RFIFOL(fd,10); break;
}
-
- return 0;
}
// guild member info change notice
// 0x383a <packet len>.w <guild id>.l <account id>.l <char id>.l <type>.w <data>.?b
-int intif_parse_GuildMemberInfoChanged(int fd)
-{
+void intif_parse_GuildMemberInfoChanged(int fd) {
//int len = RFIFOW(fd,2) - 18;
int guild_id = RFIFOL(fd,4);
int account_id = RFIFOL(fd,8);
@@ -1198,130 +1154,103 @@ int intif_parse_GuildMemberInfoChanged(int fd)
g = guild->search(guild_id);
if( g == NULL )
- return 0;
+ return;
idx = guild->getindex(g,account_id,char_id);
if( idx == -1 )
- return 0;
+ return;
switch( type ) {
- case GMI_POSITION: g->member[idx].position = RFIFOW(fd,18); guild->memberposition_changed(g,idx,RFIFOW(fd,18)); break;
- case GMI_EXP: g->member[idx].exp = RFIFOQ(fd,18); break;
- case GMI_HAIR: g->member[idx].hair = RFIFOW(fd,18); break;
- case GMI_HAIR_COLOR: g->member[idx].hair_color = RFIFOW(fd,18); break;
- case GMI_GENDER: g->member[idx].gender = RFIFOW(fd,18); break;
- case GMI_CLASS: g->member[idx].class_ = RFIFOW(fd,18); break;
- case GMI_LEVEL: g->member[idx].lv = RFIFOW(fd,18); break;
+ case GMI_POSITION: g->member[idx].position = RFIFOW(fd,18); guild->memberposition_changed(g,idx,RFIFOW(fd,18)); break;
+ case GMI_EXP: g->member[idx].exp = RFIFOQ(fd,18); break;
+ case GMI_HAIR: g->member[idx].hair = RFIFOW(fd,18); break;
+ case GMI_HAIR_COLOR: g->member[idx].hair_color = RFIFOW(fd,18); break;
+ case GMI_GENDER: g->member[idx].gender = RFIFOW(fd,18); break;
+ case GMI_CLASS: g->member[idx].class_ = RFIFOW(fd,18); break;
+ case GMI_LEVEL: g->member[idx].lv = RFIFOW(fd,18); break;
}
- return 0;
}
// ACK change of guild title
-int intif_parse_GuildPosition(int fd)
-{
+void intif_parse_GuildPosition(int fd) {
if( RFIFOW(fd,2)!=sizeof(struct guild_position)+12 )
ShowError("intif: guild info : data size error\n %d %d %d",RFIFOL(fd,4),RFIFOW(fd,2),sizeof(struct guild_position)+12);
guild->position_changed(RFIFOL(fd,4),RFIFOL(fd,8),(struct guild_position *)RFIFOP(fd,12));
- return 0;
}
// ACK change of guild skill update
-int intif_parse_GuildSkillUp(int fd)
-{
+void intif_parse_GuildSkillUp(int fd) {
guild->skillupack(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
- return 0;
}
// ACK change of guild relationship
-int intif_parse_GuildAlliance(int fd)
-{
+void intif_parse_GuildAlliance(int fd) {
guild->allianceack(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOL(fd,14),RFIFOB(fd,18),(char *) RFIFOP(fd,19),(char *) RFIFOP(fd,43));
- return 0;
}
// ACK change of guild notice
-int intif_parse_GuildNotice(int fd)
-{
+void intif_parse_GuildNotice(int fd) {
guild->notice_changed(RFIFOL(fd,2),(char *) RFIFOP(fd,6),(char *) RFIFOP(fd,66));
- return 0;
}
// ACK change of guild emblem
-int intif_parse_GuildEmblem(int fd)
-{
+void intif_parse_GuildEmblem(int fd) {
guild->emblem_changed(RFIFOW(fd,2)-12,RFIFOL(fd,4),RFIFOL(fd,8), (char *)RFIFOP(fd,12));
- return 0;
}
// ACK guild message
-int intif_parse_GuildMessage(int fd)
-{
+void intif_parse_GuildMessage(int fd) {
guild->recv_message(RFIFOL(fd,4),RFIFOL(fd,8),(char *) RFIFOP(fd,12),RFIFOW(fd,2)-12);
- return 0;
}
// Reply guild castle data request
-int intif_parse_GuildCastleDataLoad(int fd)
-{
- return guild->castledataloadack(RFIFOW(fd,2), (struct guild_castle *)RFIFOP(fd,4));
+void intif_parse_GuildCastleDataLoad(int fd) {
+ guild->castledataloadack(RFIFOW(fd,2), (struct guild_castle *)RFIFOP(fd,4));
}
// ACK change of guildmaster
-int intif_parse_GuildMasterChanged(int fd)
-{
- return guild->gm_changed(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
+void intif_parse_GuildMasterChanged(int fd) {
+ guild->gm_changed(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
}
// Request pet creation
-int intif_parse_CreatePet(int fd)
-{
+void intif_parse_CreatePet(int fd) {
pet->get_egg(RFIFOL(fd,2),RFIFOL(fd,7),RFIFOB(fd,6));
- return 0;
}
// ACK pet data
-int intif_parse_RecvPetData(int fd)
-{
+void intif_parse_RecvPetData(int fd) {
struct s_pet p;
int len;
len=RFIFOW(fd,2);
if(sizeof(struct s_pet)!=len-9) {
if(battle_config.etc_log)
ShowError("intif: pet data: data size error %d %d\n",sizeof(struct s_pet),len-9);
- }
- else{
+ } else {
memcpy(&p,RFIFOP(fd,9),sizeof(struct s_pet));
pet->recv_petdata(RFIFOL(fd,4),&p,RFIFOB(fd,8));
}
-
- return 0;
}
-
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
// ACK pet save data
-int intif_parse_SavePetOk(int fd)
-{
+void intif_parse_SavePetOk(int fd) {
if(RFIFOB(fd,6) == 1)
ShowError("pet data save failure\n");
-
- return 0;
}
-
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
// ACK deleting pet
-int intif_parse_DeletePetOk(int fd)
-{
+void intif_parse_DeletePetOk(int fd) {
if(RFIFOB(fd,2) == 1)
ShowError("pet data delete failure\n");
-
- return 0;
}
// ACK changing name resquest, players,pets,hommon
-int intif_parse_ChangeNameOk(int fd)
+void intif_parse_ChangeNameOk(int fd)
{
struct map_session_data *sd = NULL;
if((sd=map->id2sd(RFIFOL(fd,2)))==NULL ||
sd->status.char_id != RFIFOL(fd,6))
- return 0;
+ return;
switch (RFIFOB(fd,10)) {
case 0: //Players [NOT SUPPORTED YET]
@@ -1333,54 +1262,43 @@ int intif_parse_ChangeNameOk(int fd)
homun->change_name_ack(sd, (char*)RFIFOP(fd,12), RFIFOB(fd,11));
break;
}
- return 0;
+ return;
}
//----------------------------------------------------------------
// Homunculus recv packets [albator]
-int intif_parse_CreateHomunculus(int fd)
-{
- int len;
- len=RFIFOW(fd,2)-9;
+void intif_parse_CreateHomunculus(int fd) {
+ int len = RFIFOW(fd,2)-9;
if(sizeof(struct s_homunculus)!=len) {
if(battle_config.etc_log)
ShowError("intif: create homun data: data size error %d != %d\n",sizeof(struct s_homunculus),len);
- return 0;
+ return;
}
homun->recv_data(RFIFOL(fd,4), (struct s_homunculus*)RFIFOP(fd,9), RFIFOB(fd,8)) ;
- return 0;
}
-int intif_parse_RecvHomunculusData(int fd)
-{
- int len;
-
- len=RFIFOW(fd,2)-9;
+void intif_parse_RecvHomunculusData(int fd) {
+ int len = RFIFOW(fd,2)-9;
if(sizeof(struct s_homunculus)!=len) {
if(battle_config.etc_log)
ShowError("intif: homun data: data size error %d %d\n",sizeof(struct s_homunculus),len);
- return 0;
+ return;
}
homun->recv_data(RFIFOL(fd,4), (struct s_homunculus*)RFIFOP(fd,9), RFIFOB(fd,8));
- return 0;
}
-int intif_parse_SaveHomunculusOk(int fd)
-{
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
+void intif_parse_SaveHomunculusOk(int fd) {
if(RFIFOB(fd,6) != 1)
ShowError("homunculus data save failure for account %d\n", RFIFOL(fd,2));
-
- return 0;
}
-int intif_parse_DeleteHomunculusOk(int fd)
-{
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
+void intif_parse_DeleteHomunculusOk(int fd) {
if(RFIFOB(fd,2) != 1)
ShowError("Homunculus data delete failure\n");
-
- return 0;
}
/**************************************
@@ -1398,15 +1316,14 @@ int intif_request_questlog(TBL_PC *sd)
return 0;
}
-int intif_parse_questlog(int fd)
-{
+void intif_parse_QuestLog(int fd) {
int char_id = RFIFOL(fd, 4);
int i;
TBL_PC * sd = map->charid2sd(char_id);
//User not online anymore
if(!sd)
- return -1;
+ return;
sd->avail_quests = sd->num_quests = (RFIFOW(fd, 2)-8)/sizeof(struct quest);
@@ -1420,7 +1337,7 @@ int intif_parse_questlog(int fd)
if( sd->quest_index[i] < 0 )
{
- ShowError("intif_parse_questlog: quest %d not found in DB.\n",sd->quest_log[i].quest_id);
+ ShowError("intif_parse_QuestLog: quest %d not found in DB.\n",sd->quest_log[i].quest_id);
sd->avail_quests--;
sd->num_quests--;
i--;
@@ -1432,20 +1349,16 @@ int intif_parse_questlog(int fd)
}
quest->pc_login(sd);
-
- return 0;
}
-int intif_parse_questsave(int fd) {
+void intif_parse_QuestSave(int fd) {
int cid = RFIFOL(fd, 2);
TBL_PC *sd = map->id2sd(cid);
if( !RFIFOB(fd, 6) )
- ShowError("intif_parse_questsave: Failed to save quest(s) for character %d!\n", cid);
+ ShowError("intif_parse_QuestSave: Failed to save quest(s) for character %d!\n", cid);
else if( sd )
sd->save_quest = false;
-
- return 0;
}
int intif_quest_save(TBL_PC *sd)
@@ -1491,23 +1404,20 @@ int intif_Mail_requestinbox(int char_id, unsigned char flag)
return 0;
}
-int intif_parse_Mail_inboxreceived(int fd)
-{
+void intif_parse_MailInboxReceived(int fd) {
struct map_session_data *sd;
unsigned char flag = RFIFOB(fd,8);
sd = map->charid2sd(RFIFOL(fd,4));
- if (sd == NULL)
- {
- ShowError("intif_parse_Mail_inboxreceived: char not found %d\n",RFIFOL(fd,4));
- return 1;
+ if (sd == NULL) {
+ ShowError("intif_parse_MailInboxReceived: char not found %d\n",RFIFOL(fd,4));
+ return;
}
- if (RFIFOW(fd,2) - 9 != sizeof(struct mail_data))
- {
- ShowError("intif_parse_Mail_inboxreceived: data size error %d %d\n", RFIFOW(fd,2) - 9, sizeof(struct mail_data));
- return 1;
+ if (RFIFOW(fd,2) - 9 != sizeof(struct mail_data)) {
+ ShowError("intif_parse_MailInboxReceived: data size error %d %d\n", RFIFOW(fd,2) - 9, sizeof(struct mail_data));
+ return;
}
//FIXME: this operation is not safe [ultramage]
@@ -1516,13 +1426,11 @@ int intif_parse_Mail_inboxreceived(int fd)
if (flag)
clif->mail_refreshinbox(sd);
- else if( battle_config.mail_show_status && ( battle_config.mail_show_status == 1 || sd->mail.inbox.unread ) )
- {
+ else if( battle_config.mail_show_status && ( battle_config.mail_show_status == 1 || sd->mail.inbox.unread ) ) {
char output[128];
sprintf(output, msg_txt(510), sd->mail.inbox.unchecked, sd->mail.inbox.unread + sd->mail.inbox.unchecked);
clif->disp_onlyself(sd, output, strlen(output));
}
- return 0;
}
/*------------------------------------------
* Mail Read
@@ -1556,29 +1464,26 @@ int intif_Mail_getattach(int char_id, int mail_id)
return 0;
}
-int intif_parse_Mail_getattach(int fd) {
+void intif_parse_MailGetAttach(int fd) {
struct map_session_data *sd;
struct item item;
int zeny = RFIFOL(fd,8);
sd = map->charid2sd( RFIFOL(fd,4) );
- if (sd == NULL)
- {
- ShowError("intif_parse_Mail_getattach: char not found %d\n",RFIFOL(fd,4));
- return 1;
+ if (sd == NULL) {
+ ShowError("intif_parse_MailGetAttach: char not found %d\n",RFIFOL(fd,4));
+ return;
}
- if (RFIFOW(fd,2) - 12 != sizeof(struct item))
- {
- ShowError("intif_parse_Mail_getattach: data size error %d %d\n", RFIFOW(fd,2) - 16, sizeof(struct item));
- return 1;
+ if (RFIFOW(fd,2) - 12 != sizeof(struct item)) {
+ ShowError("intif_parse_MailGetAttach: data size error %d %d\n", RFIFOW(fd,2) - 16, sizeof(struct item));
+ return;
}
memcpy(&item, RFIFOP(fd,12), sizeof(struct item));
mail->getattachment(sd, zeny, &item);
- return 0;
}
/*------------------------------------------
* Delete Message
@@ -1597,24 +1502,21 @@ int intif_Mail_delete(int char_id, int mail_id)
return 0;
}
-int intif_parse_Mail_delete(int fd) {
+void intif_parse_MailDelete(int fd) {
+ struct map_session_data *sd;
int char_id = RFIFOL(fd,2);
int mail_id = RFIFOL(fd,6);
bool failed = RFIFOB(fd,10);
-
- struct map_session_data *sd = map->charid2sd(char_id);
- if (sd == NULL)
- {
- ShowError("intif_parse_Mail_delete: char not found %d\n", char_id);
- return 1;
+
+ if ( (sd = map->charid2sd(char_id)) == NULL) {
+ ShowError("intif_parse_MailDelete: char not found %d\n", char_id);
+ return;
}
- if (!failed)
- {
+ if (!failed) {
int i;
ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mail_id);
- if( i < MAIL_MAX_INBOX )
- {
+ if( i < MAIL_MAX_INBOX ) {
memset(&sd->mail.inbox.msg[i], 0, sizeof(struct mail_message));
sd->mail.inbox.amount--;
}
@@ -1624,7 +1526,6 @@ int intif_parse_Mail_delete(int fd) {
}
clif->mail_delete(sd->fd, mail_id, failed);
- return 0;
}
/*------------------------------------------
* Return Message
@@ -1643,23 +1544,20 @@ int intif_Mail_return(int char_id, int mail_id)
return 0;
}
-int intif_parse_Mail_return(int fd) {
+void intif_parse_MailReturn(int fd) {
struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2));
int mail_id = RFIFOL(fd,6);
short fail = RFIFOB(fd,10);
- if( sd == NULL )
- {
- ShowError("intif_parse_Mail_return: char not found %d\n",RFIFOL(fd,2));
- return 1;
+ if( sd == NULL ) {
+ ShowError("intif_parse_MailReturn: char not found %d\n",RFIFOL(fd,2));
+ return;
}
- if( !fail )
- {
+ if( !fail ) {
int i;
ARR_FIND(0, MAIL_MAX_INBOX, i, sd->mail.inbox.msg[i].id == mail_id);
- if( i < MAIL_MAX_INBOX )
- {
+ if( i < MAIL_MAX_INBOX ) {
memset(&sd->mail.inbox.msg[i], 0, sizeof(struct mail_message));
sd->mail.inbox.amount--;
}
@@ -1669,7 +1567,6 @@ int intif_parse_Mail_return(int fd) {
}
clif->mail_return(sd->fd, mail_id, fail);
- return 0;
}
/*------------------------------------------
* Send Mail
@@ -1691,15 +1588,13 @@ int intif_Mail_send(int account_id, struct mail_message *msg)
return 1;
}
-static void intif_parse_Mail_send(int fd)
-{
+void intif_parse_MailSend(int fd) {
struct mail_message msg;
struct map_session_data *sd;
bool fail;
- if( RFIFOW(fd,2) - 4 != sizeof(struct mail_message) )
- {
- ShowError("intif_parse_Mail_send: data size error %d %d\n", RFIFOW(fd,2) - 4, sizeof(struct mail_message));
+ if( RFIFOW(fd,2) - 4 != sizeof(struct mail_message) ) {
+ ShowError("intif_parse_MailSend: data size error %d %d\n", RFIFOW(fd,2) - 4, sizeof(struct mail_message));
return;
}
@@ -1719,7 +1614,7 @@ static void intif_parse_Mail_send(int fd)
}
}
-static void intif_parse_Mail_new(int fd) {
+void intif_parse_MailNew(int fd) {
struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2));
int mail_id = RFIFOL(fd,6);
const char* sender_name = (char*)RFIFOP(fd,10);
@@ -1756,7 +1651,7 @@ int intif_Auction_requestlist(int char_id, short type, int price, const char* se
return 0;
}
-static void intif_parse_Auction_results(int fd) {
+void intif_parse_AuctionResults(int fd) {
struct map_session_data *sd = map->charid2sd(RFIFOL(fd,4));
short count = RFIFOW(fd,8);
short pages = RFIFOW(fd,10);
@@ -1784,12 +1679,12 @@ int intif_Auction_register(struct auction_data *auction)
return 1;
}
-static void intif_parse_Auction_register(int fd) {
+void intif_parse_AuctionRegister(int fd) {
struct map_session_data *sd;
struct auction_data auction;
if( RFIFOW(fd,2) - 4 != sizeof(struct auction_data) ) {
- ShowError("intif_parse_Auction_register: data size error %d %d\n", RFIFOW(fd,2) - 4, sizeof(struct auction_data));
+ ShowError("intif_parse_AuctionRegister: data size error %d %d\n", RFIFOW(fd,2) - 4, sizeof(struct auction_data));
return;
}
@@ -1801,9 +1696,7 @@ static void intif_parse_Auction_register(int fd) {
clif->auction_message(sd->fd, 1); // Confirmation Packet ??
if( map->save_settings&32 )
chrif->save(sd,0);
- }
- else
- {
+ } else {
int zeny = auction.hours*battle_config.auction_feeperhour;
clif->auction_message(sd->fd, 4);
@@ -1827,7 +1720,7 @@ int intif_Auction_cancel(int char_id, unsigned int auction_id)
return 0;
}
-static void intif_parse_Auction_cancel(int fd) {
+void intif_parse_AuctionCancel(int fd) {
struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2));
int result = RFIFOB(fd,6);
@@ -1835,10 +1728,10 @@ static void intif_parse_Auction_cancel(int fd) {
return;
switch( result ) {
- case 0: clif->auction_message(sd->fd, 2); break;
- case 1: clif->auction_close(sd->fd, 2); break;
- case 2: clif->auction_close(sd->fd, 1); break;
- case 3: clif->auction_message(sd->fd, 3); break;
+ case 0: clif->auction_message(sd->fd, 2); break;
+ case 1: clif->auction_close(sd->fd, 2); break;
+ case 2: clif->auction_close(sd->fd, 1); break;
+ case 3: clif->auction_message(sd->fd, 3); break;
}
}
@@ -1856,7 +1749,7 @@ int intif_Auction_close(int char_id, unsigned int auction_id)
return 0;
}
-static void intif_parse_Auction_close(int fd) {
+void intif_parse_AuctionClose(int fd) {
struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2));
unsigned char result = RFIFOB(fd,6);
@@ -1864,8 +1757,7 @@ static void intif_parse_Auction_close(int fd) {
return;
clif->auction_close(sd->fd, result);
- if( result == 0 )
- {
+ if( result == 0 ) {
// FIXME: Leeching off a parse function
clif->pAuction_cancelreg(fd, sd);
intif_Auction_requestlist(sd->status.char_id, 6, 0, "", 1);
@@ -1891,7 +1783,7 @@ int intif_Auction_bid(int char_id, const char* name, unsigned int auction_id, in
return 0;
}
-static void intif_parse_Auction_bid(int fd) {
+void intif_parse_AuctionBid(int fd) {
struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2));
int bid = RFIFOL(fd,6);
unsigned char result = RFIFOB(fd,10);
@@ -1910,7 +1802,7 @@ static void intif_parse_Auction_bid(int fd) {
}
// Used to send 'You have won the auction' and 'You failed to won the auction' messages
-static void intif_parse_Auction_message(int fd) {
+void intif_parse_AuctionMessage(int fd) {
struct map_session_data *sd = map->charid2sd(RFIFOL(fd,2));
unsigned char result = RFIFOB(fd,6);
@@ -1938,18 +1830,16 @@ int intif_mercenary_create(struct s_mercenary *merc)
return 0;
}
-int intif_parse_mercenary_received(int fd)
-{
+void intif_parse_MercenaryReceived(int fd) {
int len = RFIFOW(fd,2) - 5;
- if( sizeof(struct s_mercenary) != len )
- {
+
+ if( sizeof(struct s_mercenary) != len ) {
if( battle_config.etc_log )
ShowError("intif: create mercenary data size error %d != %d\n", sizeof(struct s_mercenary), len);
- return 0;
+ return;
}
mercenary->data_received((struct s_mercenary*)RFIFOP(fd,5), RFIFOB(fd,4));
- return 0;
}
int intif_mercenary_request(int merc_id, int char_id)
@@ -1976,13 +1866,10 @@ int intif_mercenary_delete(int merc_id)
WFIFOSET(inter_fd,6);
return 0;
}
-
-int intif_parse_mercenary_deleted(int fd)
-{
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
+void intif_parse_MercenaryDeleted(int fd) {
if( RFIFOB(fd,2) != 1 )
ShowError("Mercenary data delete failure\n");
-
- return 0;
}
int intif_mercenary_save(struct s_mercenary *merc)
@@ -1999,13 +1886,10 @@ int intif_mercenary_save(struct s_mercenary *merc)
WFIFOSET(inter_fd,size);
return 0;
}
-
-int intif_parse_mercenary_saved(int fd)
-{
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
+void intif_parse_MercenarySaved(int fd) {
if( RFIFOB(fd,2) != 1 )
ShowError("Mercenary data save failure\n");
-
- return 0;
}
/*==========================================
@@ -2026,18 +1910,16 @@ int intif_elemental_create(struct s_elemental *ele)
return 0;
}
-int intif_parse_elemental_received(int fd)
-{
+void intif_parse_ElementalReceived(int fd) {
int len = RFIFOW(fd,2) - 5;
- if( sizeof(struct s_elemental) != len )
- {
+
+ if( sizeof(struct s_elemental) != len ) {
if( battle_config.etc_log )
ShowError("intif: create elemental data size error %d != %d\n", sizeof(struct s_elemental), len);
- return 0;
+ return;
}
elemental->data_received((struct s_elemental*)RFIFOP(fd,5), RFIFOB(fd,4));
- return 0;
}
int intif_elemental_request(int ele_id, int char_id)
@@ -2064,13 +1946,10 @@ int intif_elemental_delete(int ele_id)
WFIFOSET(inter_fd,6);
return 0;
}
-
-int intif_parse_elemental_deleted(int fd)
-{
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
+void intif_parse_ElementalDeleted(int fd) {
if( RFIFOB(fd,2) != 1 )
ShowError("Elemental data delete failure\n");
-
- return 0;
}
int intif_elemental_save(struct s_elemental *ele)
@@ -2087,13 +1966,10 @@ int intif_elemental_save(struct s_elemental *ele)
WFIFOSET(inter_fd,size);
return 0;
}
-
-int intif_parse_elemental_saved(int fd)
-{
+/* Really? Whats the point, shouldn't be sent when successful then [Ind] */
+void intif_parse_ElementalSaved(int fd) {
if( RFIFOB(fd,2) != 1 )
ShowError("Elemental data save failure\n");
-
- return 0;
}
void intif_request_accinfo( int u_fd, int aid, int group_lv, char* query ) {
@@ -2139,12 +2015,12 @@ int intif_parse(int fd)
int packet_len, cmd;
cmd = RFIFOW(fd,0);
// Verify ID of the packet
- if(cmd<0x3800 || cmd>=0x3800+(sizeof(packet_len_table)/sizeof(packet_len_table[0])) ||
- packet_len_table[cmd-0x3800]==0){
+ if(cmd<0x3800 || cmd>=0x3800+(sizeof(intif->packet_len_table)/sizeof(intif->packet_len_table[0])) ||
+ intif->packet_len_table[cmd-0x3800]==0){
return 0;
}
// Check the length of the packet
- packet_len = packet_len_table[cmd-0x3800];
+ packet_len = intif->packet_len_table[cmd-0x3800];
if(packet_len==-1){
if(RFIFOREST(fd)<4)
return 2;
@@ -2155,81 +2031,81 @@ int intif_parse(int fd)
}
// Processing branch
switch(cmd){
- case 0x3800:
- if (RFIFOL(fd,4) == 0xFF000000) //Normal announce.
- clif->broadcast(NULL, (char *) RFIFOP(fd,16), packet_len-16, BC_DEFAULT, ALL_CLIENT);
- else //Color announce.
- clif->broadcast2(NULL, (char *) RFIFOP(fd,16), packet_len-16, RFIFOL(fd,4), RFIFOW(fd,8), RFIFOW(fd,10), RFIFOW(fd,12), RFIFOW(fd,14), ALL_CLIENT);
- break;
- case 0x3801: intif_parse_WisMessage(fd); break;
- case 0x3802: intif_parse_WisEnd(fd); break;
- case 0x3803: mapif_parse_WisToGM(fd); break;
- case 0x3804: intif_parse_Registers(fd); break;
- case 0x3806: intif_parse_ChangeNameOk(fd); break;
- case 0x3807: intif_parse_MessageToFD(fd); break;
- case 0x3818: intif_parse_LoadGuildStorage(fd); break;
- case 0x3819: intif_parse_SaveGuildStorage(fd); break;
- case 0x3820: intif_parse_PartyCreated(fd); break;
- case 0x3821: intif_parse_PartyInfo(fd); break;
- case 0x3822: intif_parse_PartyMemberAdded(fd); break;
- case 0x3823: intif_parse_PartyOptionChanged(fd); break;
- case 0x3824: intif_parse_PartyMemberWithdraw(fd); break;
- case 0x3825: intif_parse_PartyMove(fd); break;
- case 0x3826: intif_parse_PartyBroken(fd); break;
- case 0x3827: intif_parse_PartyMessage(fd); break;
- case 0x3830: intif_parse_GuildCreated(fd); break;
- case 0x3831: intif_parse_GuildInfo(fd); break;
- case 0x3832: intif_parse_GuildMemberAdded(fd); break;
- case 0x3834: intif_parse_GuildMemberWithdraw(fd); break;
- case 0x3835: intif_parse_GuildMemberInfoShort(fd); break;
- case 0x3836: intif_parse_GuildBroken(fd); break;
- case 0x3837: intif_parse_GuildMessage(fd); break;
- case 0x3839: intif_parse_GuildBasicInfoChanged(fd); break;
- case 0x383a: intif_parse_GuildMemberInfoChanged(fd); break;
- case 0x383b: intif_parse_GuildPosition(fd); break;
- case 0x383c: intif_parse_GuildSkillUp(fd); break;
- case 0x383d: intif_parse_GuildAlliance(fd); break;
- case 0x383e: intif_parse_GuildNotice(fd); break;
- case 0x383f: intif_parse_GuildEmblem(fd); break;
- case 0x3840: intif_parse_GuildCastleDataLoad(fd); break;
- case 0x3843: intif_parse_GuildMasterChanged(fd); break;
-
- //Quest system
- case 0x3860: intif_parse_questlog(fd); break;
- case 0x3861: intif_parse_questsave(fd); break;
-
-// Mail System
- case 0x3848: intif_parse_Mail_inboxreceived(fd); break;
- case 0x3849: intif_parse_Mail_new(fd); break;
- case 0x384a: intif_parse_Mail_getattach(fd); break;
- case 0x384b: intif_parse_Mail_delete(fd); break;
- case 0x384c: intif_parse_Mail_return(fd); break;
- case 0x384d: intif_parse_Mail_send(fd); break;
-// Auction System
- case 0x3850: intif_parse_Auction_results(fd); break;
- case 0x3851: intif_parse_Auction_register(fd); break;
- case 0x3852: intif_parse_Auction_cancel(fd); break;
- case 0x3853: intif_parse_Auction_close(fd); break;
- case 0x3854: intif_parse_Auction_message(fd); break;
- case 0x3855: intif_parse_Auction_bid(fd); break;
-
-// Mercenary System
- case 0x3870: intif_parse_mercenary_received(fd); break;
- case 0x3871: intif_parse_mercenary_deleted(fd); break;
- case 0x3872: intif_parse_mercenary_saved(fd); break;
-// Elemental System
- case 0x387c: intif_parse_elemental_received(fd); break;
- case 0x387d: intif_parse_elemental_deleted(fd); break;
- case 0x387e: intif_parse_elemental_saved(fd); break;
-
- case 0x3880: intif_parse_CreatePet(fd); break;
- case 0x3881: intif_parse_RecvPetData(fd); break;
- case 0x3882: intif_parse_SavePetOk(fd); break;
- case 0x3883: intif_parse_DeletePetOk(fd); break;
- case 0x3890: intif_parse_CreateHomunculus(fd); break;
- case 0x3891: intif_parse_RecvHomunculusData(fd); break;
- case 0x3892: intif_parse_SaveHomunculusOk(fd); break;
- case 0x3893: intif_parse_DeleteHomunculusOk(fd); break;
+ case 0x3800:
+ if (RFIFOL(fd,4) == 0xFF000000) //Normal announce.
+ clif->broadcast(NULL, (char *) RFIFOP(fd,16), packet_len-16, BC_DEFAULT, ALL_CLIENT);
+ else //Color announce.
+ clif->broadcast2(NULL, (char *) RFIFOP(fd,16), packet_len-16, RFIFOL(fd,4), RFIFOW(fd,8), RFIFOW(fd,10), RFIFOW(fd,12), RFIFOW(fd,14), ALL_CLIENT);
+ break;
+ case 0x3801: intif->pWisMessage(fd); break;
+ case 0x3802: intif->pWisEnd(fd); break;
+ case 0x3803: intif->pWisToGM(fd); break;
+ case 0x3804: intif->pRegisters(fd); break;
+ case 0x3806: intif->pChangeNameOk(fd); break;
+ case 0x3807: intif->pMessageToFD(fd); break;
+ case 0x3818: intif->pLoadGuildStorage(fd); break;
+ case 0x3819: intif->pSaveGuildStorage(fd); break;
+ case 0x3820: intif->pPartyCreated(fd); break;
+ case 0x3821: intif->pPartyInfo(fd); break;
+ case 0x3822: intif->pPartyMemberAdded(fd); break;
+ case 0x3823: intif->pPartyOptionChanged(fd); break;
+ case 0x3824: intif->pPartyMemberWithdraw(fd); break;
+ case 0x3825: intif->pPartyMove(fd); break;
+ case 0x3826: intif->pPartyBroken(fd); break;
+ case 0x3827: intif->pPartyMessage(fd); break;
+ case 0x3830: intif->pGuildCreated(fd); break;
+ case 0x3831: intif->pGuildInfo(fd); break;
+ case 0x3832: intif->pGuildMemberAdded(fd); break;
+ case 0x3834: intif->pGuildMemberWithdraw(fd); break;
+ case 0x3835: intif->pGuildMemberInfoShort(fd); break;
+ case 0x3836: intif->pGuildBroken(fd); break;
+ case 0x3837: intif->pGuildMessage(fd); break;
+ case 0x3839: intif->pGuildBasicInfoChanged(fd); break;
+ case 0x383a: intif->pGuildMemberInfoChanged(fd); break;
+ case 0x383b: intif->pGuildPosition(fd); break;
+ case 0x383c: intif->pGuildSkillUp(fd); break;
+ case 0x383d: intif->pGuildAlliance(fd); break;
+ case 0x383e: intif->pGuildNotice(fd); break;
+ case 0x383f: intif->pGuildEmblem(fd); break;
+ case 0x3840: intif->pGuildCastleDataLoad(fd); break;
+ case 0x3843: intif->pGuildMasterChanged(fd); break;
+
+ //Quest system
+ case 0x3860: intif->pQuestLog(fd); break;
+ case 0x3861: intif->pQuestSave(fd); break;
+
+ // Mail System
+ case 0x3848: intif->pMailInboxReceived(fd); break;
+ case 0x3849: intif->pMailNew(fd); break;
+ case 0x384a: intif->pMailGetAttach(fd); break;
+ case 0x384b: intif->pMailDelete(fd); break;
+ case 0x384c: intif->pMailReturn(fd); break;
+ case 0x384d: intif->pMailSend(fd); break;
+ // Auction System
+ case 0x3850: intif->pAuctionResults(fd); break;
+ case 0x3851: intif->pAuctionRegister(fd); break;
+ case 0x3852: intif->pAuctionCancel(fd); break;
+ case 0x3853: intif->pAuctionClose(fd); break;
+ case 0x3854: intif->pAuctionMessage(fd); break;
+ case 0x3855: intif->pAuctionBid(fd); break;
+
+ // Mercenary System
+ case 0x3870: intif->pMercenaryReceived(fd); break;
+ case 0x3871: intif->pMercenaryDeleted(fd); break;
+ case 0x3872: intif->pMercenarySaved(fd); break;
+ // Elemental System
+ case 0x387c: intif->pElementalReceived(fd); break;
+ case 0x387d: intif->pElementalDeleted(fd); break;
+ case 0x387e: intif->pElementalSaved(fd); break;
+
+ case 0x3880: intif->pCreatePet(fd); break;
+ case 0x3881: intif->pRecvPetData(fd); break;
+ case 0x3882: intif->pSavePetOk(fd); break;
+ case 0x3883: intif->pDeletePetOk(fd); break;
+ case 0x3890: intif->pCreateHomunculus(fd); break;
+ case 0x3891: intif->pRecvHomunculusData(fd); break;
+ case 0x3892: intif->pSaveHomunculusOk(fd); break;
+ case 0x3893: intif->pDeleteHomunculusOk(fd); break;
default:
ShowError("intif_parse : unknown packet %d %x\n",fd,RFIFOW(fd,0));
return 0;
@@ -2245,30 +2121,38 @@ int intif_parse(int fd)
* created by Susu
*-------------------------------------*/
void intif_defaults(void) {
+ const int packet_len_table [INTIF_PACKET_LEN_TABLE_SIZE] = {
+ -1,-1,27,-1, -1, 0,37,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3800-0x380f
+ 0, 0, 0, 0, 0, 0, 0, 0, -1,11, 0, 0, 0, 0, 0, 0, //0x3810
+ 39,-1,15,15, 14,19, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3820
+ 10,-1,15, 0, 79,19, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830
+ -1, 0, 0,14, 0, 0, 0, 0, -1,74,-1,11, 11,-1, 0, 0, //0x3840
+ -1,-1, 7, 7, 7,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3850 Auctions [Zephyrus]
+ -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish]
+ -1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 3, 3, 0, //0x3870 Mercenaries [Zephyrus] / Elemental [pakpil]
+ 11,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880
+ -1,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator]
+ };
+
intif = &intif_s;
- /* funcs */
+ /* */
+ memcpy(intif->packet_len_table,&packet_len_table,sizeof(intif->packet_len_table));
+ /* funcs */
intif->parse = intif_parse;
-
intif->create_pet = intif_create_pet;
-
intif->broadcast = intif_broadcast;
intif->broadcast2 = intif_broadcast2;
intif->main_message = intif_main_message;
-
intif->wis_message = intif_wis_message;
intif->wis_message_to_gm = intif_wis_message_to_gm;
-
intif->saveregistry = intif_saveregistry;
intif->request_registry = intif_request_registry;
-
intif->request_guild_storage = intif_request_guild_storage;
intif->send_guild_storage = intif_send_guild_storage;
-
intif->create_party = intif_create_party;
intif->request_partyinfo = intif_request_partyinfo;
-
intif->party_addmember = intif_party_addmember;
intif->party_changeoption = intif_party_changeoption;
intif->party_leave = intif_party_leave;
@@ -2276,7 +2160,6 @@ void intif_defaults(void) {
intif->break_party = intif_break_party;
intif->party_message = intif_party_message;
intif->party_leaderchange = intif_party_leaderchange;
-
intif->guild_create = intif_guild_create;
intif->guild_request_info = intif_guild_request_info;
intif->guild_addmember = intif_guild_addmember;
@@ -2330,6 +2213,68 @@ void intif_defaults(void) {
intif->elemental_save = intif_elemental_save;
/* @accinfo */
intif->request_accinfo = intif_request_accinfo;
-
+ /* */
intif->CheckForCharServer = CheckForCharServer;
+ /* */
+ intif->pWisMessage = intif_parse_WisMessage;
+ intif->pWisEnd = intif_parse_WisEnd;
+ intif->pWisToGM_sub = mapif_parse_WisToGM_sub;
+ intif->pWisToGM = mapif_parse_WisToGM;
+ intif->pRegisters = intif_parse_Registers;
+ intif->pChangeNameOk = intif_parse_ChangeNameOk;
+ intif->pMessageToFD = intif_parse_MessageToFD;
+ intif->pLoadGuildStorage = intif_parse_LoadGuildStorage;
+ intif->pSaveGuildStorage = intif_parse_SaveGuildStorage;
+ intif->pPartyCreated = intif_parse_PartyCreated;
+ intif->pPartyInfo = intif_parse_PartyInfo;
+ intif->pPartyMemberAdded = intif_parse_PartyMemberAdded;
+ intif->pPartyOptionChanged = intif_parse_PartyOptionChanged;
+ intif->pPartyMemberWithdraw = intif_parse_PartyMemberWithdraw;
+ intif->pPartyMove = intif_parse_PartyMove;
+ intif->pPartyBroken = intif_parse_PartyBroken;
+ intif->pPartyMessage = intif_parse_PartyMessage;
+ intif->pGuildCreated = intif_parse_GuildCreated;
+ intif->pGuildInfo = intif_parse_GuildInfo;
+ intif->pGuildMemberAdded = intif_parse_GuildMemberAdded;
+ intif->pGuildMemberWithdraw = intif_parse_GuildMemberWithdraw;
+ intif->pGuildMemberInfoShort = intif_parse_GuildMemberInfoShort;
+ intif->pGuildBroken = intif_parse_GuildBroken;
+ intif->pGuildMessage = intif_parse_GuildMessage;
+ intif->pGuildBasicInfoChanged = intif_parse_GuildBasicInfoChanged;
+ intif->pGuildMemberInfoChanged = intif_parse_GuildMemberInfoChanged;
+ intif->pGuildPosition = intif_parse_GuildPosition;
+ intif->pGuildSkillUp = intif_parse_GuildSkillUp;
+ intif->pGuildAlliance = intif_parse_GuildAlliance;
+ intif->pGuildNotice = intif_parse_GuildNotice;
+ intif->pGuildEmblem = intif_parse_GuildEmblem;
+ intif->pGuildCastleDataLoad = intif_parse_GuildCastleDataLoad;
+ intif->pGuildMasterChanged = intif_parse_GuildMasterChanged;
+ intif->pQuestLog = intif_parse_QuestLog;
+ intif->pQuestSave = intif_parse_QuestSave;
+ intif->pMailInboxReceived = intif_parse_MailInboxReceived;
+ intif->pMailNew = intif_parse_MailNew;
+ intif->pMailGetAttach = intif_parse_MailGetAttach;
+ intif->pMailDelete = intif_parse_MailDelete;
+ intif->pMailReturn = intif_parse_MailReturn;
+ intif->pMailSend = intif_parse_MailSend;
+ intif->pAuctionResults = intif_parse_AuctionResults;
+ intif->pAuctionRegister = intif_parse_AuctionRegister;
+ intif->pAuctionCancel = intif_parse_AuctionCancel;
+ intif->pAuctionClose = intif_parse_AuctionClose;
+ intif->pAuctionMessage = intif_parse_AuctionMessage;
+ intif->pAuctionBid = intif_parse_AuctionBid;
+ intif->pMercenaryReceived = intif_parse_MercenaryReceived;
+ intif->pMercenaryDeleted = intif_parse_MercenaryDeleted;
+ intif->pMercenarySaved = intif_parse_MercenarySaved;
+ intif->pElementalReceived = intif_parse_ElementalReceived;
+ intif->pElementalDeleted = intif_parse_ElementalDeleted;
+ intif->pElementalSaved = intif_parse_ElementalSaved;
+ intif->pCreatePet = intif_parse_CreatePet;
+ intif->pRecvPetData = intif_parse_RecvPetData;
+ intif->pSavePetOk = intif_parse_SavePetOk;
+ intif->pDeletePetOk = intif_parse_DeletePetOk;
+ intif->pCreateHomunculus = intif_parse_CreateHomunculus;
+ intif->pRecvHomunculusData = intif_parse_RecvHomunculusData;
+ intif->pSaveHomunculusOk = intif_parse_SaveHomunculusOk;
+ intif->pDeleteHomunculusOk = intif_parse_DeleteHomunculusOk;
}
diff --git a/src/map/intif.h b/src/map/intif.h
index 8abcf819d..768e735de 100644
--- a/src/map/intif.h
+++ b/src/map/intif.h
@@ -1,8 +1,14 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
+
#ifndef _INTIF_H_
#define _INFIF_H_
-//#include "../common/mmo.h"
+
+
+/**
+ * Declarations
+ **/
struct party_member;
struct guild_member;
struct guild_position;
@@ -13,17 +19,13 @@ struct s_elemental;
struct mail_message;
struct auction_data;
-
-
-
-
+/**
+ * Defines
+ **/
#define intif_rename_pc(sd, name) intif->rename(sd, 0, name)
#define intif_rename_pet(sd, name) intif->rename(sd, 1, name)
#define intif_rename_hom(sd, name) intif->rename(sd, 2, name)
-
-
-
-
+#define INTIF_PACKET_LEN_TABLE_SIZE 161
/*=====================================
@@ -32,30 +34,23 @@ struct auction_data;
* created by Susu
*-------------------------------------*/
struct intif_interface {
+ /* */
+ int packet_len_table[INTIF_PACKET_LEN_TABLE_SIZE];
/* funcs */
-
-
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);
-
+ 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 (*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_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);
-
int (*request_guild_storage) (int account_id, int guild_id);
int (*send_guild_storage) (int account_id, struct guild_storage *gstor);
-
int (*create_party) (struct party_member *member,char *name,int item,int item2);
int (*request_partyinfo) (int party_id, int char_id);
-
int (*party_addmember) (int party_id,struct party_member *member);
int (*party_changeoption) (int party_id, int account_id, int exp, int item);
int (*party_leave) (int party_id,int account_id, int char_id);
@@ -63,7 +58,6 @@ struct intif_interface {
int (*break_party) (int party_id);
int (*party_message) (int party_id, int account_id, const char *mes,int len);
int (*party_leaderchange) (int party_id,int account_id,int char_id);
-
int (*guild_create) (const char *name, const struct guild_member *master);
int (*guild_request_info) (int guild_id);
int (*guild_addmember) (int guild_id, struct guild_member *m);
@@ -117,9 +111,71 @@ struct intif_interface {
int (*elemental_save) (struct s_elemental *ele);
/* @accinfo */
void (*request_accinfo) (int u_fd, int aid, int group_lv, char* query);
-
+ /* */
int (*CheckForCharServer) (void);
-} intif_s;
+ /* */
+ void (*pWisMessage) (int fd);
+ void (*pWisEnd) (int fd);
+ int (*pWisToGM_sub) (struct map_session_data* sd,va_list va);
+ void (*pWisToGM) (int fd);
+ void (*pRegisters) (int fd);
+ void (*pChangeNameOk) (int fd);
+ void (*pMessageToFD) (int fd);
+ void (*pLoadGuildStorage) (int fd);
+ void (*pSaveGuildStorage) (int fd);
+ void (*pPartyCreated) (int fd);
+ void (*pPartyInfo) (int fd);
+ void (*pPartyMemberAdded) (int fd);
+ void (*pPartyOptionChanged) (int fd);
+ void (*pPartyMemberWithdraw) (int fd);
+ void (*pPartyMove) (int fd);
+ void (*pPartyBroken) (int fd);
+ void (*pPartyMessage) (int fd);
+ void (*pGuildCreated) (int fd);
+ void (*pGuildInfo) (int fd);
+ void (*pGuildMemberAdded) (int fd);
+ void (*pGuildMemberWithdraw) (int fd);
+ void (*pGuildMemberInfoShort) (int fd);
+ void (*pGuildBroken) (int fd);
+ void (*pGuildMessage) (int fd);
+ void (*pGuildBasicInfoChanged) (int fd);
+ void (*pGuildMemberInfoChanged) (int fd);
+ void (*pGuildPosition) (int fd);
+ void (*pGuildSkillUp) (int fd);
+ void (*pGuildAlliance) (int fd);
+ void (*pGuildNotice) (int fd);
+ void (*pGuildEmblem) (int fd);
+ void (*pGuildCastleDataLoad) (int fd);
+ void (*pGuildMasterChanged) (int fd);
+ void (*pQuestLog) (int fd);
+ void (*pQuestSave) (int fd);
+ void (*pMailInboxReceived) (int fd);
+ void (*pMailNew) (int fd);
+ void (*pMailGetAttach) (int fd);
+ void (*pMailDelete) (int fd);
+ void (*pMailReturn) (int fd);
+ void (*pMailSend) (int fd);
+ void (*pAuctionResults) (int fd);
+ void (*pAuctionRegister) (int fd);
+ void (*pAuctionCancel) (int fd);
+ void (*pAuctionClose) (int fd);
+ void (*pAuctionMessage) (int fd);
+ void (*pAuctionBid) (int fd);
+ void (*pMercenaryReceived) (int fd);
+ void (*pMercenaryDeleted) (int fd);
+ void (*pMercenarySaved) (int fd);
+ void (*pElementalReceived) (int fd);
+ void (*pElementalDeleted) (int fd);
+ void (*pElementalSaved) (int fd);
+ void (*pCreatePet) (int fd);
+ void (*pRecvPetData) (int fd);
+ void (*pSavePetOk) (int fd);
+ void (*pDeletePetOk) (int fd);
+ void (*pCreateHomunculus) (int fd);
+ void (*pRecvHomunculusData) (int fd);
+ void (*pSaveHomunculusOk) (int fd);
+ void (*pDeleteHomunculusOk) (int fd);
+};
struct intif_interface *intif;
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index ee0eea5ff..fe2c43fcc 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -354,7 +354,10 @@ void itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask)
if (jobmask & 1<<23) //Soul Linker
bclass[2] |= 1<<MAPID_TAEKWON;
if (jobmask & 1<<JOB_GUNSLINGER)
+ {//Rebellion job can equip Gunslinger equips. [Rytech]
bclass[0] |= 1<<MAPID_GUNSLINGER;
+ bclass[1] |= 1<<MAPID_GUNSLINGER;
+ }
if (jobmask & 1<<JOB_NINJA)
{bclass[0] |= 1<<MAPID_NINJA;
bclass[1] |= 1<<MAPID_NINJA;}//Kagerou/Oboro jobs can equip Ninja equips. [Rytech]
@@ -366,6 +369,8 @@ void itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask)
bclass[2] |= 1<<MAPID_GANGSI;
if (jobmask & 1<<29) //Kagerou / Oboro
bclass[1] |= 1<<MAPID_NINJA;
+ if (jobmask & 1<<30) //Rebellion
+ bclass[1] |= 1<<MAPID_GUNSLINGER;
}
void create_dummy_data(void)
@@ -1833,18 +1838,18 @@ int itemdb_read_sqldb(void) {
uint32 count = 0;
// retrieve all rows from the item database
- if( SQL_ERROR == SQL->Query(mmysql_handle, "SELECT * FROM `%s`", item_db_name[fi]) ) {
- Sql_ShowDebug(mmysql_handle);
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "SELECT * FROM `%s`", item_db_name[fi]) ) {
+ Sql_ShowDebug(map->mysql_handle);
continue;
}
// process rows one by one
- while( SQL_SUCCESS == SQL->NextRow(mmysql_handle) ) {// wrap the result into a TXT-compatible format
+ while( SQL_SUCCESS == SQL->NextRow(map->mysql_handle) ) {// wrap the result into a TXT-compatible format
char* str[ITEMDB_SQL_COLUMNS];
char* dummy = "";
int i;
for( i = 0; i < ITEMDB_SQL_COLUMNS; ++i ) {
- SQL->GetData(mmysql_handle, i, &str[i], NULL);
+ SQL->GetData(map->mysql_handle, i, &str[i], NULL);
if( str[i] == NULL )
str[i] = dummy; // get rid of NULL columns
}
@@ -1855,7 +1860,7 @@ int itemdb_read_sqldb(void) {
}
// free the query result
- SQL->FreeResult(mmysql_handle);
+ SQL->FreeResult(map->mysql_handle);
ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, item_db_name[fi]);
}
@@ -1890,18 +1895,18 @@ uint64 itemdb_unique_id(int8 flag, int64 value) {
}
int itemdb_uid_load() {
char * uid;
- if (SQL_ERROR == SQL->Query(mmysql_handle, "SELECT `value` FROM `%s` WHERE `varname`='unique_id'",map->interreg_db))
- Sql_ShowDebug(mmysql_handle);
+ if (SQL_ERROR == SQL->Query(map->mysql_handle, "SELECT `value` FROM `%s` WHERE `varname`='unique_id'",map->interreg_db))
+ Sql_ShowDebug(map->mysql_handle);
- if( SQL_SUCCESS != SQL->NextRow(mmysql_handle) ) {
+ if( SQL_SUCCESS != SQL->NextRow(map->mysql_handle) ) {
ShowError("itemdb_uid_load: Unable to fetch unique_id data\n");
- SQL->FreeResult(mmysql_handle);
+ SQL->FreeResult(map->mysql_handle);
return -1;
}
- SQL->GetData(mmysql_handle, 0, &uid, NULL);
+ SQL->GetData(map->mysql_handle, 0, &uid, NULL);
itemdb->unique_id(1, (uint64)strtoull(uid, NULL, 10));
- SQL->FreeResult(mmysql_handle);
+ SQL->FreeResult(map->mysql_handle);
return 0;
}
diff --git a/src/map/log.c b/src/map/log.c
index 929143ba7..e33240505 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -20,36 +20,8 @@
struct log_interface log_s;
-/// filters for item logging
-typedef enum e_log_filter {
- LOG_FILTER_NONE = 0x000,
- LOG_FILTER_ALL = 0x001,
- // bits
- LOG_FILTER_HEALING = 0x002, // Healing items (0)
- LOG_FILTER_ETC_AMMO = 0x004, // Etc Items(3) + Arrows (10)
- LOG_FILTER_USABLE = 0x008, // Usable Items(2) + Scrolls, Lures(11) + Usable Cash Items(18)
- LOG_FILTER_WEAPON = 0x010, // Weapons(4)
- LOG_FILTER_ARMOR = 0x020, // Shields, Armors, Headgears, Accessories, Garments and Shoes(5)
- LOG_FILTER_CARD = 0x040, // Cards(6)
- LOG_FILTER_PETITEM = 0x080, // Pet Accessories(8) + Eggs(7) (well, monsters don't drop 'em but we'll use the same system for ALL logs)
- LOG_FILTER_PRICE = 0x100, // Log expensive items ( >= price_log )
- LOG_FILTER_AMOUNT = 0x200, // Log large amount of items ( >= amount_log )
- LOG_FILTER_REFINE = 0x400, // Log refined items ( refine >= refine_log ) [not implemented]
- LOG_FILTER_CHANCE = 0x800, // Log rare items and Emperium ( drop chance <= rare_log )
-}
-e_log_filter;
-
-#ifdef SQL_INNODB
-// database is using an InnoDB engine so do not use DELAYED
-#define LOG_QUERY "INSERT"
-#else
-// database is using a MyISAM engine so use DELAYED
-#define LOG_QUERY "INSERT DELAYED"
-#endif
-
-
/// obtain log type character for item/zeny logs
-static char log_picktype2char(e_log_pick_type type) {
+char log_picktype2char(e_log_pick_type type) {
switch( type ) {
case LOG_TYPE_TRADE: return 'T'; // (T)rade
case LOG_TYPE_VENDING: return 'V'; // (V)ending
@@ -78,7 +50,7 @@ static char log_picktype2char(e_log_pick_type type) {
/// obtain log type character for chat logs
-static char log_chattype2char(e_log_chat_type type) {
+char log_chattype2char(e_log_chat_type type) {
switch( type ) {
case LOG_CHAT_GLOBAL: return 'O'; // Gl(O)bal
case LOG_CHAT_WHISPER: return 'W'; // (W)hisper
@@ -94,7 +66,7 @@ static char log_chattype2char(e_log_chat_type type) {
/// check if this item should be logged according the settings
-static bool should_log_item(int nameid, int amount, int refine, struct item_data *id) {
+bool should_log_item(int nameid, int amount, int refine, struct item_data *id) {
int filter = logs->config.filter;
if( id == NULL )
@@ -119,7 +91,7 @@ static bool should_log_item(int nameid, int amount, int refine, struct item_data
}
void log_branch_sub_sql(struct map_session_data* sd) {
SqlStmt* stmt;
- stmt = SQL->StmtMalloc(logmysql_handle);
+ stmt = SQL->StmtMalloc(logs->mysql_handle);
if( SQL_SUCCESS != SQL->StmtPrepare(stmt, LOG_QUERY " INTO `%s` (`branch_date`, `account_id`, `char_id`, `char_name`, `map`) VALUES (NOW(), '%d', '%d', ?, '%s')", logs->config.log_branch, sd->status.account_id, sd->status.char_id, mapindex_id2name(sd->mapindex) )
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_STRING, sd->status.name, strnlen(sd->status.name, NAME_LENGTH))
|| SQL_SUCCESS != SQL->StmtExecute(stmt) )
@@ -153,13 +125,13 @@ void log_branch(struct map_session_data* sd) {
logs->branch_sub(sd);
}
void log_pick_sub_sql(int id, int16 m, e_log_pick_type type, int amount, struct item* itm, struct item_data *data) {
- if( SQL_ERROR == SQL->Query(logmysql_handle,
+ if( SQL_ERROR == SQL->Query(logs->mysql_handle,
LOG_QUERY " INTO `%s` (`time`, `char_id`, `type`, `nameid`, `amount`, `refine`, `card0`, `card1`, `card2`, `card3`, `map`, `unique_id`) "
"VALUES (NOW(), '%d', '%c', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%"PRIu64"')",
- logs->config.log_pick, id, log_picktype2char(type), itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3],
- maplist[m].name?maplist[m].name:"", itm->unique_id)
+ logs->config.log_pick, id, logs->picktype2char(type), itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3],
+ map->list[m].name?map->list[m].name:"", itm->unique_id)
) {
- Sql_ShowDebug(logmysql_handle);
+ Sql_ShowDebug(logs->mysql_handle);
return;
}
}
@@ -173,8 +145,8 @@ void log_pick_sub_txt(int id, int16 m, e_log_pick_type type, int amount, struct
time(&curtime);
strftime(timestring, sizeof(timestring), "%m/%d/%Y %H:%M:%S", localtime(&curtime));
fprintf(logfp,"%s - %d\t%c\t%d,%d,%d,%d,%d,%d,%d,%s,'%"PRIu64"'\n",
- timestring, id, log_picktype2char(type), itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3],
- maplist[m].name?maplist[m].name:"", itm->unique_id);
+ timestring, id, logs->picktype2char(type), itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3],
+ map->list[m].name?map->list[m].name:"", itm->unique_id);
fclose(logfp);
}
/// logs item transactions (generic)
@@ -184,7 +156,7 @@ void log_pick(int id, int16 m, e_log_pick_type type, int amount, struct item* it
return;
}
- if( !should_log_item(itm->nameid, amount, itm->refine, data) )
+ if( !logs->should_log_item(itm->nameid, amount, itm->refine, data) )
return; //we skip logging this item set - it doesn't meet our logging conditions [Lupus]
logs->pick_sub(id,m,type,amount,itm,data);
@@ -203,10 +175,10 @@ void log_pick_mob(struct mob_data* md, e_log_pick_type type, int amount, struct
log_pick(md->class_, md->bl.m, type, amount, itm, data ? data : itemdb->exists(itm->nameid));
}
void log_zeny_sub_sql(struct map_session_data* sd, e_log_pick_type type, struct map_session_data* src_sd, int amount) {
- if( SQL_ERROR == SQL->Query(logmysql_handle, LOG_QUERY " INTO `%s` (`time`, `char_id`, `src_id`, `type`, `amount`, `map`) VALUES (NOW(), '%d', '%d', '%c', '%d', '%s')",
- logs->config.log_zeny, sd->status.char_id, src_sd->status.char_id, log_picktype2char(type), amount, mapindex_id2name(sd->mapindex)) )
+ if( SQL_ERROR == SQL->Query(logs->mysql_handle, LOG_QUERY " INTO `%s` (`time`, `char_id`, `src_id`, `type`, `amount`, `map`) VALUES (NOW(), '%d', '%d', '%c', '%d', '%s')",
+ logs->config.log_zeny, sd->status.char_id, src_sd->status.char_id, logs->picktype2char(type), amount, mapindex_id2name(sd->mapindex)) )
{
- Sql_ShowDebug(logmysql_handle);
+ Sql_ShowDebug(logs->mysql_handle);
return;
}
}
@@ -233,10 +205,10 @@ void log_zeny(struct map_session_data* sd, e_log_pick_type type, struct map_sess
logs->zeny_sub(sd,type,src_sd,amount);
}
void log_mvpdrop_sub_sql(struct map_session_data* sd, int monster_id, int* log_mvp) {
- if( SQL_ERROR == SQL->Query(logmysql_handle, LOG_QUERY " INTO `%s` (`mvp_date`, `kill_char_id`, `monster_id`, `prize`, `mvpexp`, `map`) VALUES (NOW(), '%d', '%d', '%d', '%d', '%s') ",
+ if( SQL_ERROR == SQL->Query(logs->mysql_handle, LOG_QUERY " INTO `%s` (`mvp_date`, `kill_char_id`, `monster_id`, `prize`, `mvpexp`, `map`) VALUES (NOW(), '%d', '%d', '%d', '%d', '%s') ",
logs->config.log_mvpdrop, sd->status.char_id, monster_id, log_mvp[0], log_mvp[1], mapindex_id2name(sd->mapindex)) )
{
- Sql_ShowDebug(logmysql_handle);
+ Sql_ShowDebug(logs->mysql_handle);
return;
}
}
@@ -266,7 +238,7 @@ void log_mvpdrop(struct map_session_data* sd, int monster_id, int* log_mvp)
void log_atcommand_sub_sql(struct map_session_data* sd, const char* message) {
SqlStmt* stmt;
- stmt = SQL->StmtMalloc(logmysql_handle);
+ stmt = SQL->StmtMalloc(logs->mysql_handle);
if( SQL_SUCCESS != SQL->StmtPrepare(stmt, LOG_QUERY " INTO `%s` (`atcommand_date`, `account_id`, `char_id`, `char_name`, `map`, `command`) VALUES (NOW(), '%d', '%d', ?, '%s', ?)", logs->config.log_gm, sd->status.account_id, sd->status.char_id, mapindex_id2name(sd->mapindex) )
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_STRING, sd->status.name, strnlen(sd->status.name, NAME_LENGTH))
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 1, SQLDT_STRING, (char*)message, safestrnlen(message, 255))
@@ -304,7 +276,7 @@ void log_atcommand(struct map_session_data* sd, const char* message)
void log_npc_sub_sql(struct map_session_data *sd, const char *message) {
SqlStmt* stmt;
- stmt = SQL->StmtMalloc(logmysql_handle);
+ stmt = SQL->StmtMalloc(logs->mysql_handle);
if( SQL_SUCCESS != SQL->StmtPrepare(stmt, LOG_QUERY " INTO `%s` (`npc_date`, `account_id`, `char_id`, `char_name`, `map`, `mes`) VALUES (NOW(), '%d', '%d', ?, '%s', ?)", logs->config.log_npc, sd->status.account_id, sd->status.char_id, mapindex_id2name(sd->mapindex) )
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_STRING, sd->status.name, strnlen(sd->status.name, NAME_LENGTH))
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 1, SQLDT_STRING, (char*)message, safestrnlen(message, 255))
@@ -342,8 +314,8 @@ void log_npc(struct map_session_data* sd, const char* message)
void log_chat_sub_sql(e_log_chat_type type, int type_id, int src_charid, int src_accid, const char *mapname, int x, int y, const char* dst_charname, const char* message) {
SqlStmt* stmt;
- stmt = SQL->StmtMalloc(logmysql_handle);
- if( SQL_SUCCESS != SQL->StmtPrepare(stmt, LOG_QUERY " INTO `%s` (`time`, `type`, `type_id`, `src_charid`, `src_accountid`, `src_map`, `src_map_x`, `src_map_y`, `dst_charname`, `message`) VALUES (NOW(), '%c', '%d', '%d', '%d', '%s', '%d', '%d', ?, ?)", logs->config.log_chat, log_chattype2char(type), type_id, src_charid, src_accid, mapname, x, y)
+ stmt = SQL->StmtMalloc(logs->mysql_handle);
+ if( SQL_SUCCESS != SQL->StmtPrepare(stmt, LOG_QUERY " INTO `%s` (`time`, `type`, `type_id`, `src_charid`, `src_accountid`, `src_map`, `src_map_x`, `src_map_y`, `dst_charname`, `message`) VALUES (NOW(), '%c', '%d', '%d', '%d', '%s', '%d', '%d', ?, ?)", logs->config.log_chat, logs->chattype2char(type), type_id, src_charid, src_accid, mapname, x, y)
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_STRING, (char*)dst_charname, safestrnlen(dst_charname, NAME_LENGTH))
|| SQL_SUCCESS != SQL->StmtBindParam(stmt, 1, SQLDT_STRING, (char*)message, safestrnlen(message, CHAT_SIZE_MAX))
|| SQL_SUCCESS != SQL->StmtExecute(stmt)
@@ -363,7 +335,7 @@ void log_chat_sub_txt(e_log_chat_type type, int type_id, int src_charid, int src
return;
time(&curtime);
strftime(timestring, sizeof(timestring), "%m/%d/%Y %H:%M:%S", localtime(&curtime));
- fprintf(logfp, "%s - %c,%d,%d,%d,%s,%d,%d,%s,%s\n", timestring, log_chattype2char(type), type_id, src_charid, src_accid, mapname, x, y, dst_charname, message);
+ fprintf(logfp, "%s - %c,%d,%d,%d,%s,%d,%d,%s,%s\n", timestring, logs->chattype2char(type), type_id, src_charid, src_accid, mapname, x, y, dst_charname, message);
fclose(logfp);
}
@@ -382,6 +354,24 @@ void log_chat(e_log_chat_type type, int type_id, int src_charid, int src_accid,
logs->chat_sub(type,type_id,src_charid,src_accid,mapname,x,y,dst_charname,message);
}
+void log_sql_init(void) {
+ // log db connection
+ logs->mysql_handle = SQL->Malloc();
+
+ ShowInfo(""CL_WHITE"[SQL]"CL_RESET": Connecting to the Log Database "CL_WHITE"%s"CL_RESET" At "CL_WHITE"%s"CL_RESET"...\n",logs->db_name,logs->db_ip);
+ if ( SQL_ERROR == SQL->Connect(logs->mysql_handle, logs->db_id, logs->db_pw, logs->db_ip, logs->db_port, logs->db_name) )
+ exit(EXIT_FAILURE);
+ ShowStatus(""CL_WHITE"[SQL]"CL_RESET": Successfully '"CL_GREEN"connected"CL_RESET"' to Database '"CL_WHITE"%s"CL_RESET"'.\n", logs->db_name);
+
+ if( strlen(map->default_codepage) > 0 )
+ if ( SQL_ERROR == SQL->SetEncoding(logs->mysql_handle, map->default_codepage) )
+ Sql_ShowDebug(logs->mysql_handle);
+}
+void log_sql_final(void) {
+ ShowStatus("Close Log DB Connection....\n");
+ SQL->Free(logs->mysql_handle);
+ logs->mysql_handle = NULL;
+}
void log_set_defaults(void) {
memset(&logs->config, 0, sizeof(logs->config));
@@ -509,6 +499,15 @@ void log_config_complete(void) {
void log_defaults(void) {
logs = &log_s;
+ sprintf(logs->db_ip,"127.0.0.1");
+ sprintf(logs->db_id,"ragnarok");
+ sprintf(logs->db_pw,"ragnarok");
+ sprintf(logs->db_name,"log");
+
+ logs->db_port = 3306;
+ logs->mysql_handle = NULL;
+ /* */
+
logs->pick_pc = log_pick_pc;
logs->pick_mob = log_pick_mob;
logs->zeny = log_zeny;
@@ -529,5 +528,10 @@ void log_defaults(void) {
logs->config_read = log_config_read;
logs->config_done = log_config_complete;
+ logs->sql_init = log_sql_init;
+ logs->sql_final = log_sql_final;
+ logs->picktype2char = log_picktype2char;
+ logs->chattype2char = log_chattype2char;
+ logs->should_log_item = should_log_item;
}
diff --git a/src/map/log.h b/src/map/log.h
index 1da1696ab..07606c8ef 100644
--- a/src/map/log.h
+++ b/src/map/log.h
@@ -5,13 +5,32 @@
#ifndef _LOG_H_
#define _LOG_H_
+#include "../common/cbasetypes.h"
+#include "../common/sql.h"
+
+/**
+ * Declarations
+ **/
struct block_list;
struct map_session_data;
struct mob_data;
struct item;
struct item_data;
+/**
+ * Defines
+ **/
+#ifdef SQL_INNODB
+// database is using an InnoDB engine so do not use DELAYED
+ #define LOG_QUERY "INSERT"
+#else
+// database is using a MyISAM engine so use DELAYED
+ #define LOG_QUERY "INSERT DELAYED"
+#endif
+/**
+ * Enumerations
+ **/
typedef enum e_log_chat_type {
LOG_CHAT_GLOBAL = 0x01,
LOG_CHAT_WHISPER = 0x02,
@@ -22,7 +41,6 @@ typedef enum e_log_chat_type {
LOG_CHAT_ALL = 0xFF,
} e_log_chat_type;
-
typedef enum e_log_pick_type {
LOG_TYPE_NONE = 0,
LOG_TYPE_TRADE = 0x00001,
@@ -48,6 +66,24 @@ typedef enum e_log_pick_type {
LOG_TYPE_ALL = 0xFFFFF,
} e_log_pick_type;
+/// filters for item logging
+typedef enum e_log_filter {
+ LOG_FILTER_NONE = 0x000,
+ LOG_FILTER_ALL = 0x001,
+ // bits
+ LOG_FILTER_HEALING = 0x002, // Healing items (0)
+ LOG_FILTER_ETC_AMMO = 0x004, // Etc Items(3) + Arrows (10)
+ LOG_FILTER_USABLE = 0x008, // Usable Items(2) + Scrolls, Lures(11) + Usable Cash Items(18)
+ LOG_FILTER_WEAPON = 0x010, // Weapons(4)
+ LOG_FILTER_ARMOR = 0x020, // Shields, Armors, Headgears, Accessories, Garments and Shoes(5)
+ LOG_FILTER_CARD = 0x040, // Cards(6)
+ LOG_FILTER_PETITEM = 0x080, // Pet Accessories(8) + Eggs(7) (well, monsters don't drop 'em but we'll use the same system for ALL logs)
+ LOG_FILTER_PRICE = 0x100, // Log expensive items ( >= price_log )
+ LOG_FILTER_AMOUNT = 0x200, // Log large amount of items ( >= amount_log )
+ LOG_FILTER_REFINE = 0x400, // Log refined items ( refine >= refine_log ) [not implemented]
+ LOG_FILTER_CHANCE = 0x800, // Log rare items and Emperium ( drop chance <= rare_log )
+} e_log_filter;
+
struct log_interface {
struct {
e_log_pick_type enable_logs;
@@ -59,6 +95,13 @@ struct log_interface {
char log_branch[64], log_pick[64], log_zeny[64], log_mvpdrop[64], log_gm[64], log_npc[64], log_chat[64];
} config;
/* */
+ char db_ip[32];
+ int db_port;
+ char db_id[32];
+ char db_pw[32];
+ char db_name[32];
+ Sql* mysql_handle;
+ /* */
void (*pick_pc) (struct map_session_data* sd, e_log_pick_type type, int amount, struct item* itm, struct item_data *data);
void (*pick_mob) (struct mob_data* md, e_log_pick_type type, int amount, struct item* itm, struct item_data *data);
void (*zeny) (struct map_session_data* sd, e_log_pick_type type, struct map_session_data* src_sd, int amount);
@@ -78,6 +121,12 @@ struct log_interface {
int (*config_read) (const char* cfgName);
void (*config_done) (void);
+ void (*sql_init) (void);
+ void (*sql_final) (void);
+
+ char (*picktype2char) (e_log_pick_type type);
+ char (*chattype2char) (e_log_chat_type type);
+ bool (*should_log_item) (int nameid, int amount, int refine, struct item_data *id);
};
struct log_interface *logs;
diff --git a/src/map/mail.c b/src/map/mail.c
index ea8bda003..2378cbe2a 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -177,7 +177,7 @@ void mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg)
// This function only check if the mail operations are valid
bool mail_invalid_operation(struct map_session_data *sd) {
- if( !maplist[sd->bl.m].flag.town && !pc->can_use_command(sd, "@mail") ) {
+ if( !map->list[sd->bl.m].flag.town && !pc->can_use_command(sd, "@mail") ) {
ShowWarning("clif->parse_Mail: char '%s' trying to do invalid mail operations.\n", sd->status.name);
return true;
}
diff --git a/src/map/map.c b/src/map/map.c
index 09defc75a..d920875ee 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -62,197 +62,112 @@
#include <unistd.h>
#endif
-char default_codepage[32] = "";
-
-int map_server_port = 3306;
-char map_server_ip[32] = "127.0.0.1";
-char map_server_id[32] = "ragnarok";
-char map_server_pw[32] = "ragnarok";
-char map_server_db[32] = "ragnarok";
-Sql* mmysql_handle;
-
-int map_port=0;
-
-// log database
-char log_db_ip[32] = "127.0.0.1";
-int log_db_port = 3306;
-char log_db_id[32] = "ragnarok";
-char log_db_pw[32] = "ragnarok";
-char log_db_db[32] = "log";
-Sql* logmysql_handle;
-
-// DBMap declaration
-static DBMap* id_db=NULL; // int id -> struct block_list*
-static DBMap* pc_db=NULL; // int id -> struct map_session_data*
-static DBMap* mobid_db=NULL; // int id -> struct mob_data*
-static DBMap* bossid_db=NULL; // int id -> struct mob_data* (MVP db)
-static DBMap* map_db=NULL; // unsigned int mapindex -> struct map_data_other_server*
-static DBMap* nick_db=NULL; // int char_id -> struct charid2nick* (requested names of offline characters)
-static DBMap* charid_db=NULL; // int char_id -> struct map_session_data*
-static DBMap* regen_db=NULL; // int id -> struct block_list* (status_natural_heal processing)
-
-static int map_users=0;
-
-#define BLOCK_SIZE 8
-#define block_free_max 1048576
-struct block_list *block_free[block_free_max];
-static int block_free_count = 0, block_free_lock = 0;
-
-#define BL_LIST_MAX 1048576
-static struct block_list *bl_list[BL_LIST_MAX];
-static int bl_list_count = 0;
-
-struct charid_request {
- struct charid_request* next;
- int charid;// who want to be notified of the nick
-};
-struct charid2nick {
- char nick[NAME_LENGTH];
- struct charid_request* requests;// requests of notification on this nick
-};
-
-// This is the main header found at the very beginning of the map cache
-struct map_cache_main_header {
- uint32 file_size;
- uint16 map_count;
-};
-
-// This is the header appended before every compressed map cells info in the map cache
-struct map_cache_map_info {
- char name[MAP_NAME_LENGTH];
- int16 xs;
- int16 ys;
- int32 len;
-};
-
-int16 index2mapid[MAX_MAPINDEX];
-
-int enable_grf = 0; //To enable/disable reading maps from GRF files, bypassing mapcache [blackhole89]
-
-/* [Ind/Hercules] */
-struct eri *map_iterator_ers;
-char *map_cache_buffer = NULL; // Has the uncompressed gat data of all maps, so just one allocation has to be made
-
struct map_interface map_s;
-
-struct map_session_data *cpsd;
+struct mapit_interface mapit_s;
/*==========================================
-* server player count (of all mapservers)
-*------------------------------------------*/
-void map_setusers(int users)
-{
- map_users = users;
+ * server player count (of all mapservers)
+ *------------------------------------------*/
+void map_setusers(int users) {
+ map->users = users;
}
-int map_getusers(void)
-{
- return map_users;
+int map_getusers(void) {
+ return map->users;
}
/*==========================================
-* server player count (this mapserver only)
-*------------------------------------------*/
-int map_usercount(void)
-{
- return pc_db->size(pc_db);
+ * server player count (this mapserver only)
+ *------------------------------------------*/
+int map_usercount(void) {
+ return db_size(map->pc_db);
}
-
/*==========================================
-* Attempt to free a map blocklist
-*------------------------------------------*/
-int map_freeblock (struct block_list *bl)
-{
- nullpo_retr(block_free_lock, bl);
- if (block_free_lock == 0 || block_free_count >= block_free_max)
- {
+ * Attempt to free a map blocklist
+ *------------------------------------------*/
+int map_freeblock (struct block_list *bl) {
+ nullpo_retr(map->block_free_lock, bl);
+ if (map->block_free_lock == 0 || map->block_free_count >= block_free_max) {
aFree(bl);
bl = NULL;
- if (block_free_count >= block_free_max)
- ShowWarning("map_freeblock: too many free block! %d %d\n", block_free_count, block_free_lock);
+ if (map->block_free_count >= block_free_max)
+ ShowWarning("map_freeblock: too many free block! %d %d\n", map->block_free_count, map->block_free_lock);
} else
- block_free[block_free_count++] = bl;
+ map->block_free[map->block_free_count++] = bl;
- return block_free_lock;
+ return map->block_free_lock;
}
/*==========================================
-* Lock blocklist, (prevent map->freeblock usage)
-*------------------------------------------*/
-int map_freeblock_lock (void)
-{
- return ++block_free_lock;
+ * Lock blocklist, (prevent map->freeblock usage)
+ *------------------------------------------*/
+int map_freeblock_lock (void) {
+ return ++map->block_free_lock;
}
/*==========================================
-* Remove the lock on map_bl
-*------------------------------------------*/
-int map_freeblock_unlock (void)
-{
- if ((--block_free_lock) == 0) {
+ * Remove the lock on map_bl
+ *------------------------------------------*/
+int map_freeblock_unlock (void) {
+ if ((--map->block_free_lock) == 0) {
int i;
- for (i = 0; i < block_free_count; i++)
+ for (i = 0; i < map->block_free_count; i++)
{
- aFree(block_free[i]);
- block_free[i] = NULL;
+ aFree(map->block_free[i]);
+ map->block_free[i] = NULL;
}
- block_free_count = 0;
- } else if (block_free_lock < 0) {
+ map->block_free_count = 0;
+ } else if (map->block_free_lock < 0) {
ShowError("map_freeblock_unlock: lock count < 0 !\n");
- block_free_lock = 0;
+ map->block_free_lock = 0;
}
- return block_free_lock;
+ return map->block_free_lock;
}
// Timer function to check if there some remaining lock and remove them if so.
// Called each 1s
int map_freeblock_timer(int tid, unsigned int tick, int id, intptr_t data) {
- if (block_free_lock > 0) {
- ShowError("map_freeblock_timer: block_free_lock(%d) is invalid.\n", block_free_lock);
- block_free_lock = 1;
+ if (map->block_free_lock > 0) {
+ ShowError("map_freeblock_timer: block_free_lock(%d) is invalid.\n", map->block_free_lock);
+ map->block_free_lock = 1;
map->freeblock_unlock();
}
return 0;
}
-//
-// blocklist
-//
/*==========================================
-* Handling of map_bl[]
-* The adresse of bl_heal is set in bl->prev
-*------------------------------------------*/
-static struct block_list bl_head;
-
+ * These pair of functions update the counter of how many objects
+ * lie on a tile.
+ *------------------------------------------*/
+void map_addblcell(struct block_list *bl) {
#ifdef CELL_NOSTACK
-/*==========================================
-* These pair of functions update the counter of how many objects
-* lie on a tile.
-*------------------------------------------*/
-static void map_addblcell(struct block_list *bl) {
- if( bl->m < 0 || bl->x < 0 || bl->x >= maplist[bl->m].xs
- || bl->y < 0 || bl->y >= maplist[bl->m].ys
+ if( bl->m < 0 || bl->x < 0 || bl->x >= map->list[bl->m].xs
+ || bl->y < 0 || bl->y >= map->list[bl->m].ys
|| !(bl->type&BL_CHAR) )
return;
- maplist[bl->m].cell[bl->x+bl->y*maplist[bl->m].xs].cell_bl++;
+ map->list[bl->m].cell[bl->x+bl->y*map->list[bl->m].xs].cell_bl++;
+#else
return;
+#endif
}
-static void map_delblcell(struct block_list *bl) {
- if( bl->m < 0 || bl->x < 0 || bl->x >= maplist[bl->m].xs
- || bl->y < 0 || bl->y >= maplist[bl->m].ys
+void map_delblcell(struct block_list *bl) {
+#ifdef CELL_NOSTACK
+ if( bl->m < 0 || bl->x < 0 || bl->x >= map->list[bl->m].xs
+ || bl->y < 0 || bl->y >= map->list[bl->m].ys
|| !(bl->type&BL_CHAR) )
- return;
- maplist[bl->m].cell[bl->x+bl->y*maplist[bl->m].xs].cell_bl--;
-}
+ map->list[bl->m].cell[bl->x+bl->y*map->list[bl->m].xs].cell_bl--;
+#else
+ return;
#endif
+}
/*==========================================
-* Adds a block to the map.
-* Returns 0 on success, 1 on failure (illegal coordinates).
-*------------------------------------------*/
+ * Adds a block to the map.
+ * Returns 0 on success, 1 on failure (illegal coordinates).
+ *------------------------------------------*/
int map_addblock(struct block_list* bl)
{
int16 m, x, y;
@@ -268,39 +183,39 @@ int map_addblock(struct block_list* bl)
m = bl->m;
x = bl->x;
y = bl->y;
- if( m < 0 || m >= map->map_num ) {
- ShowError("map_addblock: invalid map id (%d), only %d are loaded.\n", m, map->map_num);
+ if( m < 0 || m >= map->count ) {
+ ShowError("map_addblock: invalid map id (%d), only %d are loaded.\n", m, map->count);
return 1;
}
- if( x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) {
- ShowError("map_addblock: out-of-bounds coordinates (\"%s\",%d,%d), map is %dx%d\n", maplist[m].name, x, y, maplist[m].xs, maplist[m].ys);
+ if( x < 0 || x >= map->list[m].xs || y < 0 || y >= map->list[m].ys ) {
+ ShowError("map_addblock: out-of-bounds coordinates (\"%s\",%d,%d), map is %dx%d\n", map->list[m].name, x, y, map->list[m].xs, map->list[m].ys);
return 1;
}
- pos = x/BLOCK_SIZE+(y/BLOCK_SIZE)*maplist[m].bxs;
+ pos = x/BLOCK_SIZE+(y/BLOCK_SIZE)*map->list[m].bxs;
if (bl->type == BL_MOB) {
- bl->next = maplist[m].block_mob[pos];
- bl->prev = &bl_head;
+ bl->next = map->list[m].block_mob[pos];
+ bl->prev = &map->bl_head;
if (bl->next) bl->next->prev = bl;
- maplist[m].block_mob[pos] = bl;
+ map->list[m].block_mob[pos] = bl;
} else {
- bl->next = maplist[m].block[pos];
- bl->prev = &bl_head;
+ bl->next = map->list[m].block[pos];
+ bl->prev = &map->bl_head;
if (bl->next) bl->next->prev = bl;
- maplist[m].block[pos] = bl;
+ map->list[m].block[pos] = bl;
}
#ifdef CELL_NOSTACK
- map_addblcell(bl);
+ map->addblcell(bl);
#endif
return 0;
}
/*==========================================
-* Removes a block from the map.
-*------------------------------------------*/
+ * Removes a block from the map.
+ *------------------------------------------*/
int map_delblock(struct block_list* bl)
{
int pos;
@@ -316,19 +231,19 @@ int map_delblock(struct block_list* bl)
}
#ifdef CELL_NOSTACK
- map_delblcell(bl);
+ map->delblcell(bl);
#endif
- pos = bl->x/BLOCK_SIZE+(bl->y/BLOCK_SIZE)*maplist[bl->m].bxs;
+ pos = bl->x/BLOCK_SIZE+(bl->y/BLOCK_SIZE)*map->list[bl->m].bxs;
if (bl->next)
bl->next->prev = bl->prev;
- if (bl->prev == &bl_head) {
+ if (bl->prev == &map->bl_head) {
//Since the head of the list, update the block_list map of []
if (bl->type == BL_MOB) {
- maplist[bl->m].block_mob[pos] = bl->next;
+ map->list[bl->m].block_mob[pos] = bl->next;
} else {
- maplist[bl->m].block[pos] = bl->next;
+ map->list[bl->m].block[pos] = bl->next;
}
} else {
bl->prev->next = bl->next;
@@ -340,10 +255,10 @@ int map_delblock(struct block_list* bl)
}
/*==========================================
-* Moves a block a x/y target position. [Skotlex]
-* Pass flag as 1 to prevent doing skill->unit_move checks
-* (which are executed by default on BL_CHAR types)
-*------------------------------------------*/
+ * Moves a block a x/y target position. [Skotlex]
+ * Pass flag as 1 to prevent doing skill->unit_move checks
+ * (which are executed by default on BL_CHAR types)
+ *------------------------------------------*/
int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick)
{
int x0 = bl->x, y0 = bl->y;
@@ -375,13 +290,13 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick)
if (moveblock) map->delblock(bl);
#ifdef CELL_NOSTACK
- else map_delblcell(bl);
+ else map->delblcell(bl);
#endif
bl->x = x1;
bl->y = y1;
if (moveblock) map->addblock(bl);
#ifdef CELL_NOSTACK
- else map_addblcell(bl);
+ else map->addblcell(bl);
#endif
if (bl->type&BL_CHAR) {
@@ -449,49 +364,49 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick)
}
/*==========================================
-* Counts specified number of objects on given cell.
-* TODO: merge with bl_getall_area
-*------------------------------------------*/
+ * Counts specified number of objects on given cell.
+ * TODO: merge with bl_getall_area
+ *------------------------------------------*/
int map_count_oncell(int16 m, int16 x, int16 y, int type) {
int bx,by;
struct block_list *bl;
int count = 0;
- if (x < 0 || y < 0 || (x >= maplist[m].xs) || (y >= maplist[m].ys))
+ if (x < 0 || y < 0 || (x >= map->list[m].xs) || (y >= map->list[m].ys))
return 0;
bx = x/BLOCK_SIZE;
by = y/BLOCK_SIZE;
if (type&~BL_MOB)
- for( bl = maplist[m].block[bx+by*maplist[m].bxs] ; bl != NULL ; bl = bl->next )
+ for( bl = map->list[m].block[bx+by*map->list[m].bxs] ; bl != NULL ; bl = bl->next )
if(bl->x == x && bl->y == y && bl->type&type)
count++;
if (type&BL_MOB)
- for( bl = maplist[m].block_mob[bx+by*maplist[m].bxs] ; bl != NULL ; bl = bl->next )
+ for( bl = map->list[m].block_mob[bx+by*map->list[m].bxs] ; bl != NULL ; bl = bl->next )
if(bl->x == x && bl->y == y)
count++;
return count;
}
/*
-* Looks for a skill unit on a given cell
-* flag&1: runs battle_check_target check based on unit->group->target_flag
-*/
+ * Looks for a skill unit on a given cell
+ * flag&1: runs battle_check_target check based on unit->group->target_flag
+ */
struct skill_unit* map_find_skill_unit_oncell(struct block_list* target,int16 x,int16 y,uint16 skill_id,struct skill_unit* out_unit, int flag) {
int16 m,bx,by;
struct block_list *bl;
struct skill_unit *su;
m = target->m;
- if (x < 0 || y < 0 || (x >= maplist[m].xs) || (y >= maplist[m].ys))
+ if (x < 0 || y < 0 || (x >= map->list[m].xs) || (y >= map->list[m].ys))
return NULL;
bx = x/BLOCK_SIZE;
by = y/BLOCK_SIZE;
- for( bl = maplist[m].block[bx+by*maplist[m].bxs] ; bl != NULL ; bl = bl->next ) {
+ for( bl = map->list[m].block[bx+by*map->list[m].bxs] ; bl != NULL ; bl = bl->next ) {
if (bl->x != x || bl->y != y || bl->type != BL_SKILL)
continue;
@@ -523,17 +438,17 @@ static int bl_vforeach(int (*func)(struct block_list*, va_list), int blockcount,
int returnCount = 0;
map->freeblock_lock();
- for (i = blockcount; i < bl_list_count && returnCount < max; i++) {
- if (bl_list[i]->prev) { //func() may delete this bl_list[] slot, checking for prev ensures it wasnt queued for deletion.
+ for (i = blockcount; i < map->bl_list_count && returnCount < max; i++) {
+ if (map->bl_list[i]->prev) { //func() may delete this bl_list[] slot, checking for prev ensures it wasnt queued for deletion.
va_list argscopy;
va_copy(argscopy, args);
- returnCount += func(bl_list[i], argscopy);
+ returnCount += func(map->bl_list[i], argscopy);
va_end(argscopy);
}
}
map->freeblock_unlock();
- bl_list_count = blockcount;
+ map->bl_list_count = blockcount;
return returnCount;
}
@@ -553,30 +468,30 @@ static int map_vforeachinmap(int (*func)(struct block_list*, va_list), int16 m,
int bsize;
va_list argscopy;
struct block_list *bl;
- int blockcount = bl_list_count;
+ int blockcount = map->bl_list_count;
if (m < 0)
return 0;
- bsize = maplist[m].bxs * maplist[m].bys;
+ bsize = map->list[m].bxs * map->list[m].bys;
for (i = 0; i < bsize; i++) {
if (type&~BL_MOB) {
- for (bl = maplist[m].block[i]; bl != NULL; bl = bl->next) {
- if (bl->type&type && bl_list_count < BL_LIST_MAX) {
- bl_list[bl_list_count++] = bl;
+ for (bl = map->list[m].block[i]; bl != NULL; bl = bl->next) {
+ if (bl->type&type && map->bl_list_count < BL_LIST_MAX) {
+ map->bl_list[map->bl_list_count++] = bl;
}
}
}
if (type&BL_MOB) {
- for (bl = maplist[m].block_mob[i]; bl != NULL; bl = bl->next) {
- if (bl_list_count < BL_LIST_MAX) {
- bl_list[bl_list_count++] = bl;
+ for (bl = map->list[m].block_mob[i]; bl != NULL; bl = bl->next) {
+ if (map->bl_list_count < BL_LIST_MAX) {
+ map->bl_list[map->bl_list_count++] = bl;
}
}
}
}
- if (bl_list_count >= BL_LIST_MAX)
+ if (map->bl_list_count >= BL_LIST_MAX)
ShowError("map.c:map_vforeachinmap: bl_list size (%d) exceeded\n", BL_LIST_MAX);
va_copy(argscopy, args);
@@ -596,13 +511,12 @@ static int map_vforeachinmap(int (*func)(struct block_list*, va_list), int16 m,
* @param ... Extra arguments for func
* @return Sum of the values returned by func
*/
-int map_foreachinmap(int (*func)(struct block_list*, va_list), int16 m, int type, ...)
-{
- int returnCount = 0;
+int map_foreachinmap(int (*func)(struct block_list*, va_list), int16 m, int type, ...) {
+ int returnCount;
va_list ap;
va_start(ap, type);
- returnCount = map_vforeachinmap(func, m, type, ap);
+ returnCount = map->vforeachinmap(func, m, type, ap);
va_end(ap);
return returnCount;
@@ -616,26 +530,47 @@ int map_foreachinmap(int (*func)(struct block_list*, va_list), int16 m, int type
* @param func Function to be applied
* @param m Map id
* @param type enum bl_type
- * @param ... Extra arguments for func
+ * @param ap Extra arguments for func
* @return Sum of the values returned by func
*/
-int map_foreachininstance(int (*func)(struct block_list*, va_list), int16 instance_id, int type, ...)
-{
+int map_vforeachininstance(int (*func)(struct block_list*, va_list), int16 instance_id, int type, va_list ap) {
int i;
int returnCount = 0;
- for (i = 0; i < instances[instance_id].num_map; i++) {
- int m = instances[instance_id].map[i];
- va_list ap;
- va_start(ap, type);
- returnCount += map_vforeachinmap(func, m, type, ap);
- va_end(ap);
+ for (i = 0; i < instance->list[instance_id].num_map; i++) {
+ int m = instance->list[instance_id].map[i];
+ va_list apcopy;
+ va_copy(apcopy, ap);
+ returnCount += map->vforeachinmap(func, m, type, apcopy);
+ va_end(apcopy);
}
return returnCount;
}
/**
+ * Applies func to every block_list object of bl_type type on all maps
+ * of instance instance_id.
+ * Returns the sum of values returned by func.
+ * @see map_vforeachininstance.
+ * @param func Function to be applied
+ * @param m Map id
+ * @param type enum bl_type
+ * @param ... Extra arguments for func
+ * @return Sum of the values returned by func
+ */
+int map_foreachininstance(int (*func)(struct block_list*, va_list), int16 instance_id, int type, ...) {
+ int returnCount;
+ va_list ap;
+
+ va_start(ap, type);
+ returnCount = map->vforeachininstance(func, instance_id, type, ap);
+ va_end(ap);
+
+ return returnCount;
+}
+
+/**
* Retrieves all map objects in area that are matched by the type
* and func. Appends them at the end of global bl_list array.
* @param type Matching enum bl_type
@@ -659,48 +594,48 @@ static int bl_getall_area(int type, int m, int x0, int y0, int x1, int y1, int (
// Limit search area to map size
x0 = max(x0, 0);
y0 = max(y0, 0);
- x1 = min(x1, maplist[m].xs - 1);
- y1 = min(y1, maplist[m].ys - 1);
+ x1 = min(x1, map->list[m].xs - 1);
+ y1 = min(y1, map->list[m].ys - 1);
for (by = y0 / BLOCK_SIZE; by <= y1 / BLOCK_SIZE; by++) {
for (bx = x0 / BLOCK_SIZE; bx <= x1 / BLOCK_SIZE; bx++) {
if (type&~BL_MOB) {
- for (bl = maplist[m].block[bx + by * maplist[m].bxs]; bl != NULL; bl = bl->next) {
- if (bl_list_count < BL_LIST_MAX
+ for (bl = map->list[m].block[bx + by * map->list[m].bxs]; bl != NULL; bl = bl->next) {
+ if (map->bl_list_count < BL_LIST_MAX
&& bl->type&type
&& bl->x >= x0 && bl->x <= x1
&& bl->y >= y0 && bl->y <= y1) {
if (func) {
va_start(args, func);
if (func(bl, args)) {
- bl_list[bl_list_count++] = bl;
+ map->bl_list[map->bl_list_count++] = bl;
found++;
}
va_end(args);
}
else {
- bl_list[bl_list_count++] = bl;
+ map->bl_list[map->bl_list_count++] = bl;
found++;
}
}
}
}
if (type&BL_MOB) { // TODO: fix this code duplication
- for (bl = maplist[m].block_mob[bx + by * maplist[m].bxs]; bl != NULL; bl = bl->next) {
- if (bl_list_count < BL_LIST_MAX
+ for (bl = map->list[m].block_mob[bx + by * map->list[m].bxs]; bl != NULL; bl = bl->next) {
+ if (map->bl_list_count < BL_LIST_MAX
//&& bl->type&type // block_mob contains BL_MOBs only
&& bl->x >= x0 && bl->x <= x1
&& bl->y >= y0 && bl->y <= y1) {
if (func) {
va_start(args, func);
if (func(bl, args)) {
- bl_list[bl_list_count++] = bl;
+ map->bl_list[map->bl_list_count++] = bl;
found++;
}
va_end(args);
}
else {
- bl_list[bl_list_count++] = bl;
+ map->bl_list[map->bl_list_count++] = bl;
found++;
}
}
@@ -709,7 +644,7 @@ static int bl_getall_area(int type, int m, int x0, int y0, int x1, int y1, int (
}
}
- if (bl_list_count >= BL_LIST_MAX)
+ if (map->bl_list_count >= BL_LIST_MAX)
ShowError("map.c:bl_getall_area: bl_list size (%d) exceeded\n", BL_LIST_MAX);
return found;
@@ -740,21 +675,43 @@ static int bl_vgetall_inrange(struct block_list *bl, va_list args)
* @param center Center of the selection area
* @param range Range in cells from center
* @param type enum bl_type
- * @param ... Extra arguments for func
+ * @param ap Extra arguments for func
* @return Sum of the values returned by func
*/
-int map_foreachinrange(int (*func)(struct block_list*, va_list), struct block_list* center, int16 range, int type, ...)
-{
+int map_vforeachinrange(int (*func)(struct block_list*, va_list), struct block_list* center, int16 range, int type, va_list ap) {
int returnCount = 0;
- int blockcount = bl_list_count;
- va_list ap;
+ int blockcount = map->bl_list_count;
+ va_list apcopy;
if (range < 0) range *= -1;
bl_getall_area(type, center->m, center->x - range, center->y - range, center->x + range, center->y + range, bl_vgetall_inrange, center, range);
+ va_copy(apcopy, ap);
+ returnCount = bl_vforeach(func, blockcount, INT_MAX, apcopy);
+ va_end(ap);
+
+ return returnCount;
+}
+
+/**
+ * Applies func to every block_list object of bl_type type within range cells from center.
+ * Area is rectangular, unless CIRCULAR_AREA is defined.
+ * Returns the sum of values returned by func.
+ * @see map_vforeachinrange
+ * @param func Function to be applied
+ * @param center Center of the selection area
+ * @param range Range in cells from center
+ * @param type enum bl_type
+ * @param ... Extra arguments for func
+ * @return Sum of the values returned by func
+ */
+int map_foreachinrange(int (*func)(struct block_list*, va_list), struct block_list* center, int16 range, int type, ...) {
+ int returnCount;
+ va_list ap;
+
va_start(ap, type);
- returnCount = bl_vforeach(func, blockcount, INT_MAX, ap);
+ returnCount = map->vforeachinrange(func, center, range, type, ap);
va_end(ap);
return returnCount;
@@ -770,21 +727,45 @@ int map_foreachinrange(int (*func)(struct block_list*, va_list), struct block_li
* @param range Range in cells from center
* @param count Maximum sum of values returned by func (usually max number of func calls)
* @param type enum bl_type
- * @param ... Extra arguments for func
+ * @param ap Extra arguments for func
* @return Sum of the values returned by func
*/
-int map_forcountinrange(int (*func)(struct block_list*, va_list), struct block_list* center, int16 range, int count, int type, ...)
-{
+int map_vforcountinrange(int (*func)(struct block_list*, va_list), struct block_list* center, int16 range, int count, int type, va_list ap) {
int returnCount = 0;
- int blockcount = bl_list_count;
- va_list ap;
+ int blockcount = map->bl_list_count;
+ va_list apcopy;
if (range < 0) range *= -1;
bl_getall_area(type, center->m, center->x - range, center->y - range, center->x + range, center->y + range, bl_vgetall_inrange, center, range);
+ va_copy(apcopy, ap);
+ returnCount = bl_vforeach(func, blockcount, count, apcopy);
+ va_end(apcopy);
+
+ return returnCount;
+}
+
+/**
+ * Applies func to some block_list objects of bl_type type within range cells from center.
+ * Limit is set by count parameter.
+ * Area is rectangular, unless CIRCULAR_AREA is defined.
+ * Returns the sum of values returned by func.
+ * @see map_vforcountinrange
+ * @param func Function to be applied
+ * @param center Center of the selection area
+ * @param range Range in cells from center
+ * @param count Maximum sum of values returned by func (usually max number of func calls)
+ * @param type enum bl_type
+ * @param ... Extra arguments for func
+ * @return Sum of the values returned by func
+ */
+int map_forcountinrange(int (*func)(struct block_list*, va_list), struct block_list* center, int16 range, int count, int type, ...) {
+ int returnCount;
+ va_list ap;
+
va_start(ap, type);
- returnCount = bl_vforeach(func, blockcount, count, ap);
+ returnCount = map->vforcountinrange(func, center, range, count, type, ap);
va_end(ap);
return returnCount;
@@ -819,21 +800,43 @@ static int bl_vgetall_inshootrange(struct block_list *bl, va_list args)
* @param center Center of the selection area
* @param range Range in cells from center
* @param type enum bl_type
- * @param ... Extra arguments for func
+ * @param ap Extra arguments for func
* @return Sum of the values returned by func
*/
-int map_foreachinshootrange(int (*func)(struct block_list*, va_list), struct block_list* center, int16 range, int type, ...)
-{
+int map_vforeachinshootrange(int (*func)(struct block_list*, va_list), struct block_list* center, int16 range, int type, va_list ap) {
int returnCount = 0;
- int blockcount = bl_list_count;
- va_list ap;
+ int blockcount = map->bl_list_count;
+ va_list apcopy;
if (range < 0) range *= -1;
bl_getall_area(type, center->m, center->x - range, center->y - range, center->x + range, center->y + range, bl_vgetall_inshootrange, center, range);
- va_start(ap, type);
+ va_copy(apcopy, ap);
returnCount = bl_vforeach(func, blockcount, INT_MAX, ap);
+ va_end(apcopy);
+
+ return returnCount;
+}
+
+/**
+ * Applies func to every block_list object of bl_type type within shootable range from center.
+ * There must be a shootable path between bl and center.
+ * Area is rectangular, unless CIRCULAR_AREA is defined.
+ * Returns the sum of values returned by func.
+ * @param func Function to be applied
+ * @param center Center of the selection area
+ * @param range Range in cells from center
+ * @param type enum bl_type
+ * @param ... Extra arguments for func
+ * @return Sum of the values returned by func
+ */
+int map_foreachinshootrange(int (*func)(struct block_list*, va_list), struct block_list* center, int16 range, int type, ...) {
+ int returnCount;
+ va_list ap;
+
+ va_start(ap, type);
+ returnCount = map->vforeachinshootrange(func, center, range, type, ap);
va_end(ap);
return returnCount;
@@ -850,19 +853,44 @@ int map_foreachinshootrange(int (*func)(struct block_list*, va_list), struct blo
* @param x1 Ending X-coordinate
* @param y1 Ending Y-coordinate
* @param type enum bl_type
- * @param ... Extra arguments for func
+ * @param ap Extra arguments for func
* @return Sum of the values returned by func
*/
-int map_foreachinarea(int (*func)(struct block_list*, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int type, ...)
-{
+int map_vforeachinarea(int (*func)(struct block_list*, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int type, va_list ap) {
int returnCount = 0;
- int blockcount = bl_list_count;
- va_list ap;
+ int blockcount = map->bl_list_count;
+ va_list apcopy;
bl_getall_area(type, m, x0, y0, x1, y1, NULL);
+ va_copy(apcopy, ap);
+ returnCount = bl_vforeach(func, blockcount, INT_MAX, apcopy);
+ va_end(apcopy);
+
+ return returnCount;
+}
+
+/**
+ * Applies func to every block_list object of bl_type type in
+ * rectangular area (x0,y0)~(x1,y1) on map m.
+ * Returns the sum of values returned by func.
+ * @see map_vforeachinarea
+ * @param func Function to be applied
+ * @param m Map id
+ * @param x0 Starting X-coordinate
+ * @param y0 Starting Y-coordinate
+ * @param x1 Ending X-coordinate
+ * @param y1 Ending Y-coordinate
+ * @param type enum bl_type
+ * @param ... Extra arguments for func
+ * @return Sum of the values returned by func
+ */
+int map_foreachinarea(int (*func)(struct block_list*, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int type, ...) {
+ int returnCount;
+ va_list ap;
+
va_start(ap, type);
- returnCount = bl_vforeach(func, blockcount, INT_MAX, ap);
+ returnCount = map->vforeachinarea(func, m, x0, y0, x1, y1, type, ap);
va_end(ap);
return returnCount;
@@ -881,19 +909,46 @@ int map_foreachinarea(int (*func)(struct block_list*, va_list), int16 m, int16 x
* @param y1 Ending Y-coordinate
* @param count Maximum sum of values returned by func (usually max number of func calls)
* @param type enum bl_type
- * @param ... Extra arguments for func
+ * @param ap Extra arguments for func
* @return Sum of the values returned by func
*/
-int map_forcountinarea(int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int count, int type, ...)
-{
+int map_vforcountinarea(int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int count, int type, va_list ap) {
int returnCount = 0;
- int blockcount = bl_list_count;
- va_list ap;
+ int blockcount = map->bl_list_count;
+ va_list apcopy;
bl_getall_area(type, m, x0, y0, x1, y1, NULL);
+ va_copy(apcopy, ap);
+ returnCount = bl_vforeach(func, blockcount, count, apcopy);
+ va_end(apcopy);
+
+ return returnCount;
+}
+
+/**
+ * Applies func to some block_list objects of bl_type type in
+ * rectangular area (x0,y0)~(x1,y1) on map m.
+ * Limit is set by @count parameter.
+ * Returns the sum of values returned by func.
+ * @see map_vforcountinarea
+ * @param func Function to be applied
+ * @param m Map id
+ * @param x0 Starting X-coordinate
+ * @param y0 Starting Y-coordinate
+ * @param x1 Ending X-coordinate
+ * @param y1 Ending Y-coordinate
+ * @param count Maximum sum of values returned by func (usually max number of func calls)
+ * @param type enum bl_type
+ * @param ... Extra arguments for func
+ * @return Sum of the values returned by func
+ */
+int map_forcountinarea(int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int count, int type, ...) {
+ int returnCount;
+ va_list ap;
+
va_start(ap, type);
- returnCount = bl_vforeach(func, blockcount, count, ap);
+ returnCount = map->vforcountinarea(func, m, x0, y0, x1, y1, count, type, ap);
va_end(ap);
return returnCount;
@@ -939,15 +994,14 @@ static int bl_vgetall_inmovearea(struct block_list *bl, va_list args)
* @param dx Center's movement on X-axis
* @param dy Center's movement on Y-axis
* @param type enum bl_type
- * @param ... Extra arguments for func
+ * @param ap Extra arguments for func
* @return Sum of the values returned by func
*/
-int map_foreachinmovearea(int (*func)(struct block_list*, va_list), struct block_list* center, int16 range, int16 dx, int16 dy, int type, ...)
-{
+int map_vforeachinmovearea(int (*func)(struct block_list*, va_list), struct block_list* center, int16 range, int16 dx, int16 dy, int type, va_list ap) {
int returnCount = 0;
- int blockcount = bl_list_count;
- va_list ap;
+ int blockcount = map->bl_list_count;
int m, x0, x1, y0, y1;
+ va_list apcopy;
if (!range) return 0;
if (!dx && !dy) return 0; // No movement.
@@ -974,8 +1028,39 @@ int map_foreachinmovearea(int (*func)(struct block_list*, va_list), struct block
bl_getall_area(type, m, x0, y0, x1, y1, bl_vgetall_inmovearea, dx, dy, center, range);
}
+ va_copy(apcopy, ap);
+ returnCount = bl_vforeach(func, blockcount, INT_MAX, apcopy);
+ va_end(apcopy);
+
+ return returnCount;
+}
+
+/**
+ * Applies func to every block_list object of bl_type type in
+ * area that was covered by range cells from center, but is no
+ * longer after center is moved by (dx,dy) cells (i.e. area that
+ * center has lost sight of).
+ * If used after center has reached its destination and with
+ * opposed movement vector (-dx,-dy), selection corresponds
+ * to new area in center's view).
+ * Uses rectangular area.
+ * Returns the sum of values returned by func.
+ * @see map_vforeachinmovearea
+ * @param func Function to be applied
+ * @param center Center of the selection area
+ * @param range Range in cells from center
+ * @param dx Center's movement on X-axis
+ * @param dy Center's movement on Y-axis
+ * @param type enum bl_type
+ * @param ... Extra arguments for func
+ * @return Sum of the values returned by func
+ */
+int map_foreachinmovearea(int (*func)(struct block_list*, va_list), struct block_list* center, int16 range, int16 dx, int16 dy, int type, ...) {
+ int returnCount;
+ va_list ap;
+
va_start(ap, type);
- returnCount = bl_vforeach(func, blockcount, INT_MAX, ap);
+ returnCount = map->vforeachinmovearea(func, center, range, dx, dy, type, ap);
va_end(ap);
return returnCount;
@@ -990,19 +1075,41 @@ int map_foreachinmovearea(int (*func)(struct block_list*, va_list), struct block
* @param x Target cell X-coordinate
* @param y Target cell Y-coordinate
* @param type enum bl_type
- * @param ... Extra arguments for func
+ * @param ap Extra arguments for func
* @return Sum of the values returned by func
*/
-int map_foreachincell(int (*func)(struct block_list*, va_list), int16 m, int16 x, int16 y, int type, ...)
-{
+int map_vforeachincell(int (*func)(struct block_list*, va_list), int16 m, int16 x, int16 y, int type, va_list ap) {
int returnCount = 0;
- int blockcount = bl_list_count;
- va_list ap;
+ int blockcount = map->bl_list_count;
+ va_list apcopy;
bl_getall_area(type, m, x, y, x, y, NULL);
+ va_copy(apcopy, ap);
+ returnCount = bl_vforeach(func, blockcount, INT_MAX, apcopy);
+ va_end(apcopy);
+
+ return returnCount;
+}
+
+/**
+ * Applies func to every block_list object of bl_type type in
+ * cell (x,y) on map m.
+ * Returns the sum of values returned by func.
+ * @param func Function to be applied
+ * @param m Map id
+ * @param x Target cell X-coordinate
+ * @param y Target cell Y-coordinate
+ * @param type enum bl_type
+ * @param ... Extra arguments for func
+ * @return Sum of the values returned by func
+ */
+int map_foreachincell(int (*func)(struct block_list*, va_list), int16 m, int16 x, int16 y, int type, ...) {
+ int returnCount;
+ va_list ap;
+
va_start(ap, type);
- returnCount = bl_vforeach(func, blockcount, INT_MAX, ap);
+ returnCount = map->vforeachincell(func, m, x, y, type, ap);
va_end(ap);
return returnCount;
@@ -1069,11 +1176,10 @@ static int bl_vgetall_inpath(struct block_list *bl, va_list args)
* @param x Target cell X-coordinate
* @param y Target cell Y-coordinate
* @param type enum bl_type
- * @param ... Extra arguments for func
+ * @param ap Extra arguments for func
* @return Sum of the values returned by func
*/
-int map_foreachinpath(int (*func)(struct block_list*, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int16 range, int length, int type, ...)
-{
+int map_vforeachinpath(int (*func)(struct block_list*, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int16 range, int length, int type, va_list ap) {
// [Skotlex]
// check for all targets in the square that
// contains the initial and final positions (area range increased to match the
@@ -1089,8 +1195,8 @@ int map_foreachinpath(int (*func)(struct block_list*, va_list), int16 m, int16 x
// kRO
int returnCount = 0;
- int blockcount = bl_list_count;
- va_list ap;
+ int blockcount = map->bl_list_count;
+ va_list apcopy;
//method specific variables
int magnitude2, len_limit; //The square of the magnitude
@@ -1127,13 +1233,40 @@ int map_foreachinpath(int (*func)(struct block_list*, va_list), int16 m, int16 x
bl_getall_area(type, m, mx0, my0, mx1, my1, bl_vgetall_inpath, m, x0, y0, x1, y1, range, len_limit, magnitude2);
+ va_copy(apcopy, ap);
+ returnCount = bl_vforeach(func, blockcount, INT_MAX, apcopy);
+ va_end(apcopy);
+
+ return returnCount;
+}
+#undef MAGNITUDE2
+
+/**
+ * Applies func to every block_list object of bl_type type in
+ * path on a line between (x0,y0) and (x1,y1) on map m.
+ * Path starts at (x0,y0) and is \a length cells long and \a range cells wide.
+ * Objects beyond the initial (x1,y1) ending point are checked
+ * for walls in the path.
+ * Returns the sum of values returned by func.
+ * @see map_vforeachinpath
+ * @param func Function to be applied
+ * @param m Map id
+ * @param x Target cell X-coordinate
+ * @param y Target cell Y-coordinate
+ * @param type enum bl_type
+ * @param ... Extra arguments for func
+ * @return Sum of the values returned by func
+ */
+int map_foreachinpath(int (*func)(struct block_list*, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int16 range, int length, int type, ...) {
+ int returnCount;
+ va_list ap;
+
va_start(ap, type);
- returnCount = bl_vforeach(func, blockcount, INT_MAX, ap);
+ returnCount = map->vforeachinpath(func, m, x0, y0, x1, y1, range, length, type, ap);
va_end(ap);
return returnCount;
}
-#undef MAGNITUDE2
/** @} */
@@ -1151,7 +1284,7 @@ int map_get_new_object_id(void)
if( i == MAX_FLOORITEM )
i = MIN_FLOORITEM;
- if( !idb_exists(id_db, i) )
+ if( !idb_exists(map->id_db, i) )
break;
++i;
@@ -1169,11 +1302,11 @@ int map_get_new_object_id(void)
}
/*==========================================
-* Timered function to clear the floor (remove remaining item)
-* Called each flooritem_lifetime ms
-*------------------------------------------*/
+ * Timered function to clear the floor (remove remaining item)
+ * Called each flooritem_lifetime ms
+ *------------------------------------------*/
int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data) {
- struct flooritem_data* fitem = (struct flooritem_data*)idb_get(id_db, id);
+ struct flooritem_data* fitem = (struct flooritem_data*)idb_get(map->id_db, id);
if (fitem == NULL || fitem->bl.type != BL_ITEM || (fitem->cleartimer != tid)) {
ShowError("map_clearflooritem_timer : error\n");
@@ -1192,8 +1325,8 @@ int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data)
}
/*
-* clears a single bl item out of the bazooonga.
-*/
+ * clears a single bl item out of the bazooonga.
+ */
void map_clearflooritem(struct block_list *bl) {
struct flooritem_data* fitem = (struct flooritem_data*)bl;
@@ -1207,19 +1340,19 @@ void map_clearflooritem(struct block_list *bl) {
}
/*==========================================
-* (m,x,y) locates a random available free cell around the given coordinates
-* to place an BL_ITEM object. Scan area is 9x9, returns 1 on success.
-* x and y are modified with the target cell when successful.
-*------------------------------------------*/
+ * (m,x,y) locates a random available free cell around the given coordinates
+ * to place an BL_ITEM object. Scan area is 9x9, returns 1 on success.
+ * x and y are modified with the target cell when successful.
+ *------------------------------------------*/
int map_searchrandfreecell(int16 m,int16 *x,int16 *y,int stack) {
int free_cell,i,j;
int free_cells[9][2];
for(free_cell=0,i=-1;i<=1;i++){
- if(i+*y<0 || i+*y>=maplist[m].ys)
+ if(i+*y<0 || i+*y>=map->list[m].ys)
continue;
for(j=-1;j<=1;j++){
- if(j+*x<0 || j+*x>=maplist[m].xs)
+ if(j+*x<0 || j+*x>=map->list[m].xs)
continue;
if(map->getcell(m,j+*x,i+*y,CELL_CHKNOPASS) && !map->getcell(m,j+*x,i+*y,CELL_CHKICEWALL))
continue;
@@ -1239,23 +1372,22 @@ int map_searchrandfreecell(int16 m,int16 *x,int16 *y,int stack) {
}
-static int map_count_sub(struct block_list *bl,va_list ap)
-{
+int map_count_sub(struct block_list *bl,va_list ap) {
return 1;
}
/*==========================================
-* Locates a random spare cell around the object given, using range as max
-* distance from that spot. Used for warping functions. Use range < 0 for
-* whole map range.
-* Returns 1 on success. when it fails and src is available, x/y are set to src's
-* src can be null as long as flag&1
-* when ~flag&1, m is not needed.
-* Flag values:
-* &1 = random cell must be around given m,x,y, not around src
-* &2 = the target should be able to walk to the target tile.
-* &4 = there shouldn't be any players around the target tile (use the no_spawn_on_player setting)
-*------------------------------------------*/
+ * Locates a random spare cell around the object given, using range as max
+ * distance from that spot. Used for warping functions. Use range < 0 for
+ * whole map range.
+ * Returns 1 on success. when it fails and src is available, x/y are set to src's
+ * src can be null as long as flag&1
+ * when ~flag&1, m is not needed.
+ * Flag values:
+ * &1 = random cell must be around given m,x,y, not around src
+ * &2 = the target should be able to walk to the target tile.
+ * &4 = there shouldn't be any players around the target tile (use the no_spawn_on_player setting)
+ *------------------------------------------*/
int map_search_freecell(struct block_list *src, int16 m, int16 *x,int16 *y, int16 rx, int16 ry, int flag)
{
int tries, spawn=0;
@@ -1288,13 +1420,13 @@ int map_search_freecell(struct block_list *src, int16 m, int16 *x,int16 *y, int1
tries = rx2*ry2;
if (tries > 100) tries = 100;
} else {
- tries = maplist[m].xs*maplist[m].ys;
+ tries = map->list[m].xs*map->list[m].ys;
if (tries > 500) tries = 500;
}
while(tries--) {
- *x = (rx >= 0)?(rnd()%rx2-rx+bx):(rnd()%(maplist[m].xs-2)+1);
- *y = (ry >= 0)?(rnd()%ry2-ry+by):(rnd()%(maplist[m].ys-2)+1);
+ *x = (rx >= 0)?(rnd()%rx2-rx+bx):(rnd()%(map->list[m].xs-2)+1);
+ *y = (ry >= 0)?(rnd()%ry2-ry+by):(rnd()%(map->list[m].ys-2)+1);
if (*x == bx && *y == by)
continue; //Avoid picking the same target tile.
@@ -1304,11 +1436,10 @@ int map_search_freecell(struct block_list *src, int16 m, int16 *x,int16 *y, int1
continue;
if(flag&4) {
if (spawn >= 100) return 0; //Limit of retries reached.
- if (spawn++ < battle_config.no_spawn_on_player &&
- map_foreachinarea(map_count_sub, m,
- *x-AREA_SIZE, *y-AREA_SIZE,
- *x+AREA_SIZE, *y+AREA_SIZE, BL_PC)
- )
+ if (spawn++ < battle_config.no_spawn_on_player
+ && map->foreachinarea(map->count_sub, m, *x-AREA_SIZE, *y-AREA_SIZE,
+ *x+AREA_SIZE, *y+AREA_SIZE, BL_PC)
+ )
continue;
}
return 1;
@@ -1320,14 +1451,14 @@ int map_search_freecell(struct block_list *src, int16 m, int16 *x,int16 *y, int1
}
/*==========================================
-* Add an item to location (m,x,y)
-* Parameters
-* @item_data item attributes
-* @amount quantity
-* @m, @x, @y mapid,x,y
-* @first_charid, @second_charid, @third_charid, looting priority
-* @flag: &1 MVP item. &2 do stacking check.
-*------------------------------------------*/
+ * Add an item to location (m,x,y)
+ * Parameters
+ * @item_data item attributes
+ * @amount quantity
+ * @m, @x, @y mapid,x,y
+ * @first_charid, @second_charid, @third_charid, looting priority
+ * @flag: &1 MVP item. &2 do stacking check.
+ *------------------------------------------*/
int map_addflooritem(struct item *item_data,int amount,int16 m,int16 x,int16 y,int first_charid,int second_charid,int third_charid,int flags)
{
int r;
@@ -1335,7 +1466,7 @@ int map_addflooritem(struct item *item_data,int amount,int16 m,int16 x,int16 y,i
nullpo_ret(item_data);
- if(!map_searchrandfreecell(m,&x,&y,flags&2?1:0))
+ if(!map->searchrandfreecell(m,&x,&y,flags&2?1:0))
return 0;
r=rnd();
@@ -1372,9 +1503,9 @@ int map_addflooritem(struct item *item_data,int amount,int16 m,int16 x,int16 y,i
}
/**
-* @see DBCreateData
-*/
-static DBData create_charid2nick(DBKey key, va_list args)
+ * @see DBCreateData
+ */
+DBData create_charid2nick(DBKey key, va_list args)
{
struct charid2nick *p;
CREATE(p, struct charid2nick, 1);
@@ -1392,7 +1523,7 @@ void map_addnickdb(int charid, const char* nick)
if( map->charid2sd(charid) )
return;// already online
- p = idb_ensure(nick_db, charid, create_charid2nick);
+ p = idb_ensure(map->nick_db, charid, map->create_charid2nick);
safestrncpy(p->nick, nick, sizeof(p->nick));
while( p->requests ) {
@@ -1414,7 +1545,7 @@ void map_delnickdb(int charid, const char* name)
struct map_session_data* sd;
DBData data;
- if (!nick_db->remove(nick_db, DB->i2key(charid), &data) || (p = DB->data2ptr(&data)) == NULL)
+ if (!map->nick_db->remove(map->nick_db, DB->i2key(charid), &data) || (p = DB->data2ptr(&data)) == NULL)
return;
while( p->requests ) {
@@ -1445,7 +1576,7 @@ void map_reqnickdb(struct map_session_data * sd, int charid)
return;
}
- p = idb_ensure(nick_db, charid, create_charid2nick);
+ p = idb_ensure(map->nick_db, charid, map->create_charid2nick);
if( *p->nick ) {
clif->solved_charname(sd->fd, charid, p->nick);
return;
@@ -1458,8 +1589,8 @@ void map_reqnickdb(struct map_session_data * sd, int charid)
}
/*==========================================
-* add bl to id_db
-*------------------------------------------*/
+ * add bl to id_db
+ *------------------------------------------*/
void map_addiddb(struct block_list *bl)
{
nullpo_retv(bl);
@@ -1467,27 +1598,27 @@ void map_addiddb(struct block_list *bl)
if( bl->type == BL_PC )
{
TBL_PC* sd = (TBL_PC*)bl;
- idb_put(pc_db,sd->bl.id,sd);
- idb_put(charid_db,sd->status.char_id,sd);
+ idb_put(map->pc_db,sd->bl.id,sd);
+ idb_put(map->charid_db,sd->status.char_id,sd);
}
else if( bl->type == BL_MOB )
{
TBL_MOB* md = (TBL_MOB*)bl;
- idb_put(mobid_db,bl->id,bl);
+ idb_put(map->mobid_db,bl->id,bl);
if( md->state.boss )
- idb_put(bossid_db, bl->id, bl);
+ idb_put(map->bossid_db, bl->id, bl);
}
if( bl->type & BL_REGEN )
- idb_put(regen_db, bl->id, bl);
+ idb_put(map->regen_db, bl->id, bl);
- idb_put(id_db,bl->id,bl);
+ idb_put(map->id_db,bl->id,bl);
}
/*==========================================
-* remove bl from id_db
-*------------------------------------------*/
+ * remove bl from id_db
+ *------------------------------------------*/
void map_deliddb(struct block_list *bl)
{
nullpo_retv(bl);
@@ -1495,24 +1626,24 @@ void map_deliddb(struct block_list *bl)
if( bl->type == BL_PC )
{
TBL_PC* sd = (TBL_PC*)bl;
- idb_remove(pc_db,sd->bl.id);
- idb_remove(charid_db,sd->status.char_id);
+ idb_remove(map->pc_db,sd->bl.id);
+ idb_remove(map->charid_db,sd->status.char_id);
}
else if( bl->type == BL_MOB )
{
- idb_remove(mobid_db,bl->id);
- idb_remove(bossid_db,bl->id);
+ idb_remove(map->mobid_db,bl->id);
+ idb_remove(map->bossid_db,bl->id);
}
if( bl->type & BL_REGEN )
- idb_remove(regen_db,bl->id);
+ idb_remove(map->regen_db,bl->id);
- idb_remove(id_db,bl->id);
+ idb_remove(map->id_db,bl->id);
}
/*==========================================
-* Standard call when a player connection is closed.
-*------------------------------------------*/
+ * Standard call when a player connection is closed.
+ *------------------------------------------*/
int map_quit(struct map_session_data *sd) {
int i;
@@ -1591,19 +1722,19 @@ int map_quit(struct map_session_data *sd) {
unit->remove_map(&sd->ed->bl,CLR_TELEPORT,ALC_MARK);
}
- if( hChSys.local && maplist[sd->bl.m].channel && idb_exists(maplist[sd->bl.m].channel->users, sd->status.char_id) ) {
- clif->chsys_left(maplist[sd->bl.m].channel,sd);
+ if( hChSys.local && map->list[sd->bl.m].channel && idb_exists(map->list[sd->bl.m].channel->users, sd->status.char_id) ) {
+ clif->chsys_left(map->list[sd->bl.m].channel,sd);
}
clif->chsys_quit(sd);
- unit->remove_map_pc(sd,CLR_TELEPORT);
+ unit->remove_map_pc(sd,CLR_RESPAWN);
- if( maplist[sd->bl.m].instance_id >= 0 ) { // Avoid map conflicts and warnings on next login
+ if( map->list[sd->bl.m].instance_id >= 0 ) { // Avoid map conflicts and warnings on next login
int16 m;
struct point *pt;
- if( maplist[sd->bl.m].save.map )
- pt = &maplist[sd->bl.m].save;
+ if( map->list[sd->bl.m].save.map )
+ pt = &map->list[sd->bl.m].save;
else
pt = &sd->status.save_point;
@@ -1628,16 +1759,16 @@ int map_quit(struct map_session_data *sd) {
}
/*==========================================
-* Lookup, id to session (player,mob,npc,homon,merc..)
-*------------------------------------------*/
+ * Lookup, id to session (player,mob,npc,homon,merc..)
+ *------------------------------------------*/
struct map_session_data *map_id2sd(int id) {
if (id <= 0) return NULL;
- return (struct map_session_data*)idb_get(pc_db,id);
+ return (struct map_session_data*)idb_get(map->pc_db,id);
}
struct mob_data *map_id2md(int id) {
if (id <= 0) return NULL;
- return (struct mob_data*)idb_get(mobid_db,id);
+ return (struct mob_data*)idb_get(map->mobid_db,id);
}
struct npc_data *map_id2nd(int id) {
@@ -1674,7 +1805,7 @@ const char *map_charid2nick(int charid) {
if( sd )
return sd->status.name;// character is online, return it's name
- p = idb_ensure(nick_db, charid, create_charid2nick);
+ p = idb_ensure(map->nick_db, charid, map->create_charid2nick);
if( *p->nick )
return p->nick;// name in nick_db
@@ -1685,14 +1816,14 @@ const char *map_charid2nick(int charid) {
/// Returns the struct map_session_data of the charid or NULL if the char is not online.
struct map_session_data* map_charid2sd(int charid)
{
- return (struct map_session_data*)idb_get(charid_db, charid);
+ return (struct map_session_data*)idb_get(map->charid_db, charid);
}
/*==========================================
-* Search session data from a nick name
-* (without sensitive case if necessary)
-* return map_session_data pointer or NULL
-*------------------------------------------*/
+ * Search session data from a nick name
+ * (without sensitive case if necessary)
+ * return map_session_data pointer or NULL
+ *------------------------------------------*/
struct map_session_data * map_nick2sd(const char *nick)
{
struct map_session_data* sd;
@@ -1740,29 +1871,29 @@ struct map_session_data * map_nick2sd(const char *nick)
}
/*==========================================
-* Looksup id_db DBMap and returns BL pointer of 'id' or NULL if not found
-*------------------------------------------*/
+ * Looksup id_db DBMap and returns BL pointer of 'id' or NULL if not found
+ *------------------------------------------*/
struct block_list * map_id2bl(int id) {
- return (struct block_list*)idb_get(id_db,id);
+ return (struct block_list*)idb_get(map->id_db,id);
}
/**
-* Same as map->id2bl except it only checks for its existence
-**/
+ * Same as map->id2bl except it only checks for its existence
+ **/
bool map_blid_exists( int id ) {
- return (idb_exists(id_db,id));
+ return (idb_exists(map->id_db,id));
}
/*==========================================
-* Convext Mirror
-*------------------------------------------*/
+ * Convext Mirror
+ *------------------------------------------*/
struct mob_data * map_getmob_boss(int16 m)
{
DBIterator* iter;
struct mob_data *md = NULL;
bool found = false;
- iter = db_iterator(bossid_db);
+ iter = db_iterator(map->bossid_db);
for( md = (struct mob_data*)dbi_first(iter); dbi_exists(iter); md = (struct mob_data*)dbi_next(iter) )
{
if( md->bl.m == m )
@@ -1779,71 +1910,88 @@ struct mob_data * map_getmob_boss(int16 m)
struct mob_data * map_id2boss(int id)
{
if (id <= 0) return NULL;
- return (struct mob_data*)idb_get(bossid_db,id);
+ return (struct mob_data*)idb_get(map->bossid_db,id);
}
/// Applies func to all the players in the db.
/// Stops iterating if func returns -1.
-void map_map_foreachpc(int (*func)(struct map_session_data* sd, va_list args), ...) {
+void map_vforeachpc(int (*func)(struct map_session_data* sd, va_list args), va_list args) {
DBIterator* iter;
struct map_session_data* sd;
- iter = db_iterator(pc_db);
+ iter = db_iterator(map->pc_db);
for( sd = dbi_first(iter); dbi_exists(iter); sd = dbi_next(iter) )
{
- va_list args;
+ va_list argscopy;
int ret;
- va_start(args, func);
- ret = func(sd, args);
- va_end(args);
+ va_copy(argscopy, args);
+ ret = func(sd, argscopy);
+ va_end(argscopy);
if( ret == -1 )
break;// stop iterating
}
dbi_destroy(iter);
}
+/// Applies func to all the players in the db.
+/// Stops iterating if func returns -1.
+/// @see map_vforeachpc
+void map_foreachpc(int (*func)(struct map_session_data* sd, va_list args), ...) {
+ va_list args;
+
+ va_start(args, func);
+ map->vforeachpc(func, args);
+ va_end(args);
+}
+
/// Applies func to all the mobs in the db.
/// Stops iterating if func returns -1.
-void map_map_foreachmob(int (*func)(struct mob_data* md, va_list args), ...)
-{
+void map_vforeachmob(int (*func)(struct mob_data* md, va_list args), va_list args) {
DBIterator* iter;
struct mob_data* md;
- iter = db_iterator(mobid_db);
- for( md = (struct mob_data*)dbi_first(iter); dbi_exists(iter); md = (struct mob_data*)dbi_next(iter) )
- {
- va_list args;
+ iter = db_iterator(map->mobid_db);
+ for( md = (struct mob_data*)dbi_first(iter); dbi_exists(iter); md = (struct mob_data*)dbi_next(iter) ) {
+ va_list argscopy;
int ret;
- va_start(args, func);
- ret = func(md, args);
- va_end(args);
+ va_copy(argscopy, args);
+ ret = func(md, argscopy);
+ va_end(argscopy);
if( ret == -1 )
break;// stop iterating
}
dbi_destroy(iter);
}
+/// Applies func to all the mobs in the db.
+/// Stops iterating if func returns -1.
+/// @see map_vforeachmob
+void map_foreachmob(int (*func)(struct mob_data* md, va_list args), ...) {
+ va_list args;
+
+ va_start(args, func);
+ map->vforeachmob(func, args);
+ va_end(args);
+}
+
/// Applies func to all the npcs in the db.
/// Stops iterating if func returns -1.
-void map_map_foreachnpc(int (*func)(struct npc_data* nd, va_list args), ...)
-{
+void map_vforeachnpc(int (*func)(struct npc_data* nd, va_list args), va_list args) {
DBIterator* iter;
struct block_list* bl;
- iter = db_iterator(id_db);
- for( bl = (struct block_list*)dbi_first(iter); dbi_exists(iter); bl = (struct block_list*)dbi_next(iter) )
- {
- if( bl->type == BL_NPC )
- {
+ iter = db_iterator(map->id_db);
+ for( bl = (struct block_list*)dbi_first(iter); dbi_exists(iter); bl = (struct block_list*)dbi_next(iter) ) {
+ if( bl->type == BL_NPC ) {
struct npc_data* nd = (struct npc_data*)bl;
- va_list args;
+ va_list argscopy;
int ret;
- va_start(args, func);
- ret = func(nd, args);
- va_end(args);
+ va_copy(argscopy, args);
+ ret = func(nd, argscopy);
+ va_end(argscopy);
if( ret == -1 )
break;// stop iterating
}
@@ -1851,22 +1999,31 @@ void map_map_foreachnpc(int (*func)(struct npc_data* nd, va_list args), ...)
dbi_destroy(iter);
}
+/// Applies func to all the npcs in the db.
+/// Stops iterating if func returns -1.
+/// @see map_vforeachnpc
+void map_foreachnpc(int (*func)(struct npc_data* nd, va_list args), ...) {
+ va_list args;
+
+ va_start(args, func);
+ map->vforeachnpc(func, args);
+ va_end(args);
+}
+
/// Applies func to everything in the db.
/// Stops iteratin gif func returns -1.
-void map_map_foreachregen(int (*func)(struct block_list* bl, va_list args), ...)
-{
+void map_vforeachregen(int (*func)(struct block_list* bl, va_list args), va_list args) {
DBIterator* iter;
struct block_list* bl;
- iter = db_iterator(regen_db);
- for( bl = (struct block_list*)dbi_first(iter); dbi_exists(iter); bl = (struct block_list*)dbi_next(iter) )
- {
- va_list args;
+ iter = db_iterator(map->regen_db);
+ for( bl = (struct block_list*)dbi_first(iter); dbi_exists(iter); bl = (struct block_list*)dbi_next(iter) ) {
+ va_list argscopy;
int ret;
- va_start(args, func);
- ret = func(bl, args);
- va_end(args);
+ va_copy(argscopy, args);
+ ret = func(bl, argscopy);
+ va_end(argscopy);
if( ret == -1 )
break;// stop iterating
}
@@ -1874,27 +2031,47 @@ void map_map_foreachregen(int (*func)(struct block_list* bl, va_list args), ...)
}
/// Applies func to everything in the db.
+/// Stops iteratin gif func returns -1.
+/// @see map_vforeachregen
+void map_foreachregen(int (*func)(struct block_list* bl, va_list args), ...) {
+ va_list args;
+
+ va_start(args, func);
+ map->vforeachregen(func, args);
+ va_end(args);
+}
+
+/// Applies func to everything in the db.
/// Stops iterating if func returns -1.
-void map_map_foreachiddb(int (*func)(struct block_list* bl, va_list args), ...)
-{
+void map_vforeachiddb(int (*func)(struct block_list* bl, va_list args), va_list args) {
DBIterator* iter;
struct block_list* bl;
- iter = db_iterator(id_db);
- for( bl = (struct block_list*)dbi_first(iter); dbi_exists(iter); bl = (struct block_list*)dbi_next(iter) )
- {
- va_list args;
+ iter = db_iterator(map->id_db);
+ for( bl = (struct block_list*)dbi_first(iter); dbi_exists(iter); bl = (struct block_list*)dbi_next(iter) ) {
+ va_list argscopy;
int ret;
- va_start(args, func);
- ret = func(bl, args);
- va_end(args);
+ va_copy(argscopy, args);
+ ret = func(bl, argscopy);
+ va_end(argscopy);
if( ret == -1 )
break;// stop iterating
}
dbi_destroy(iter);
}
+/// Applies func to everything in the db.
+/// Stops iterating if func returns -1.
+/// @see map_vforeachiddb
+void map_foreachiddb(int (*func)(struct block_list* bl, va_list args), ...) {
+ va_list args;
+
+ va_start(args, func);
+ map->vforeachiddb(func, args);
+ va_end(args);
+}
+
/// Iterator.
/// Can filter by bl type.
struct s_mapiterator
@@ -1925,12 +2102,12 @@ struct s_mapiterator
struct s_mapiterator* mapit_alloc(enum e_mapitflags flags, enum bl_type types) {
struct s_mapiterator* iter;
- iter = ers_alloc(map_iterator_ers, struct s_mapiterator);
+ iter = ers_alloc(map->iterator_ers, struct s_mapiterator);
iter->flags = flags;
iter->types = types;
- if( types == BL_PC ) iter->dbi = db_iterator(pc_db);
- else if( types == BL_MOB ) iter->dbi = db_iterator(mobid_db);
- else iter->dbi = db_iterator(id_db);
+ if( types == BL_PC ) iter->dbi = db_iterator(map->pc_db);
+ else if( types == BL_MOB ) iter->dbi = db_iterator(map->mobid_db);
+ else iter->dbi = db_iterator(map->id_db);
return iter;
}
@@ -1941,7 +2118,7 @@ void mapit_free(struct s_mapiterator* iter) {
nullpo_retv(iter);
dbi_destroy(iter->dbi);
- ers_free(map_iterator_ers, iter);
+ ers_free(map->iterator_ers, iter);
}
/// Returns the first block_list that matches the description.
@@ -2031,35 +2208,35 @@ bool mapit_exists(struct s_mapiterator* iter) {
}
/*==========================================
-* Add npc-bl to id_db, basically register npc to map
-*------------------------------------------*/
+ * Add npc-bl to id_db, basically register npc to map
+ *------------------------------------------*/
bool map_addnpc(int16 m,struct npc_data *nd) {
nullpo_ret(nd);
- if( m < 0 || m >= map->map_num )
+ if( m < 0 || m >= map->count )
return false;
- if( maplist[m].npc_num == MAX_NPC_PER_MAP ) {
- ShowWarning("too many NPCs in one map %s\n",maplist[m].name);
+ if( map->list[m].npc_num == MAX_NPC_PER_MAP ) {
+ ShowWarning("too many NPCs in one map %s\n",map->list[m].name);
return false;
}
- maplist[m].npc[maplist[m].npc_num]=nd;
- maplist[m].npc_num++;
- idb_put(id_db,nd->bl.id,nd);
+ map->list[m].npc[map->list[m].npc_num]=nd;
+ map->list[m].npc_num++;
+ idb_put(map->id_db,nd->bl.id,nd);
return true;
}
/*=========================================
-* Dynamic Mobs [Wizputer]
-*-----------------------------------------*/
+ * Dynamic Mobs [Wizputer]
+ *-----------------------------------------*/
// 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;
- ARR_FIND( 0, MAX_MOB_LIST_PER_MAP, i, maplist[m].moblist[i] == NULL );
+ ARR_FIND( 0, MAX_MOB_LIST_PER_MAP, i, map->list[m].moblist[i] == NULL );
if( i < MAX_MOB_LIST_PER_MAP ) {
- maplist[m].moblist[i] = spawn;
+ map->list[m].moblist[i] = spawn;
return i;
}
return -1;
@@ -2067,20 +2244,20 @@ int map_addmobtolist(unsigned short m, struct spawn_data *spawn) {
void map_spawnmobs(int16 m) {
int i, k=0;
- if (maplist[m].mob_delete_timer != INVALID_TIMER) {
+ if (map->list[m].mob_delete_timer != INVALID_TIMER) {
//Mobs have not been removed yet [Skotlex]
- timer->delete(maplist[m].mob_delete_timer, map->removemobs_timer);
- maplist[m].mob_delete_timer = INVALID_TIMER;
+ timer->delete(map->list[m].mob_delete_timer, map->removemobs_timer);
+ map->list[m].mob_delete_timer = INVALID_TIMER;
return;
}
for(i=0; i<MAX_MOB_LIST_PER_MAP; i++)
- if(maplist[m].moblist[i]!=NULL) {
- k+=maplist[m].moblist[i]->num;
- npc->parse_mob2(maplist[m].moblist[i]);
+ if(map->list[m].moblist[i]!=NULL) {
+ k+=map->list[m].moblist[i]->num;
+ npc->parse_mob2(map->list[m].moblist[i]);
}
if (battle_config.etc_log && k > 0) {
- ShowStatus("Map %s: Spawned '"CL_WHITE"%d"CL_RESET"' mobs.\n",maplist[m].name, k);
+ ShowStatus("Map %s: Spawned '"CL_WHITE"%d"CL_RESET"' mobs.\n",map->list[m].name, k);
}
}
@@ -2116,36 +2293,36 @@ int map_removemobs_timer(int tid, unsigned int tick, int id, intptr_t data)
int count;
const int16 m = id;
- if (m < 0 || m >= map->map_num) { //Incorrect map id!
+ if (m < 0 || m >= map->count) { //Incorrect map id!
ShowError("map_removemobs_timer error: timer %d points to invalid map %d\n",tid, m);
return 0;
}
- if (maplist[m].mob_delete_timer != tid) { //Incorrect timer call!
- ShowError("map_removemobs_timer mismatch: %d != %d (map %s)\n",maplist[m].mob_delete_timer, tid, maplist[m].name);
+ if (map->list[m].mob_delete_timer != tid) { //Incorrect timer call!
+ ShowError("map_removemobs_timer mismatch: %d != %d (map %s)\n",map->list[m].mob_delete_timer, tid, map->list[m].name);
return 0;
}
- maplist[m].mob_delete_timer = INVALID_TIMER;
- if (maplist[m].users > 0) //Map not empty!
+ map->list[m].mob_delete_timer = INVALID_TIMER;
+ if (map->list[m].users > 0) //Map not empty!
return 1;
- count = map_foreachinmap(map_removemobs_sub, m, BL_MOB);
+ count = map->foreachinmap(map->removemobs_sub, m, BL_MOB);
if (battle_config.etc_log && count > 0)
- ShowStatus("Map %s: Removed '"CL_WHITE"%d"CL_RESET"' mobs.\n",maplist[m].name, count);
+ ShowStatus("Map %s: Removed '"CL_WHITE"%d"CL_RESET"' mobs.\n",map->list[m].name, count);
return 1;
}
void map_removemobs(int16 m) {
- if (maplist[m].mob_delete_timer != INVALID_TIMER) // should never happen
+ if (map->list[m].mob_delete_timer != INVALID_TIMER) // should never happen
return; //Mobs are already scheduled for removal
- maplist[m].mob_delete_timer = timer->add(timer->gettick()+battle_config.mob_remove_delay, map->removemobs_timer, m, 0);
+ map->list[m].mob_delete_timer = timer->add(timer->gettick()+battle_config.mob_remove_delay, map->removemobs_timer, m, 0);
}
/*==========================================
-* Hookup, get map_id from map_name
-*------------------------------------------*/
+ * Hookup, get map_id from map_name
+ *------------------------------------------*/
int16 map_mapname2mapid(const char* name) {
unsigned short map_index;
map_index = mapindex_name2id(name);
@@ -2155,23 +2332,23 @@ int16 map_mapname2mapid(const char* name) {
}
/*==========================================
-* Returns the map of the given mapindex. [Skotlex]
-*------------------------------------------*/
+ * Returns the map of the given mapindex. [Skotlex]
+ *------------------------------------------*/
int16 map_mapindex2mapid(unsigned short mapindex) {
if (!mapindex || mapindex > MAX_MAPINDEX)
return -1;
- return index2mapid[mapindex];
+ return map->index2mapid[mapindex];
}
/*==========================================
-* Switching Ip, port ? (like changing map_server) get ip/port from map_name
-*------------------------------------------*/
+ * Switching Ip, port ? (like changing map_server) get ip/port from map_name
+ *------------------------------------------*/
int map_mapname2ipport(unsigned short name, uint32* ip, uint16* port) {
struct map_data_other_server *mdos;
- mdos = (struct map_data_other_server*)uidb_get(map_db,(unsigned int)name);
+ mdos = (struct map_data_other_server*)uidb_get(map->map_db,(unsigned int)name);
if(mdos==NULL || mdos->cell) //If gat isn't null, this is a local map.
return -1;
*ip=mdos->ip;
@@ -2187,21 +2364,21 @@ int map_check_dir(int s_dir,int t_dir)
if(s_dir == t_dir)
return 0;
switch(s_dir) {
- case 0: if(t_dir == 7 || t_dir == 1 || t_dir == 0) return 0; break;
- case 1: if(t_dir == 0 || t_dir == 2 || t_dir == 1) return 0; break;
- case 2: if(t_dir == 1 || t_dir == 3 || t_dir == 2) return 0; break;
- case 3: if(t_dir == 2 || t_dir == 4 || t_dir == 3) return 0; break;
- case 4: if(t_dir == 3 || t_dir == 5 || t_dir == 4) return 0; break;
- case 5: if(t_dir == 4 || t_dir == 6 || t_dir == 5) return 0; break;
- case 6: if(t_dir == 5 || t_dir == 7 || t_dir == 6) return 0; break;
- case 7: if(t_dir == 6 || t_dir == 0 || t_dir == 7) return 0; break;
+ case 0: if(t_dir == 7 || t_dir == 1 || t_dir == 0) return 0; break;
+ case 1: if(t_dir == 0 || t_dir == 2 || t_dir == 1) return 0; break;
+ case 2: if(t_dir == 1 || t_dir == 3 || t_dir == 2) return 0; break;
+ case 3: if(t_dir == 2 || t_dir == 4 || t_dir == 3) return 0; break;
+ case 4: if(t_dir == 3 || t_dir == 5 || t_dir == 4) return 0; break;
+ case 5: if(t_dir == 4 || t_dir == 6 || t_dir == 5) return 0; break;
+ case 6: if(t_dir == 5 || t_dir == 7 || t_dir == 6) return 0; break;
+ case 7: if(t_dir == 6 || t_dir == 0 || t_dir == 7) return 0; break;
}
return 1;
}
/*==========================================
-* Returns the direction of the given cell, relative to 'src'
-*------------------------------------------*/
+ * Returns the direction of the given cell, relative to 'src'
+ *------------------------------------------*/
uint8 map_calc_dir(struct block_list* src, int16 x, int16 y)
{
uint8 dir = 0;
@@ -2245,9 +2422,9 @@ uint8 map_calc_dir(struct block_list* src, int16 x, int16 y)
}
/*==========================================
-* Randomizes target cell x,y to a random walkable cell that
-* has the same distance from object as given coordinates do. [Skotlex]
-*------------------------------------------*/
+ * Randomizes target cell x,y to a random walkable cell that
+ * has the same distance from object as given coordinates do. [Skotlex]
+ *------------------------------------------*/
int map_random_dir(struct block_list *bl, int16 *x, int16 *y)
{
short xi = *x-bl->x;
@@ -2283,13 +2460,13 @@ inline static struct mapcell map_gat2cell(int gat) {
memset(&cell,0,sizeof(struct mapcell));
switch( gat ) {
- case 0: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // walkable ground
- case 1: cell.walkable = 0; cell.shootable = 0; cell.water = 0; break; // non-walkable ground
- case 2: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ???
- case 3: cell.walkable = 1; cell.shootable = 1; cell.water = 1; break; // walkable water
- case 4: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ???
- case 5: cell.walkable = 0; cell.shootable = 1; cell.water = 0; break; // gap (snipable)
- case 6: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ???
+ case 0: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // walkable ground
+ case 1: cell.walkable = 0; cell.shootable = 0; cell.water = 0; break; // non-walkable ground
+ case 2: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ???
+ case 3: cell.walkable = 1; cell.shootable = 1; cell.water = 1; break; // walkable water
+ case 4: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ???
+ case 5: cell.walkable = 0; cell.shootable = 1; cell.water = 0; break; // gap (snipable)
+ case 6: cell.walkable = 1; cell.shootable = 1; cell.water = 0; break; // ???
default:
ShowWarning("map_gat2cell: unrecognized gat type '%d'\n", gat);
break;
@@ -2298,7 +2475,7 @@ inline static struct mapcell map_gat2cell(int gat) {
return cell;
}
-static int map_cell2gat(struct mapcell cell) {
+int map_cell2gat(struct mapcell cell) {
if( cell.walkable == 1 && cell.shootable == 1 && cell.water == 0 ) return 0;
if( cell.walkable == 0 && cell.shootable == 0 && cell.water == 0 ) return 1;
if( cell.walkable == 1 && cell.shootable == 1 && cell.water == 1 ) return 3;
@@ -2307,8 +2484,6 @@ static int map_cell2gat(struct mapcell cell) {
ShowWarning("map_cell2gat: cell has no matching gat type\n");
return 1; // default to 'wall'
}
-int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk);
-void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag);
void map_cellfromcache(struct map_data *m) {
char decode_buffer[MAX_MAP_SIZE];
struct map_cache_map_info *info = NULL;
@@ -2324,10 +2499,10 @@ void map_cellfromcache(struct map_data *m) {
CREATE(m->cell, struct mapcell, size);
for( xy = 0; xy < size; ++xy )
- m->cell[xy] = map_gat2cell(decode_buffer[xy]);
+ m->cell[xy] = map->gat2cell(decode_buffer[xy]);
- m->getcellp = map_getcellp;
- m->setcell = map_setcell;
+ m->getcellp = map->getcellp;
+ m->setcell = map->setcell;
for(i = 0; i < m->npc_num; i++) {
npc->setcells(m->npc[i]);
@@ -2336,10 +2511,10 @@ void map_cellfromcache(struct map_data *m) {
}
/*==========================================
-* Confirm if celltype in (m,x,y) match the one given in cellchk
-*------------------------------------------*/
+ * Confirm if celltype in (m,x,y) match the one given in cellchk
+ *------------------------------------------*/
int map_getcell(int16 m,int16 x,int16 y,cell_chk cellchk) {
- return (m < 0 || m >= map->map_num) ? 0 : maplist[m].getcellp(&maplist[m],x,y,cellchk);
+ return (m < 0 || m >= map->count) ? 0 : map->list[m].getcellp(&map->list[m],x,y,cellchk);
}
int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk) {
@@ -2356,7 +2531,7 @@ int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk) {
switch(cellchk) {
// gat type retrieval
case CELL_GETTYPE:
- return map_cell2gat(cell);
+ return map->cell2gat(cell);
// base gat type checks
case CELL_CHKWALL:
@@ -2415,69 +2590,67 @@ int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk) {
/* [Ind/Hercules] */
int map_sub_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk) {
map->cellfromcache(m);
- m->getcellp = map_getcellp;
- m->setcell = map_setcell;
+ m->getcellp = map->getcellp;
+ m->setcell = map->setcell;
return m->getcellp(m,x,y,cellchk);
}
/*==========================================
-* Change the type/flags of a map cell
-* 'cell' - which flag to modify
-* 'flag' - true = on, false = off
-*------------------------------------------*/
+ * Change the type/flags of a map cell
+ * 'cell' - which flag to modify
+ * 'flag' - true = on, false = off
+ *------------------------------------------*/
void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) {
int j;
- if( m < 0 || m >= map->map_num || x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys )
+ if( m < 0 || m >= map->count || x < 0 || x >= map->list[m].xs || y < 0 || y >= map->list[m].ys )
return;
- j = x + y*maplist[m].xs;
+ j = x + y*map->list[m].xs;
switch( cell ) {
- case CELL_WALKABLE: maplist[m].cell[j].walkable = flag; break;
- case CELL_SHOOTABLE: maplist[m].cell[j].shootable = flag; break;
- case CELL_WATER: maplist[m].cell[j].water = flag; break;
-
- case CELL_NPC: maplist[m].cell[j].npc = flag; break;
- case CELL_BASILICA: maplist[m].cell[j].basilica = flag; break;
- case CELL_LANDPROTECTOR: maplist[m].cell[j].landprotector = flag; break;
- case CELL_NOVENDING: maplist[m].cell[j].novending = flag; break;
- case CELL_NOCHAT: maplist[m].cell[j].nochat = flag; break;
- case CELL_MAELSTROM: maplist[m].cell[j].maelstrom = flag; break;
- case CELL_ICEWALL: maplist[m].cell[j].icewall = flag; break;
+ case CELL_WALKABLE: map->list[m].cell[j].walkable = flag; break;
+ case CELL_SHOOTABLE: map->list[m].cell[j].shootable = flag; break;
+ case CELL_WATER: map->list[m].cell[j].water = flag; break;
+
+ case CELL_NPC: map->list[m].cell[j].npc = flag; break;
+ case CELL_BASILICA: map->list[m].cell[j].basilica = flag; break;
+ case CELL_LANDPROTECTOR: map->list[m].cell[j].landprotector = flag; break;
+ case CELL_NOVENDING: map->list[m].cell[j].novending = flag; break;
+ case CELL_NOCHAT: map->list[m].cell[j].nochat = flag; break;
+ case CELL_MAELSTROM: map->list[m].cell[j].maelstrom = flag; break;
+ case CELL_ICEWALL: map->list[m].cell[j].icewall = flag; break;
default:
ShowWarning("map_setcell: invalid cell type '%d'\n", (int)cell);
break;
}
}
void map_sub_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) {
- if( m < 0 || m >= map->map_num || x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys )
+ if( m < 0 || m >= map->count || x < 0 || x >= map->list[m].xs || y < 0 || y >= map->list[m].ys )
return;
- map->cellfromcache(&maplist[m]);
- maplist[m].setcell = map_setcell;
- maplist[m].getcellp = map_getcellp;
- maplist[m].setcell(m,x,y,cell,flag);
+ map->cellfromcache(&map->list[m]);
+ map->list[m].setcell = map->setcell;
+ map->list[m].getcellp = map->getcellp;
+ map->list[m].setcell(m,x,y,cell,flag);
}
void map_setgatcell(int16 m, int16 x, int16 y, int gat) {
int j;
struct mapcell cell;
- if( m < 0 || m >= map->map_num || x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys )
+ if( m < 0 || m >= map->count || x < 0 || x >= map->list[m].xs || y < 0 || y >= map->list[m].ys )
return;
- j = x + y*maplist[m].xs;
+ j = x + y*map->list[m].xs;
- cell = map_gat2cell(gat);
- maplist[m].cell[j].walkable = cell.walkable;
- maplist[m].cell[j].shootable = cell.shootable;
- maplist[m].cell[j].water = cell.water;
+ cell = map->gat2cell(gat);
+ map->list[m].cell[j].walkable = cell.walkable;
+ map->list[m].cell[j].shootable = cell.shootable;
+ map->list[m].cell[j].water = cell.water;
}
/*==========================================
* Invisible Walls
*------------------------------------------*/
-static DBMap* iwall_db;
-
void map_iwall_nextxy(int16 x, int16 y, int8 dir, int pos, int16 *x1, int16 *y1)
{
if( dir == 0 || dir == 4 )
@@ -2504,7 +2677,7 @@ bool map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shootable
if( size < 1 || !wall_name )
return false;
- if( (iwall = (struct iwall_data *)strdb_get(iwall_db, wall_name)) != NULL )
+ if( (iwall = (struct iwall_data *)strdb_get(map->iwall_db, wall_name)) != NULL )
return false; // Already Exists
if( map->getcell(m, x, y, CELL_CHKNOREACH) )
@@ -2520,21 +2693,21 @@ bool map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shootable
safestrncpy(iwall->wall_name, wall_name, sizeof(iwall->wall_name));
for( i = 0; i < size; i++ ) {
- map_iwall_nextxy(x, y, dir, i, &x1, &y1);
+ map->iwall_nextxy(x, y, dir, i, &x1, &y1);
if( map->getcell(m, x1, y1, CELL_CHKNOREACH) )
break; // Collision
- maplist[m].setcell(m, x1, y1, CELL_WALKABLE, false);
- maplist[m].setcell(m, x1, y1, CELL_SHOOTABLE, shootable);
+ map->list[m].setcell(m, x1, y1, CELL_WALKABLE, false);
+ map->list[m].setcell(m, x1, y1, CELL_SHOOTABLE, shootable);
clif->changemapcell(0, m, x1, y1, map->getcell(m, x1, y1, CELL_GETTYPE), ALL_SAMEMAP);
}
iwall->size = i;
- strdb_put(iwall_db, iwall->wall_name, iwall);
- maplist[m].iwall_num++;
+ strdb_put(map->iwall_db, iwall->wall_name, iwall);
+ map->list[m].iwall_num++;
return true;
}
@@ -2545,16 +2718,16 @@ void map_iwall_get(struct map_session_data *sd) {
int16 x1, y1;
int i;
- if( maplist[sd->bl.m].iwall_num < 1 )
+ if( map->list[sd->bl.m].iwall_num < 1 )
return;
- iter = db_iterator(iwall_db);
+ iter = db_iterator(map->iwall_db);
for( iwall = dbi_first(iter); dbi_exists(iter); iwall = dbi_next(iter) ) {
if( iwall->m != sd->bl.m )
continue;
for( i = 0; i < iwall->size; i++ ) {
- map_iwall_nextxy(iwall->x, iwall->y, iwall->dir, i, &x1, &y1);
+ map->iwall_nextxy(iwall->x, iwall->y, iwall->dir, i, &x1, &y1);
clif->changemapcell(sd->fd, iwall->m, x1, y1, map->getcell(iwall->m, x1, y1, CELL_GETTYPE), SELF);
}
}
@@ -2566,26 +2739,26 @@ void map_iwall_remove(const char *wall_name)
struct iwall_data *iwall;
int16 i, x1, y1;
- if( (iwall = (struct iwall_data *)strdb_get(iwall_db, wall_name)) == NULL )
+ if( (iwall = (struct iwall_data *)strdb_get(map->iwall_db, wall_name)) == NULL )
return; // Nothing to do
for( i = 0; i < iwall->size; i++ ) {
- map_iwall_nextxy(iwall->x, iwall->y, iwall->dir, i, &x1, &y1);
+ map->iwall_nextxy(iwall->x, iwall->y, iwall->dir, i, &x1, &y1);
- maplist[iwall->m].setcell(iwall->m, x1, y1, CELL_SHOOTABLE, true);
- maplist[iwall->m].setcell(iwall->m, x1, y1, CELL_WALKABLE, true);
+ map->list[iwall->m].setcell(iwall->m, x1, y1, CELL_SHOOTABLE, true);
+ map->list[iwall->m].setcell(iwall->m, x1, y1, CELL_WALKABLE, true);
clif->changemapcell(0, iwall->m, x1, y1, map->getcell(iwall->m, x1, y1, CELL_GETTYPE), ALL_SAMEMAP);
}
- maplist[iwall->m].iwall_num--;
- strdb_remove(iwall_db, iwall->wall_name);
+ map->list[iwall->m].iwall_num--;
+ strdb_remove(map->iwall_db, iwall->wall_name);
}
/**
-* @see DBCreateData
-*/
-static DBData create_map_data_other_server(DBKey key, va_list args)
+ * @see DBCreateData
+ */
+DBData create_map_data_other_server(DBKey key, va_list args)
{
struct map_data_other_server *mdos;
unsigned short mapindex = (unsigned short)key.ui;
@@ -2596,13 +2769,13 @@ static DBData create_map_data_other_server(DBKey key, va_list args)
}
/*==========================================
-* Add mapindex to db of another map server
-*------------------------------------------*/
+ * Add mapindex to db of another map server
+ *------------------------------------------*/
int map_setipport(unsigned short mapindex, uint32 ip, uint16 port)
{
struct map_data_other_server *mdos;
- mdos= uidb_ensure(map_db,(unsigned int)mapindex, create_map_data_other_server);
+ mdos= uidb_ensure(map->map_db,(unsigned int)mapindex, 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;
@@ -2617,36 +2790,36 @@ int map_setipport(unsigned short mapindex, uint32 ip, uint16 port)
}
/**
-* Delete all the other maps server management
-* @see DBApply
-*/
+ * Delete all the other maps server management
+ * @see DBApply
+ */
int map_eraseallipport_sub(DBKey key, DBData *data, va_list va)
{
struct map_data_other_server *mdos = DB->data2ptr(data);
if(mdos->cell == NULL) {
- db_remove(map_db,key);
+ db_remove(map->map_db,key);
aFree(mdos);
}
return 0;
}
int map_eraseallipport(void) {
- map_db->foreach(map_db,map_eraseallipport_sub);
+ map->map_db->foreach(map->map_db,map->eraseallipport_sub);
return 1;
}
/*==========================================
-* Delete mapindex from db of another map server
-*------------------------------------------*/
+ * Delete mapindex from db of another map server
+ *------------------------------------------*/
int map_eraseipport(unsigned short mapindex, uint32 ip, uint16 port) {
struct map_data_other_server *mdos;
- mdos = (struct map_data_other_server*)uidb_get(map_db,(unsigned int)mapindex);
+ mdos = (struct map_data_other_server*)uidb_get(map->map_db,(unsigned int)mapindex);
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_db,(unsigned int)mapindex);
+ uidb_remove(map->map_db,(unsigned int)mapindex);
aFree(mdos);
return 1;
}
@@ -2654,10 +2827,9 @@ int map_eraseipport(unsigned short mapindex, uint32 ip, uint16 port) {
}
/*==========================================
-* [Shinryo]: Init the mapcache
-*------------------------------------------*/
-static char *map_init_mapcache(FILE *fp)
-{
+ * [Shinryo]: Init the mapcache
+ *------------------------------------------*/
+char *map_init_mapcache(FILE *fp) {
size_t size = 0;
char *buffer;
@@ -2685,9 +2857,9 @@ static char *map_init_mapcache(FILE *fp)
}
/*==========================================
-* Map cache reading
-* [Shinryo]: Optimized some behaviour to speed this up
-*==========================================*/
+ * Map cache reading
+ * [Shinryo]: Optimized some behaviour to speed this up
+ *==========================================*/
int map_readfromcache(struct map_data *m, char *buffer) {
int i;
struct map_cache_main_header *header = (struct map_cache_main_header *)buffer;
@@ -2730,15 +2902,15 @@ int map_readfromcache(struct map_data *m, char *buffer) {
int map_addmap(char* mapname) {
- maplist[map->map_num].instance_id = -1;
- mapindex_getmapname(mapname, maplist[map->map_num++].name);
+ map->list[map->count].instance_id = -1;
+ mapindex_getmapname(mapname, map->list[map->count++].name);
return 0;
}
-static void map_delmapid(int id) {
- ShowNotice("Removing map [ %s ] from maplist"CL_CLL"\n",maplist[id].name);
- memmove(maplist+id, maplist+id+1, sizeof(maplist[0])*(map->map_num-id-1));
- map->map_num--;
+void map_delmapid(int id) {
+ ShowNotice("Removing map [ %s ] from map->list"CL_CLL"\n",map->list[id].name);
+ memmove(map->list+id, map->list+id+1, sizeof(map->list[0])*(map->count-id-1));
+ map->count--;
}
int map_delmap(char* mapname) {
@@ -2746,14 +2918,14 @@ int map_delmap(char* mapname) {
char map_name[MAP_NAME_LENGTH];
if (strcmpi(mapname, "all") == 0) {
- map->map_num = 0;
+ map->count = 0;
return 0;
}
mapindex_getmapname(mapname, map_name);
- for(i = 0; i < map->map_num; i++) {
- if (strcmp(maplist[i].name, map_name) == 0) {
- map_delmapid(i);
+ for(i = 0; i < map->count; i++) {
+ if (strcmp(map->list[i].name, map_name) == 0) {
+ map->delmapid(i);
return 1;
}
}
@@ -2763,7 +2935,7 @@ void map_zone_db_clear(void) {
struct map_zone_data *zone;
int i;
- DBIterator *iter = db_iterator(zone_db);
+ DBIterator *iter = db_iterator(map->zone_db);
for(zone = dbi_first(iter); dbi_exists(iter); zone = dbi_next(iter)) {
for(i = 0; i < zone->disabled_skills_count; i++) {
aFree(zone->disabled_skills[i]);
@@ -2785,229 +2957,229 @@ void map_zone_db_clear(void) {
}
dbi_destroy(iter);
- db_destroy(zone_db);/* will aFree(zone) */
+ db_destroy(map->zone_db);/* will aFree(zone) */
/* clear the pk zone stuff */
- for(i = 0; i < map_zone_pk.disabled_skills_count; i++) {
- aFree(map_zone_pk.disabled_skills[i]);
+ for(i = 0; i < map->zone_pk.disabled_skills_count; i++) {
+ aFree(map->zone_pk.disabled_skills[i]);
}
- aFree(map_zone_pk.disabled_skills);
- aFree(map_zone_pk.disabled_items);
- for(i = 0; i < map_zone_pk.mapflags_count; i++) {
- aFree(map_zone_pk.mapflags[i]);
+ aFree(map->zone_pk.disabled_skills);
+ aFree(map->zone_pk.disabled_items);
+ for(i = 0; i < map->zone_pk.mapflags_count; i++) {
+ aFree(map->zone_pk.mapflags[i]);
}
- aFree(map_zone_pk.mapflags);
- for(i = 0; i < map_zone_pk.disabled_commands_count; i++) {
- aFree(map_zone_pk.disabled_commands[i]);
+ aFree(map->zone_pk.mapflags);
+ for(i = 0; i < map->zone_pk.disabled_commands_count; i++) {
+ aFree(map->zone_pk.disabled_commands[i]);
}
- aFree(map_zone_pk.disabled_commands);
- for(i = 0; i < map_zone_pk.capped_skills_count; i++) {
- aFree(map_zone_pk.capped_skills[i]);
+ aFree(map->zone_pk.disabled_commands);
+ for(i = 0; i < map->zone_pk.capped_skills_count; i++) {
+ aFree(map->zone_pk.capped_skills[i]);
}
- aFree(map_zone_pk.capped_skills);
+ aFree(map->zone_pk.capped_skills);
/* clear the main zone stuff */
- for(i = 0; i < map_zone_all.disabled_skills_count; i++) {
- aFree(map_zone_all.disabled_skills[i]);
+ for(i = 0; i < map->zone_all.disabled_skills_count; i++) {
+ aFree(map->zone_all.disabled_skills[i]);
}
- aFree(map_zone_all.disabled_skills);
- aFree(map_zone_all.disabled_items);
- for(i = 0; i < map_zone_all.mapflags_count; i++) {
- aFree(map_zone_all.mapflags[i]);
+ aFree(map->zone_all.disabled_skills);
+ aFree(map->zone_all.disabled_items);
+ for(i = 0; i < map->zone_all.mapflags_count; i++) {
+ aFree(map->zone_all.mapflags[i]);
}
- aFree(map_zone_all.mapflags);
- for(i = 0; i < map_zone_all.disabled_commands_count; i++) {
- aFree(map_zone_all.disabled_commands[i]);
+ aFree(map->zone_all.mapflags);
+ for(i = 0; i < map->zone_all.disabled_commands_count; i++) {
+ aFree(map->zone_all.disabled_commands[i]);
}
- aFree(map_zone_all.disabled_commands);
- for(i = 0; i < map_zone_all.capped_skills_count; i++) {
- aFree(map_zone_all.capped_skills[i]);
+ aFree(map->zone_all.disabled_commands);
+ for(i = 0; i < map->zone_all.capped_skills_count; i++) {
+ aFree(map->zone_all.capped_skills[i]);
}
- aFree(map_zone_all.capped_skills);
+ aFree(map->zone_all.capped_skills);
}
void map_clean(int i) {
int v;
- if(maplist[i].cell && maplist[i].cell != (struct mapcell *)0xdeadbeaf) aFree(maplist[i].cell);
- if(maplist[i].block) aFree(maplist[i].block);
- if(maplist[i].block_mob) aFree(maplist[i].block_mob);
+ if(map->list[i].cell && map->list[i].cell != (struct mapcell *)0xdeadbeaf) aFree(map->list[i].cell);
+ if(map->list[i].block) aFree(map->list[i].block);
+ if(map->list[i].block_mob) aFree(map->list[i].block_mob);
if(battle_config.dynamic_mobs) { //Dynamic mobs flag by [random]
int j;
- if(maplist[i].mob_delete_timer != INVALID_TIMER)
- timer->delete(maplist[i].mob_delete_timer, map->removemobs_timer);
+ if(map->list[i].mob_delete_timer != INVALID_TIMER)
+ timer->delete(map->list[i].mob_delete_timer, map->removemobs_timer);
for (j=0; j<MAX_MOB_LIST_PER_MAP; j++)
- if (maplist[i].moblist[j]) aFree(maplist[i].moblist[j]);
+ if (map->list[i].moblist[j]) aFree(map->list[i].moblist[j]);
}
- if( maplist[i].unit_count ) {
- for(v = 0; v < maplist[i].unit_count; v++) {
- aFree(maplist[i].units[v]);
+ if( map->list[i].unit_count ) {
+ for(v = 0; v < map->list[i].unit_count; v++) {
+ aFree(map->list[i].units[v]);
}
- if( maplist[i].units ) {
- aFree(maplist[i].units);
- maplist[i].units = NULL;
+ if( map->list[i].units ) {
+ aFree(map->list[i].units);
+ map->list[i].units = NULL;
}
- maplist[i].unit_count = 0;
+ map->list[i].unit_count = 0;
}
- if( maplist[i].skill_count ) {
- for(v = 0; v < maplist[i].skill_count; v++) {
- aFree(maplist[i].skills[v]);
+ if( map->list[i].skill_count ) {
+ for(v = 0; v < map->list[i].skill_count; v++) {
+ aFree(map->list[i].skills[v]);
}
- if( maplist[i].skills ) {
- aFree(maplist[i].skills);
- maplist[i].skills = NULL;
+ if( map->list[i].skills ) {
+ aFree(map->list[i].skills);
+ map->list[i].skills = NULL;
}
- maplist[i].skill_count = 0;
+ map->list[i].skill_count = 0;
}
- if( maplist[i].zone_mf_count ) {
- for(v = 0; v < maplist[i].zone_mf_count; v++) {
- aFree(maplist[i].zone_mf[v]);
+ if( map->list[i].zone_mf_count ) {
+ for(v = 0; v < map->list[i].zone_mf_count; v++) {
+ aFree(map->list[i].zone_mf[v]);
}
- if( maplist[i].zone_mf ) {
- aFree(maplist[i].zone_mf);
- maplist[i].zone_mf = NULL;
+ if( map->list[i].zone_mf ) {
+ aFree(map->list[i].zone_mf);
+ map->list[i].zone_mf = NULL;
}
- maplist[i].zone_mf_count = 0;
+ map->list[i].zone_mf_count = 0;
}
- if( maplist[i].channel )
- clif->chsys_delete(maplist[i].channel);
+ if( map->list[i].channel )
+ clif->chsys_delete(map->list[i].channel);
}
void do_final_maps(void) {
int i, v = 0;
- for( i = 0; i < map->map_num; i++ ) {
+ for( i = 0; i < map->count; i++ ) {
- if(maplist[i].cell && maplist[i].cell != (struct mapcell *)0xdeadbeaf ) aFree(maplist[i].cell);
- if(maplist[i].block) aFree(maplist[i].block);
- if(maplist[i].block_mob) aFree(maplist[i].block_mob);
+ if(map->list[i].cell && map->list[i].cell != (struct mapcell *)0xdeadbeaf ) aFree(map->list[i].cell);
+ if(map->list[i].block) aFree(map->list[i].block);
+ if(map->list[i].block_mob) aFree(map->list[i].block_mob);
if(battle_config.dynamic_mobs) { //Dynamic mobs flag by [random]
int j;
- if(maplist[i].mob_delete_timer != INVALID_TIMER)
- timer->delete(maplist[i].mob_delete_timer, map->removemobs_timer);
+ if(map->list[i].mob_delete_timer != INVALID_TIMER)
+ timer->delete(map->list[i].mob_delete_timer, map->removemobs_timer);
for (j=0; j<MAX_MOB_LIST_PER_MAP; j++)
- if (maplist[i].moblist[j]) aFree(maplist[i].moblist[j]);
+ if (map->list[i].moblist[j]) aFree(map->list[i].moblist[j]);
}
- if( maplist[i].unit_count ) {
- for(v = 0; v < maplist[i].unit_count; v++) {
- aFree(maplist[i].units[v]);
+ if( map->list[i].unit_count ) {
+ for(v = 0; v < map->list[i].unit_count; v++) {
+ aFree(map->list[i].units[v]);
}
- if( maplist[i].units ) {
- aFree(maplist[i].units);
- maplist[i].units = NULL;
+ if( map->list[i].units ) {
+ aFree(map->list[i].units);
+ map->list[i].units = NULL;
}
- maplist[i].unit_count = 0;
+ map->list[i].unit_count = 0;
}
- if( maplist[i].skill_count ) {
- for(v = 0; v < maplist[i].skill_count; v++) {
- aFree(maplist[i].skills[v]);
+ if( map->list[i].skill_count ) {
+ for(v = 0; v < map->list[i].skill_count; v++) {
+ aFree(map->list[i].skills[v]);
}
- if( maplist[i].skills ) {
- aFree(maplist[i].skills);
- maplist[i].skills = NULL;
+ if( map->list[i].skills ) {
+ aFree(map->list[i].skills);
+ map->list[i].skills = NULL;
}
- maplist[i].skill_count = 0;
+ map->list[i].skill_count = 0;
}
- if( maplist[i].zone_mf_count ) {
- for(v = 0; v < maplist[i].zone_mf_count; v++) {
- aFree(maplist[i].zone_mf[v]);
+ if( map->list[i].zone_mf_count ) {
+ for(v = 0; v < map->list[i].zone_mf_count; v++) {
+ aFree(map->list[i].zone_mf[v]);
}
- if( maplist[i].zone_mf ) {
- aFree(maplist[i].zone_mf);
- maplist[i].zone_mf = NULL;
+ if( map->list[i].zone_mf ) {
+ aFree(map->list[i].zone_mf);
+ map->list[i].zone_mf = NULL;
}
- maplist[i].zone_mf_count = 0;
+ map->list[i].zone_mf_count = 0;
}
- if( maplist[i].drop_list_count ) {
- maplist[i].drop_list_count = 0;
+ if( map->list[i].drop_list_count ) {
+ map->list[i].drop_list_count = 0;
}
- if( maplist[i].drop_list != NULL )
- aFree(maplist[i].drop_list);
+ if( map->list[i].drop_list != NULL )
+ aFree(map->list[i].drop_list);
- if( maplist[i].channel )
- clif->chsys_delete(maplist[i].channel);
+ if( map->list[i].channel )
+ clif->chsys_delete(map->list[i].channel);
}
- map_zone_db_clear();
+ map->zone_db_clear();
}
/// Initializes map flags and adjusts them depending on configuration.
void map_flags_init(void) {
int i, v = 0;
- for( i = 0; i < map->map_num; i++ ) {
+ for( i = 0; i < map->count; i++ ) {
// mapflags
- memset(&maplist[i].flag, 0, sizeof(maplist[i].flag));
+ memset(&map->list[i].flag, 0, sizeof(map->list[i].flag));
// additional mapflag data
- maplist[i].nocommand = 0; // nocommand mapflag level
- maplist[i].bexp = 100; // per map base exp multiplicator
- maplist[i].jexp = 100; // per map job exp multiplicator
- if( maplist[i].drop_list != NULL )
- aFree(maplist[i].drop_list);
- maplist[i].drop_list = NULL;
- maplist[i].drop_list_count = 0;
-
- if( maplist[i].unit_count ) {
- for(v = 0; v < maplist[i].unit_count; v++) {
- aFree(maplist[i].units[v]);
+ map->list[i].nocommand = 0; // nocommand mapflag level
+ map->list[i].bexp = 100; // per map base exp multiplicator
+ map->list[i].jexp = 100; // per map job exp multiplicator
+ if( map->list[i].drop_list != NULL )
+ aFree(map->list[i].drop_list);
+ map->list[i].drop_list = NULL;
+ map->list[i].drop_list_count = 0;
+
+ if( map->list[i].unit_count ) {
+ for(v = 0; v < map->list[i].unit_count; v++) {
+ aFree(map->list[i].units[v]);
}
- aFree(maplist[i].units);
+ aFree(map->list[i].units);
}
- maplist[i].units = NULL;
- maplist[i].unit_count = 0;
+ map->list[i].units = NULL;
+ map->list[i].unit_count = 0;
- if( maplist[i].skill_count ) {
- for(v = 0; v < maplist[i].skill_count; v++) {
- aFree(maplist[i].skills[v]);
+ if( map->list[i].skill_count ) {
+ for(v = 0; v < map->list[i].skill_count; v++) {
+ aFree(map->list[i].skills[v]);
}
- aFree(maplist[i].skills);
+ aFree(map->list[i].skills);
}
- maplist[i].skills = NULL;
- maplist[i].skill_count = 0;
+ map->list[i].skills = NULL;
+ map->list[i].skill_count = 0;
// adjustments
if( battle_config.pk_mode ) {
- maplist[i].flag.pvp = 1; // make all maps pvp for pk_mode [Valaris]
- maplist[i].zone = &map_zone_pk;
+ map->list[i].flag.pvp = 1; // make all maps pvp for pk_mode [Valaris]
+ map->list[i].zone = &map->zone_pk;
} else /* align with 'All' zone */
- maplist[i].zone = &map_zone_all;
+ map->list[i].zone = &map->zone_all;
- if( maplist[i].zone_mf_count ) {
- for(v = 0; v < maplist[i].zone_mf_count; v++) {
- aFree(maplist[i].zone_mf[v]);
+ if( map->list[i].zone_mf_count ) {
+ for(v = 0; v < map->list[i].zone_mf_count; v++) {
+ aFree(map->list[i].zone_mf[v]);
}
- aFree(maplist[i].zone_mf);
+ aFree(map->list[i].zone_mf);
}
- maplist[i].zone_mf = NULL;
- maplist[i].zone_mf_count = 0;
- maplist[i].prev_zone = maplist[i].zone;
+ map->list[i].zone_mf = NULL;
+ map->list[i].zone_mf_count = 0;
+ map->list[i].prev_zone = map->list[i].zone;
- maplist[i].invincible_time_inc = 0;
+ map->list[i].invincible_time_inc = 0;
- maplist[i].weapon_damage_rate = 100;
- maplist[i].magic_damage_rate = 100;
- maplist[i].misc_damage_rate = 100;
- maplist[i].short_damage_rate = 100;
- maplist[i].long_damage_rate = 100;
+ map->list[i].weapon_damage_rate = 100;
+ map->list[i].magic_damage_rate = 100;
+ map->list[i].misc_damage_rate = 100;
+ map->list[i].short_damage_rate = 100;
+ map->list[i].long_damage_rate = 100;
}
}
#define NO_WATER 1000000
/*
-* Reads from the .rsw for each map
-* Returns water height (or NO_WATER if file doesn't exist) or other error is encountered.
-* Assumed path for file is data/mapname.rsw
-* Credits to LittleWolf
-*/
+ * Reads from the .rsw for each map
+ * Returns water height (or NO_WATER if file doesn't exist) or other error is encountered.
+ * Assumed path for file is data/mapname.rsw
+ * Credits to LittleWolf
+ */
int map_waterheight(char* mapname)
{
char fn[256];
@@ -3032,8 +3204,8 @@ int map_waterheight(char* mapname)
}
/*==================================
-* .GAT format
-*----------------------------------*/
+ * .GAT format
+ *----------------------------------*/
int map_readgat (struct map_data* m)
{
char filename[256];
@@ -3052,7 +3224,7 @@ int map_readgat (struct map_data* m)
num_cells = m->xs * m->ys;
CREATE(m->cell, struct mapcell, num_cells);
- water_height = map_waterheight(m->name);
+ water_height = map->waterheight(m->name);
// Set cell properties
off = 14;
@@ -3066,7 +3238,7 @@ int map_readgat (struct map_data* m)
if( type == 0 && water_height != NO_WATER && height > water_height )
type = 3; // Cell is 0 (walkable) but under water level, set to 3 (walkable water)
- m->cell[xy] = map_gat2cell(type);
+ m->cell[xy] = map->gat2cell(type);
}
aFree(gat);
@@ -3075,25 +3247,25 @@ int map_readgat (struct map_data* m)
}
/*======================================
-* Add/Remove map to the map_db
-*--------------------------------------*/
+ * Add/Remove map to the map_db
+ *--------------------------------------*/
void map_addmap2db(struct map_data *m) {
- index2mapid[m->index] = m->m;
+ map->index2mapid[m->index] = m->m;
}
void map_removemapdb(struct map_data *m) {
- index2mapid[m->index] = -1;
+ map->index2mapid[m->index] = -1;
}
/*======================================
-* Initiate maps loading stage
-*--------------------------------------*/
+ * Initiate maps loading stage
+ *--------------------------------------*/
int map_readallmaps (void) {
int i;
FILE* fp=NULL;
int maps_removed = 0;
- if( enable_grf )
+ if( map->enable_grf )
ShowStatus("Loading maps (using GRF files)...\n");
else {
char mapcachefilepath[254];
@@ -3105,73 +3277,73 @@ int map_readallmaps (void) {
}
// Init mapcache data.. [Shinryo]
- map_cache_buffer = map_init_mapcache(fp);
- if(!map_cache_buffer) {
+ map->cache_buffer = map->init_mapcache(fp);
+ if(!map->cache_buffer) {
ShowFatalError("Failed to initialize mapcache data (%s)..\n", mapcachefilepath);
exit(EXIT_FAILURE);
}
}
- for(i = 0; i < map->map_num; i++) {
+ for(i = 0; i < map->count; i++) {
size_t size;
// show progress
- if(enable_grf)
- ShowStatus("Loading maps [%i/%i]: %s"CL_CLL"\r", i, map->map_num, maplist[i].name);
+ if(map->enable_grf)
+ ShowStatus("Loading maps [%i/%i]: %s"CL_CLL"\r", i, map->count, map->list[i].name);
// try to load the map
if( !
- (enable_grf?
- map_readgat(&maplist[i])
- :map_readfromcache(&maplist[i], map_cache_buffer))
+ (map->enable_grf?
+ map->readgat(&map->list[i])
+ :map->readfromcache(&map->list[i], map->cache_buffer))
) {
- map_delmapid(i);
+ map->delmapid(i);
maps_removed++;
i--;
continue;
}
- maplist[i].index = mapindex_name2id(maplist[i].name);
+ map->list[i].index = mapindex_name2id(map->list[i].name);
- if ( index2mapid[map_id2index(i)] != -1 ) {
- ShowWarning("Map %s already loaded!"CL_CLL"\n", maplist[i].name);
- if (maplist[i].cell && maplist[i].cell != (struct mapcell *)0xdeadbeaf) {
- aFree(maplist[i].cell);
- maplist[i].cell = NULL;
+ if ( map->index2mapid[map_id2index(i)] != -1 ) {
+ ShowWarning("Map %s already loaded!"CL_CLL"\n", map->list[i].name);
+ if (map->list[i].cell && map->list[i].cell != (struct mapcell *)0xdeadbeaf) {
+ aFree(map->list[i].cell);
+ map->list[i].cell = NULL;
}
- map_delmapid(i);
+ map->delmapid(i);
maps_removed++;
i--;
continue;
}
- maplist[i].m = i;
- map->addmap2db(&maplist[i]);
+ map->list[i].m = i;
+ map->addmap2db(&map->list[i]);
- memset(maplist[i].moblist, 0, sizeof(maplist[i].moblist)); //Initialize moblist [Skotlex]
- maplist[i].mob_delete_timer = INVALID_TIMER; //Initialize timer [Skotlex]
+ memset(map->list[i].moblist, 0, sizeof(map->list[i].moblist)); //Initialize moblist [Skotlex]
+ map->list[i].mob_delete_timer = INVALID_TIMER; //Initialize timer [Skotlex]
- maplist[i].bxs = (maplist[i].xs + BLOCK_SIZE - 1) / BLOCK_SIZE;
- maplist[i].bys = (maplist[i].ys + BLOCK_SIZE - 1) / BLOCK_SIZE;
+ map->list[i].bxs = (map->list[i].xs + BLOCK_SIZE - 1) / BLOCK_SIZE;
+ map->list[i].bys = (map->list[i].ys + BLOCK_SIZE - 1) / BLOCK_SIZE;
- size = maplist[i].bxs * maplist[i].bys * sizeof(struct block_list*);
- maplist[i].block = (struct block_list**)aCalloc(size, 1);
- maplist[i].block_mob = (struct block_list**)aCalloc(size, 1);
+ size = map->list[i].bxs * map->list[i].bys * sizeof(struct block_list*);
+ map->list[i].block = (struct block_list**)aCalloc(size, 1);
+ map->list[i].block_mob = (struct block_list**)aCalloc(size, 1);
- maplist[i].getcellp = map_sub_getcellp;
- maplist[i].setcell = map_sub_setcell;
+ map->list[i].getcellp = map->sub_getcellp;
+ map->list[i].setcell = map->sub_setcell;
}
// intialization and configuration-dependent adjustments of mapflags
map->flags_init();
- if( !enable_grf ) {
+ if( !map->enable_grf ) {
fclose(fp);
}
// finished map loading
- ShowInfo("Successfully loaded '"CL_WHITE"%d"CL_RESET"' maps."CL_CLL"\n",map->map_num);
- instance->start_id = map->map_num; // Next Map Index will be instances
+ ShowInfo("Successfully loaded '"CL_WHITE"%d"CL_RESET"' maps."CL_CLL"\n",map->count);
+ instance->start_id = map->count; // Next Map Index will be instances
if (maps_removed)
ShowNotice("Maps removed: '"CL_WHITE"%d"CL_RESET"'\n",maps_removed);
@@ -3179,13 +3351,9 @@ int map_readallmaps (void) {
return 0;
}
-////////////////////////////////////////////////////////////////////////
-static int map_ip_set = 0;
-static int char_ip_set = 0;
-
/*==========================================
-* Read map server configuration files (conf/map_server.conf...)
-*------------------------------------------*/
+ * Read map server configuration files (conf/map_server.conf...)
+ *------------------------------------------*/
int map_config_read(char *cfgName) {
char line[1024], w1[1024], w2[1024];
FILE *fp;
@@ -3225,20 +3393,20 @@ int map_config_read(char *cfgName) {
else if (strcmpi(w1, "passwd") == 0)
chrif->setpasswd(w2);
else if (strcmpi(w1, "char_ip") == 0)
- char_ip_set = chrif->setip(w2);
+ map->char_ip_set = chrif->setip(w2);
else if (strcmpi(w1, "char_port") == 0)
chrif->setport(atoi(w2));
else if (strcmpi(w1, "map_ip") == 0)
- map_ip_set = clif->setip(w2);
+ map->ip_set = clif->setip(w2);
else if (strcmpi(w1, "bind_ip") == 0)
clif->setbindip(w2);
else if (strcmpi(w1, "map_port") == 0) {
clif->setport(atoi(w2));
- map_port = (atoi(w2));
+ map->port = (atoi(w2));
} else if (strcmpi(w1, "map") == 0)
- map->map_num++;
+ map->count++;
else if (strcmpi(w1, "delmap") == 0)
- map->map_num--;
+ map->count--;
else if (strcmpi(w1, "npc") == 0)
npc->addsrcfile(w2);
else if (strcmpi(w1, "delnpc") == 0)
@@ -3266,11 +3434,11 @@ int map_config_read(char *cfgName) {
else if (strcmpi(w1, "enable_spy") == 0)
map->enable_spy = config_switch(w2);
else if (strcmpi(w1, "use_grf") == 0)
- enable_grf = config_switch(w2);
+ map->enable_grf = config_switch(w2);
else if (strcmpi(w1, "console_msg_log") == 0)
console_msg_log = atoi(w2);//[Ind]
else if (strcmpi(w1, "import") == 0)
- map_config_read(w2);
+ map->config_read(w2);
else
ShowWarning("Unknown setting '%s' in file %s\n", w1, cfgName);
}
@@ -3305,11 +3473,11 @@ int map_config_read_sub(char *cfgName) {
*ptr = '\0';
if (strcmpi(w1, "map") == 0)
- map_addmap(w2);
+ map->addmap(w2);
else if (strcmpi(w1, "delmap") == 0)
map->delmap(w2);
else if (strcmpi(w1, "import") == 0)
- map_config_read_sub(w2);
+ map->config_read_sub(w2);
}
fclose(fp);
@@ -3347,7 +3515,7 @@ void map_reloadnpc_sub(char *cfgName)
if (strcmpi(w1, "npc") == 0)
npc->addsrcfile(w2);
else if (strcmpi(w1, "import") == 0)
- map_reloadnpc_sub(w2);
+ map->reloadnpc_sub(w2);
else
ShowWarning("Unknown setting '%s' in file %s\n", w1, cfgName);
}
@@ -3361,9 +3529,9 @@ void map_reloadnpc(bool clear)
npc->addsrcfile("clear"); // this will clear the current script list
#ifdef RENEWAL
- map_reloadnpc_sub("npc/re/scripts_main.conf");
+ map->reloadnpc_sub("npc/re/scripts_main.conf");
#else
- map_reloadnpc_sub("npc/pre-re/scripts_main.conf");
+ map->reloadnpc_sub("npc/pre-re/scripts_main.conf");
#endif
}
@@ -3400,17 +3568,17 @@ int inter_config_read(char *cfgName) {
strcpy(map->interreg_db,w2);
/* map sql stuff */
else if(strcmpi(w1,"map_server_ip")==0)
- strcpy(map_server_ip, w2);
+ strcpy(map->server_ip, w2);
else if(strcmpi(w1,"map_server_port")==0)
- map_server_port=atoi(w2);
+ map->server_port=atoi(w2);
else if(strcmpi(w1,"map_server_id")==0)
- strcpy(map_server_id, w2);
+ strcpy(map->server_id, w2);
else if(strcmpi(w1,"map_server_pw")==0)
- strcpy(map_server_pw, w2);
+ strcpy(map->server_pw, w2);
else if(strcmpi(w1,"map_server_db")==0)
- strcpy(map_server_db, w2);
+ strcpy(map->server_db, w2);
else if(strcmpi(w1,"default_codepage")==0)
- strcpy(default_codepage, w2);
+ strcpy(map->default_codepage, w2);
else if(strcmpi(w1,"use_sql_item_db")==0) {
map->db_use_sql_item_db = config_switch(w2);
ShowStatus ("Using item database as SQL: '%s'\n", w2);
@@ -3425,21 +3593,21 @@ int inter_config_read(char *cfgName) {
}
/* sql log db */
else if(strcmpi(w1,"log_db_ip")==0)
- strcpy(log_db_ip, w2);
+ strcpy(logs->db_ip, w2);
else if(strcmpi(w1,"log_db_id")==0)
- strcpy(log_db_id, w2);
+ strcpy(logs->db_id, w2);
else if(strcmpi(w1,"log_db_pw")==0)
- strcpy(log_db_pw, w2);
+ strcpy(logs->db_pw, w2);
else if(strcmpi(w1,"log_db_port")==0)
- log_db_port = atoi(w2);
+ logs->db_port = atoi(w2);
else if(strcmpi(w1,"log_db_db")==0)
- strcpy(log_db_db, w2);
+ strcpy(logs->db_name, w2);
/* mapreg */
else if( mapreg->config_read(w1,w2) )
continue;
/* import */
else if(strcmpi(w1,"import")==0)
- inter_config_read(w2);
+ map->inter_config_read(w2);
}
fclose(fp);
@@ -3447,21 +3615,21 @@ int inter_config_read(char *cfgName) {
}
/*=======================================
-* MySQL Init
-*---------------------------------------*/
+ * MySQL Init
+ *---------------------------------------*/
int map_sql_init(void)
{
// main db connection
- mmysql_handle = SQL->Malloc();
+ map->mysql_handle = SQL->Malloc();
ShowInfo("Connecting to the Map DB Server....\n");
- if( SQL_ERROR == SQL->Connect(mmysql_handle, map_server_id, map_server_pw, map_server_ip, map_server_port, map_server_db) )
+ if( SQL_ERROR == SQL->Connect(map->mysql_handle, map->server_id, map->server_pw, map->server_ip, map->server_port, map->server_db) )
exit(EXIT_FAILURE);
ShowStatus("connect success! (Map Server Connection)\n");
- if( strlen(default_codepage) > 0 )
- if ( SQL_ERROR == SQL->SetEncoding(mmysql_handle, default_codepage) )
- Sql_ShowDebug(mmysql_handle);
+ if( strlen(map->default_codepage) > 0 )
+ if ( SQL_ERROR == SQL->SetEncoding(map->mysql_handle, map->default_codepage) )
+ Sql_ShowDebug(map->mysql_handle);
return 0;
}
@@ -3469,46 +3637,29 @@ int map_sql_init(void)
int map_sql_close(void)
{
ShowStatus("Close Map DB Connection....\n");
- SQL->Free(mmysql_handle);
- mmysql_handle = NULL;
+ SQL->Free(map->mysql_handle);
+ map->mysql_handle = NULL;
if (logs->config.sql_logs) {
- ShowStatus("Close Log DB Connection....\n");
- SQL->Free(logmysql_handle);
- logmysql_handle = NULL;
+ logs->sql_final();
}
return 0;
}
-int log_sql_init(void)
-{
- // log db connection
- logmysql_handle = SQL->Malloc();
-
- ShowInfo(""CL_WHITE"[SQL]"CL_RESET": Connecting to the Log Database "CL_WHITE"%s"CL_RESET" At "CL_WHITE"%s"CL_RESET"...\n",log_db_db,log_db_ip);
- if ( SQL_ERROR == SQL->Connect(logmysql_handle, log_db_id, log_db_pw, log_db_ip, log_db_port, log_db_db) )
- exit(EXIT_FAILURE);
- ShowStatus(""CL_WHITE"[SQL]"CL_RESET": Successfully '"CL_GREEN"connected"CL_RESET"' to Database '"CL_WHITE"%s"CL_RESET"'.\n", log_db_db);
-
- if( strlen(default_codepage) > 0 )
- if ( SQL_ERROR == SQL->SetEncoding(logmysql_handle, default_codepage) )
- Sql_ShowDebug(logmysql_handle);
- return 0;
-}
void map_zone_change2(int m, struct map_zone_data *zone) {
char empty[1] = "\0";
- maplist[m].prev_zone = maplist[m].zone;
+ map->list[m].prev_zone = map->list[m].zone;
- if( maplist[m].zone_mf_count )
+ if( map->list[m].zone_mf_count )
map->zone_remove(m);
map->zone_apply(m,zone,empty,empty,empty);
}
/* when changing from a mapflag to another during runtime */
void map_zone_change(int m, struct map_zone_data *zone, const char* start, const char* buffer, const char* filepath) {
- maplist[m].prev_zone = maplist[m].zone;
+ map->list[m].prev_zone = map->list[m].zone;
- if( maplist[m].zone_mf_count )
+ if( map->list[m].zone_mf_count )
map->zone_remove(m);
map->zone_apply(m,zone,start,buffer,filepath);
}
@@ -3517,10 +3668,10 @@ void map_zone_remove(int m) {
char flag[MAP_ZONE_MAPFLAG_LENGTH], params[MAP_ZONE_MAPFLAG_LENGTH];
unsigned short k;
char empty[1] = "\0";
- for(k = 0; k < maplist[m].zone_mf_count; k++) {
- int len = strlen(maplist[m].zone_mf[k]),j;
+ for(k = 0; k < map->list[m].zone_mf_count; k++) {
+ int len = strlen(map->list[m].zone_mf[k]),j;
params[0] = '\0';
- memcpy(flag, maplist[m].zone_mf[k], MAP_ZONE_MAPFLAG_LENGTH);
+ memcpy(flag, map->list[m].zone_mf[k], MAP_ZONE_MAPFLAG_LENGTH);
for(j = 0; j < len; j++) {
if( flag[j] == '\t' ) {
memcpy(params, &flag[j+1], len - j);
@@ -3529,19 +3680,19 @@ void map_zone_remove(int m) {
}
}
- npc->parse_mapflag(maplist[m].name,empty,flag,params,empty,empty,empty);
- aFree(maplist[m].zone_mf[k]);
- maplist[m].zone_mf[k] = NULL;
+ npc->parse_mapflag(map->list[m].name,empty,flag,params,empty,empty,empty);
+ aFree(map->list[m].zone_mf[k]);
+ map->list[m].zone_mf[k] = NULL;
}
- aFree(maplist[m].zone_mf);
- maplist[m].zone_mf = NULL;
- maplist[m].zone_mf_count = 0;
+ aFree(map->list[m].zone_mf);
+ map->list[m].zone_mf = NULL;
+ map->list[m].zone_mf_count = 0;
}
static inline void map_zone_mf_cache_add(int m, char *rflag) {
- RECREATE(maplist[m].zone_mf, char *, ++maplist[m].zone_mf_count);
- CREATE(maplist[m].zone_mf[maplist[m].zone_mf_count - 1], char, MAP_ZONE_MAPFLAG_LENGTH);
- safestrncpy(maplist[m].zone_mf[maplist[m].zone_mf_count - 1], rflag, MAP_ZONE_MAPFLAG_LENGTH);
+ RECREATE(map->list[m].zone_mf, char *, ++map->list[m].zone_mf_count);
+ CREATE(map->list[m].zone_mf[map->list[m].zone_mf_count - 1], char, MAP_ZONE_MAPFLAG_LENGTH);
+ safestrncpy(map->list[m].zone_mf[map->list[m].zone_mf_count - 1], rflag, MAP_ZONE_MAPFLAG_LENGTH);
}
/* TODO: introduce enumerations to each mapflag so instead of reading the string a number of times we read it only once and use its value wherever we need */
/* cache previous values to revert */
@@ -3557,157 +3708,157 @@ bool map_zone_mf_cache(int m, char *flag, char *params) {
char savemap[32];
int savex, savey;
if (state == 0) {
- if( maplist[m].flag.nosave ) {
+ if( map->list[m].flag.nosave ) {
sprintf(rflag, "nosave\tSavePoint");
map_zone_mf_cache_add(m,nosave);
}
} else if (!strcmpi(params, "SavePoint")) {
- if( maplist[m].save.map ) {
- sprintf(rflag, "nosave\t%s,%d,%d",mapindex_id2name(maplist[m].save.map),maplist[m].save.x,maplist[m].save.y);
+ if( map->list[m].save.map ) {
+ sprintf(rflag, "nosave\t%s,%d,%d",mapindex_id2name(map->list[m].save.map),map->list[m].save.x,map->list[m].save.y);
} else
- sprintf(rflag, "nosave\t%s,%d,%d",mapindex_id2name(maplist[m].save.map),maplist[m].save.x,maplist[m].save.y);
+ sprintf(rflag, "nosave\t%s,%d,%d",mapindex_id2name(map->list[m].save.map),map->list[m].save.x,map->list[m].save.y);
map_zone_mf_cache_add(m,nosave);
} else if (sscanf(params, "%31[^,],%d,%d", savemap, &savex, &savey) == 3) {
- if( maplist[m].save.map ) {
- sprintf(rflag, "nosave\t%s,%d,%d",mapindex_id2name(maplist[m].save.map),maplist[m].save.x,maplist[m].save.y);
+ if( map->list[m].save.map ) {
+ sprintf(rflag, "nosave\t%s,%d,%d",mapindex_id2name(map->list[m].save.map),map->list[m].save.x,map->list[m].save.y);
map_zone_mf_cache_add(m,nosave);
}
}
#endif // 0
} else if (!strcmpi(flag,"autotrade")) {
- if( state && maplist[m].flag.autotrade )
+ if( state && map->list[m].flag.autotrade )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"autotrade\toff");
- else if( !maplist[m].flag.autotrade )
+ else if( !map->list[m].flag.autotrade )
map_zone_mf_cache_add(m,"autotrade");
}
} else if (!strcmpi(flag,"allowks")) {
- if( state && maplist[m].flag.allowks )
+ if( state && map->list[m].flag.allowks )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"allowks\toff");
- else if( !maplist[m].flag.allowks )
+ else if( !map->list[m].flag.allowks )
map_zone_mf_cache_add(m,"allowks");
}
} else if (!strcmpi(flag,"town")) {
- if( state && maplist[m].flag.town )
+ if( state && map->list[m].flag.town )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"town\toff");
- else if( !maplist[m].flag.town )
+ else if( !map->list[m].flag.town )
map_zone_mf_cache_add(m,"town");
}
} else if (!strcmpi(flag,"nomemo")) {
- if( state && maplist[m].flag.nomemo )
+ if( state && map->list[m].flag.nomemo )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"nomemo\toff");
- else if( !maplist[m].flag.nomemo )
+ else if( !map->list[m].flag.nomemo )
map_zone_mf_cache_add(m,"nomemo");
}
} else if (!strcmpi(flag,"noteleport")) {
- if( state && maplist[m].flag.noteleport )
+ if( state && map->list[m].flag.noteleport )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"noteleport\toff");
- else if( !maplist[m].flag.noteleport )
+ else if( !map->list[m].flag.noteleport )
map_zone_mf_cache_add(m,"noteleport");
}
} else if (!strcmpi(flag,"nowarp")) {
- if( state && maplist[m].flag.nowarp )
+ if( state && map->list[m].flag.nowarp )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"nowarp\toff");
- else if( !maplist[m].flag.nowarp )
+ else if( !map->list[m].flag.nowarp )
map_zone_mf_cache_add(m,"nowarp");
}
} else if (!strcmpi(flag,"nowarpto")) {
- if( state && maplist[m].flag.nowarpto )
+ if( state && map->list[m].flag.nowarpto )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"nowarpto\toff");
- else if( !maplist[m].flag.nowarpto )
+ else if( !map->list[m].flag.nowarpto )
map_zone_mf_cache_add(m,"nowarpto");
}
} else if (!strcmpi(flag,"noreturn")) {
- if( state && maplist[m].flag.noreturn )
+ if( state && map->list[m].flag.noreturn )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"noreturn\toff");
- else if( maplist[m].flag.noreturn )
+ else if( map->list[m].flag.noreturn )
map_zone_mf_cache_add(m,"noreturn");
}
} else if (!strcmpi(flag,"monster_noteleport")) {
- if( state && maplist[m].flag.monster_noteleport )
+ if( state && map->list[m].flag.monster_noteleport )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"monster_noteleport\toff");
- else if( maplist[m].flag.monster_noteleport )
+ else if( map->list[m].flag.monster_noteleport )
map_zone_mf_cache_add(m,"monster_noteleport");
}
} else if (!strcmpi(flag,"nobranch")) {
- if( state && maplist[m].flag.nobranch )
+ if( state && map->list[m].flag.nobranch )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"nobranch\toff");
- else if( maplist[m].flag.nobranch )
+ else if( map->list[m].flag.nobranch )
map_zone_mf_cache_add(m,"nobranch");
}
} else if (!strcmpi(flag,"nopenalty")) {
- if( state && maplist[m].flag.noexppenalty ) /* they are applied together, no need to check both */
+ if( state && map->list[m].flag.noexppenalty ) /* they are applied together, no need to check both */
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"nopenalty\toff");
- else if( maplist[m].flag.noexppenalty )
+ else if( map->list[m].flag.noexppenalty )
map_zone_mf_cache_add(m,"nopenalty");
}
} else if (!strcmpi(flag,"pvp")) {
- if( state && maplist[m].flag.pvp )
+ if( state && map->list[m].flag.pvp )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"pvp\toff");
- else if( maplist[m].flag.pvp )
+ else if( map->list[m].flag.pvp )
map_zone_mf_cache_add(m,"pvp");
}
}
else if (!strcmpi(flag,"pvp_noparty")) {
- if( state && maplist[m].flag.pvp_noparty )
+ if( state && map->list[m].flag.pvp_noparty )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"pvp_noparty\toff");
- else if( maplist[m].flag.pvp_noparty )
+ else if( map->list[m].flag.pvp_noparty )
map_zone_mf_cache_add(m,"pvp_noparty");
}
} else if (!strcmpi(flag,"pvp_noguild")) {
- if( state && maplist[m].flag.pvp_noguild )
+ if( state && map->list[m].flag.pvp_noguild )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"pvp_noguild\toff");
- else if( maplist[m].flag.pvp_noguild )
+ else if( map->list[m].flag.pvp_noguild )
map_zone_mf_cache_add(m,"pvp_noguild");
}
} else if (!strcmpi(flag, "pvp_nightmaredrop")) {
- if( state && maplist[m].flag.pvp_nightmaredrop )
+ if( state && map->list[m].flag.pvp_nightmaredrop )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"pvp_nightmaredrop\toff");
- else if( maplist[m].flag.pvp_nightmaredrop )
+ else if( map->list[m].flag.pvp_nightmaredrop )
map_zone_mf_cache_add(m,"pvp_nightmaredrop");
}
#if 0 /* not yet fully supported */
@@ -3729,262 +3880,262 @@ bool map_zone_mf_cache(int m, char *flag, char *params) {
if (drop_id != 0) {
int i;
for (i = 0; i < MAX_DROP_PER_MAP; i++) {
- if (maplist[m].drop_list[i].drop_id == 0){
- maplist[m].drop_list[i].drop_id = drop_id;
- maplist[m].drop_list[i].drop_type = drop_type;
- maplist[m].drop_list[i].drop_per = drop_per;
+ if (map->list[m].drop_list[i].drop_id == 0){
+ map->list[m].drop_list[i].drop_id = drop_id;
+ map->list[m].drop_list[i].drop_type = drop_type;
+ map->list[m].drop_list[i].drop_per = drop_per;
break;
}
}
- maplist[m].flag.pvp_nightmaredrop = 1;
+ map->list[m].flag.pvp_nightmaredrop = 1;
}
} else if (!state) //Disable
- maplist[m].flag.pvp_nightmaredrop = 0;
+ map->list[m].flag.pvp_nightmaredrop = 0;
#endif // 0
} else if (!strcmpi(flag,"pvp_nocalcrank")) {
- if( state && maplist[m].flag.pvp_nocalcrank )
+ if( state && map->list[m].flag.pvp_nocalcrank )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"pvp_nocalcrank\toff");
- else if( maplist[m].flag.pvp_nocalcrank )
+ else if( map->list[m].flag.pvp_nocalcrank )
map_zone_mf_cache_add(m,"pvp_nocalcrank");
}
} else if (!strcmpi(flag,"gvg")) {
- if( state && maplist[m].flag.gvg )
+ if( state && map->list[m].flag.gvg )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"gvg\toff");
- else if( maplist[m].flag.gvg )
+ else if( map->list[m].flag.gvg )
map_zone_mf_cache_add(m,"gvg");
}
} else if (!strcmpi(flag,"gvg_noparty")) {
- if( state && maplist[m].flag.gvg_noparty )
+ if( state && map->list[m].flag.gvg_noparty )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"gvg_noparty\toff");
- else if( maplist[m].flag.gvg_noparty )
+ else if( map->list[m].flag.gvg_noparty )
map_zone_mf_cache_add(m,"gvg_noparty");
}
} else if (!strcmpi(flag,"gvg_dungeon")) {
- if( state && maplist[m].flag.gvg_dungeon )
+ if( state && map->list[m].flag.gvg_dungeon )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"gvg_dungeon\toff");
- else if( maplist[m].flag.gvg_dungeon )
+ else if( map->list[m].flag.gvg_dungeon )
map_zone_mf_cache_add(m,"gvg_dungeon");
}
}
else if (!strcmpi(flag,"gvg_castle")) {
- if( state && maplist[m].flag.gvg_castle )
+ if( state && map->list[m].flag.gvg_castle )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"gvg_castle\toff");
- else if( maplist[m].flag.gvg_castle )
+ else if( map->list[m].flag.gvg_castle )
map_zone_mf_cache_add(m,"gvg_castle");
}
}
else if (!strcmpi(flag,"battleground")) {
- if( state && maplist[m].flag.battleground )
+ if( state && map->list[m].flag.battleground )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"battleground\toff");
- else if( maplist[m].flag.battleground )
+ else if( map->list[m].flag.battleground )
map_zone_mf_cache_add(m,"battleground");
}
} else if (!strcmpi(flag,"noexppenalty")) {
- if( state && maplist[m].flag.noexppenalty )
+ if( state && map->list[m].flag.noexppenalty )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"noexppenalty\toff");
- else if( maplist[m].flag.noexppenalty )
+ else if( map->list[m].flag.noexppenalty )
map_zone_mf_cache_add(m,"noexppenalty");
}
} else if (!strcmpi(flag,"nozenypenalty")) {
- if( state && maplist[m].flag.nozenypenalty )
+ if( state && map->list[m].flag.nozenypenalty )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"nozenypenalty\toff");
- else if( maplist[m].flag.nozenypenalty )
+ else if( map->list[m].flag.nozenypenalty )
map_zone_mf_cache_add(m,"nozenypenalty");
}
} else if (!strcmpi(flag,"notrade")) {
- if( state && maplist[m].flag.notrade )
+ if( state && map->list[m].flag.notrade )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"notrade\toff");
- else if( maplist[m].flag.notrade )
+ else if( map->list[m].flag.notrade )
map_zone_mf_cache_add(m,"notrade");
}
} else if (!strcmpi(flag,"novending")) {
- if( state && maplist[m].flag.novending )
+ if( state && map->list[m].flag.novending )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"novending\toff");
- else if( maplist[m].flag.novending )
+ else if( map->list[m].flag.novending )
map_zone_mf_cache_add(m,"novending");
}
} else if (!strcmpi(flag,"nodrop")) {
- if( state && maplist[m].flag.nodrop )
+ if( state && map->list[m].flag.nodrop )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"nodrop\toff");
- else if( maplist[m].flag.nodrop )
+ else if( map->list[m].flag.nodrop )
map_zone_mf_cache_add(m,"nodrop");
}
} else if (!strcmpi(flag,"noskill")) {
- if( state && maplist[m].flag.noskill )
+ if( state && map->list[m].flag.noskill )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"noskill\toff");
- else if( maplist[m].flag.noskill )
+ else if( map->list[m].flag.noskill )
map_zone_mf_cache_add(m,"noskill");
}
} else if (!strcmpi(flag,"noicewall")) {
- if( state && maplist[m].flag.noicewall )
+ if( state && map->list[m].flag.noicewall )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"noicewall\toff");
- else if( maplist[m].flag.noicewall )
+ else if( map->list[m].flag.noicewall )
map_zone_mf_cache_add(m,"noicewall");
}
} else if (!strcmpi(flag,"snow")) {
- if( state && maplist[m].flag.snow )
+ if( state && map->list[m].flag.snow )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"snow\toff");
- else if( maplist[m].flag.snow )
+ else if( map->list[m].flag.snow )
map_zone_mf_cache_add(m,"snow");
}
} else if (!strcmpi(flag,"clouds")) {
- if( state && maplist[m].flag.clouds )
+ if( state && map->list[m].flag.clouds )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"clouds\toff");
- else if( maplist[m].flag.clouds )
+ else if( map->list[m].flag.clouds )
map_zone_mf_cache_add(m,"clouds");
}
} else if (!strcmpi(flag,"clouds2")) {
- if( state && maplist[m].flag.clouds2 )
+ if( state && map->list[m].flag.clouds2 )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"clouds2\toff");
- else if( maplist[m].flag.clouds2 )
+ else if( map->list[m].flag.clouds2 )
map_zone_mf_cache_add(m,"clouds2");
}
} else if (!strcmpi(flag,"fog")) {
- if( state && maplist[m].flag.fog )
+ if( state && map->list[m].flag.fog )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"fog\toff");
- else if( maplist[m].flag.fog )
+ else if( map->list[m].flag.fog )
map_zone_mf_cache_add(m,"fog");
}
} else if (!strcmpi(flag,"fireworks")) {
- if( state && maplist[m].flag.fireworks )
+ if( state && map->list[m].flag.fireworks )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"fireworks\toff");
- else if( maplist[m].flag.fireworks )
+ else if( map->list[m].flag.fireworks )
map_zone_mf_cache_add(m,"fireworks");
}
} else if (!strcmpi(flag,"sakura")) {
- if( state && maplist[m].flag.sakura )
+ if( state && map->list[m].flag.sakura )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"sakura\toff");
- else if( maplist[m].flag.sakura )
+ else if( map->list[m].flag.sakura )
map_zone_mf_cache_add(m,"sakura");
}
} else if (!strcmpi(flag,"leaves")) {
- if( state && maplist[m].flag.leaves )
+ if( state && map->list[m].flag.leaves )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"leaves\toff");
- else if( maplist[m].flag.leaves )
+ else if( map->list[m].flag.leaves )
map_zone_mf_cache_add(m,"leaves");
}
} else if (!strcmpi(flag,"nightenabled")) {
- if( state && maplist[m].flag.nightenabled )
+ if( state && map->list[m].flag.nightenabled )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"nightenabled\toff");
- else if( maplist[m].flag.nightenabled )
+ else if( map->list[m].flag.nightenabled )
map_zone_mf_cache_add(m,"nightenabled");
}
} else if (!strcmpi(flag,"noexp")) {
- if( state && maplist[m].flag.nobaseexp )
+ if( state && map->list[m].flag.nobaseexp )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"noexp\toff");
- else if( maplist[m].flag.nobaseexp )
+ else if( map->list[m].flag.nobaseexp )
map_zone_mf_cache_add(m,"noexp");
}
}
else if (!strcmpi(flag,"nobaseexp")) {
- if( state && maplist[m].flag.nobaseexp )
+ if( state && map->list[m].flag.nobaseexp )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"nobaseexp\toff");
- else if( maplist[m].flag.nobaseexp )
+ else if( map->list[m].flag.nobaseexp )
map_zone_mf_cache_add(m,"nobaseexp");
}
} else if (!strcmpi(flag,"nojobexp")) {
- if( state && maplist[m].flag.nojobexp )
+ if( state && map->list[m].flag.nojobexp )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"nojobexp\toff");
- else if( maplist[m].flag.nojobexp )
+ else if( map->list[m].flag.nojobexp )
map_zone_mf_cache_add(m,"nojobexp");
}
} else if (!strcmpi(flag,"noloot")) {
- if( state && maplist[m].flag.nomobloot )
+ if( state && map->list[m].flag.nomobloot )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"noloot\toff");
- else if( maplist[m].flag.nomobloot )
+ else if( map->list[m].flag.nomobloot )
map_zone_mf_cache_add(m,"noloot");
}
} else if (!strcmpi(flag,"nomobloot")) {
- if( state && maplist[m].flag.nomobloot )
+ if( state && map->list[m].flag.nomobloot )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"nomobloot\toff");
- else if( maplist[m].flag.nomobloot )
+ else if( map->list[m].flag.nomobloot )
map_zone_mf_cache_add(m,"nomobloot");
}
} else if (!strcmpi(flag,"nomvploot")) {
- if( state && maplist[m].flag.nomvploot )
+ if( state && map->list[m].flag.nomvploot )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"nomvploot\toff");
- else if( maplist[m].flag.nomvploot )
+ else if( map->list[m].flag.nomvploot )
map_zone_mf_cache_add(m,"nomvploot");
}
} else if (!strcmpi(flag,"nocommand")) {
@@ -3992,79 +4143,79 @@ bool map_zone_mf_cache(int m, char *flag, char *params) {
if( state && sscanf(params, "%d", &state) == 1 ) {
sprintf(rflag, "nocommand\t%s",params);
map_zone_mf_cache_add(m,rflag);
- } else if( !state && maplist[m].nocommand ) {
- sprintf(rflag, "nocommand\t%d",maplist[m].nocommand);
+ } else if( !state && map->list[m].nocommand ) {
+ sprintf(rflag, "nocommand\t%d",map->list[m].nocommand);
map_zone_mf_cache_add(m,rflag);
- } else if( maplist[m].nocommand ) {
+ } else if( map->list[m].nocommand ) {
map_zone_mf_cache_add(m,"nocommand\toff");
}
} else if (!strcmpi(flag,"jexp")) {
if( !state ) {
- if( maplist[m].jexp != 100 ) {
- sprintf(rflag,"jexp\t%d",maplist[m].jexp);
+ if( map->list[m].jexp != 100 ) {
+ sprintf(rflag,"jexp\t%d",map->list[m].jexp);
map_zone_mf_cache_add(m,rflag);
}
} if( sscanf(params, "%d", &state) == 1 ) {
- if( state != maplist[m].jexp ) {
+ if( state != map->list[m].jexp ) {
sprintf(rflag,"jexp\t%s",params);
map_zone_mf_cache_add(m,rflag);
}
}
} else if (!strcmpi(flag,"bexp")) {
if( !state ) {
- if( maplist[m].bexp != 100 ) {
- sprintf(rflag,"bexp\t%d",maplist[m].jexp);
+ if( map->list[m].bexp != 100 ) {
+ sprintf(rflag,"bexp\t%d",map->list[m].jexp);
map_zone_mf_cache_add(m,rflag);
}
} if( sscanf(params, "%d", &state) == 1 ) {
- if( state != maplist[m].bexp ) {
+ if( state != map->list[m].bexp ) {
sprintf(rflag,"bexp\t%s",params);
map_zone_mf_cache_add(m,rflag);
}
}
} else if (!strcmpi(flag,"loadevent")) {
- if( state && maplist[m].flag.loadevent )
+ if( state && map->list[m].flag.loadevent )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"loadevent\toff");
- else if( maplist[m].flag.loadevent )
+ else if( map->list[m].flag.loadevent )
map_zone_mf_cache_add(m,"loadevent");
}
} else if (!strcmpi(flag,"nochat")) {
- if( state && maplist[m].flag.nochat )
+ if( state && map->list[m].flag.nochat )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"nochat\toff");
- else if( maplist[m].flag.nochat )
+ else if( map->list[m].flag.nochat )
map_zone_mf_cache_add(m,"nochat");
}
} else if (!strcmpi(flag,"partylock")) {
- if( state && maplist[m].flag.partylock )
+ if( state && map->list[m].flag.partylock )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"partylock\toff");
- else if( maplist[m].flag.partylock )
+ else if( map->list[m].flag.partylock )
map_zone_mf_cache_add(m,"partylock");
}
} else if (!strcmpi(flag,"guildlock")) {
- if( state && maplist[m].flag.guildlock )
+ if( state && map->list[m].flag.guildlock )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"guildlock\toff");
- else if( maplist[m].flag.guildlock )
+ else if( map->list[m].flag.guildlock )
map_zone_mf_cache_add(m,"guildlock");
}
} else if (!strcmpi(flag,"reset")) {
- if( state && maplist[m].flag.reset )
+ if( state && map->list[m].flag.reset )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"reset\toff");
- else if( maplist[m].flag.reset )
+ else if( map->list[m].flag.reset )
map_zone_mf_cache_add(m,"reset");
}
} else if (!strcmpi(flag,"adjust_unit_duration")) {
@@ -4086,14 +4237,14 @@ bool map_zone_mf_cache(int m, char *flag, char *params) {
if( modifier[0] == '\0' || !( skill_id = skill->name2id(skill_name) ) || !skill->get_unit_id( skill->name2id(skill_name), 0) || atoi(modifier) < 1 || atoi(modifier) > USHRT_MAX ) {
;/* we dont mind it, the server will take care of it next. */
} else {
- int idx = maplist[m].unit_count;
+ int idx = map->list[m].unit_count;
k = 0;
- ARR_FIND(0, idx, k, maplist[m].units[k]->skill_id == skill_id);
+ ARR_FIND(0, idx, k, map->list[m].units[k]->skill_id == skill_id);
if( k < idx ) {
- if( atoi(modifier) != maplist[m].units[k]->modifier ) {
- sprintf(rflag,"adjust_unit_duration\t%s\t%d",skill_name,maplist[m].units[k]->modifier);
+ if( atoi(modifier) != map->list[m].units[k]->modifier ) {
+ sprintf(rflag,"adjust_unit_duration\t%s\t%d",skill_name,map->list[m].units[k]->modifier);
map_zone_mf_cache_add(m,rflag);
}
} else {
@@ -4120,14 +4271,14 @@ bool map_zone_mf_cache(int m, char *flag, char *params) {
if( modifier[0] == '\0' || !( skill_id = skill->name2id(skill_name) ) || atoi(modifier) < 1 || atoi(modifier) > USHRT_MAX ) {
;/* we dont mind it, the server will take care of it next. */
} else {
- int idx = maplist[m].skill_count;
+ int idx = map->list[m].skill_count;
k = 0;
- ARR_FIND(0, idx, k, maplist[m].skills[k]->skill_id == skill_id);
+ ARR_FIND(0, idx, k, map->list[m].skills[k]->skill_id == skill_id);
if( k < idx ) {
- if( atoi(modifier) != maplist[m].skills[k]->modifier ) {
- sprintf(rflag,"adjust_skill_damage\t%s\t%d",skill_name,maplist[m].skills[k]->modifier);
+ if( atoi(modifier) != map->list[m].skills[k]->modifier ) {
+ sprintf(rflag,"adjust_skill_damage\t%s\t%d",skill_name,map->list[m].skills[k]->modifier);
map_zone_mf_cache_add(m,rflag);
}
} else {
@@ -4137,94 +4288,94 @@ bool map_zone_mf_cache(int m, char *flag, char *params) {
}
} else if (!strcmpi(flag,"zone")) {
- ShowWarning("You can't add a zone through a zone! ERROR, skipping for '%s'...\n",maplist[m].name);
+ ShowWarning("You can't add a zone through a zone! ERROR, skipping for '%s'...\n",map->list[m].name);
return true;
} else if ( !strcmpi(flag,"nomapchannelautojoin") ) {
- if( state && maplist[m].flag.chsysnolocalaj )
+ if( state && map->list[m].flag.chsysnolocalaj )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"nomapchannelautojoin\toff");
- else if( maplist[m].flag.chsysnolocalaj )
+ else if( map->list[m].flag.chsysnolocalaj )
map_zone_mf_cache_add(m,"nomapchannelautojoin");
}
} else if ( !strcmpi(flag,"invincible_time_inc") ) {
if( !state ) {
- if( maplist[m].invincible_time_inc != 0 ) {
- sprintf(rflag,"invincible_time_inc\t%d",maplist[m].invincible_time_inc);
+ if( map->list[m].invincible_time_inc != 0 ) {
+ sprintf(rflag,"invincible_time_inc\t%d",map->list[m].invincible_time_inc);
map_zone_mf_cache_add(m,rflag);
}
} if( sscanf(params, "%d", &state) == 1 ) {
- if( state != maplist[m].invincible_time_inc ) {
+ if( state != map->list[m].invincible_time_inc ) {
sprintf(rflag,"invincible_time_inc\t%s",params);
map_zone_mf_cache_add(m,rflag);
}
}
} else if ( !strcmpi(flag,"noknockback") ) {
- if( state && maplist[m].flag.noknockback )
+ if( state && map->list[m].flag.noknockback )
;/* nothing to do */
else {
if( state )
map_zone_mf_cache_add(m,"noknockback\toff");
- else if( maplist[m].flag.noknockback )
+ else if( map->list[m].flag.noknockback )
map_zone_mf_cache_add(m,"noknockback");
}
} else if ( !strcmpi(flag,"weapon_damage_rate") ) {
if( !state ) {
- if( maplist[m].weapon_damage_rate != 100 ) {
- sprintf(rflag,"weapon_damage_rate\t%d",maplist[m].weapon_damage_rate);
+ if( map->list[m].weapon_damage_rate != 100 ) {
+ sprintf(rflag,"weapon_damage_rate\t%d",map->list[m].weapon_damage_rate);
map_zone_mf_cache_add(m,rflag);
}
} if( sscanf(params, "%d", &state) == 1 ) {
- if( state != maplist[m].weapon_damage_rate ) {
+ if( state != map->list[m].weapon_damage_rate ) {
sprintf(rflag,"weapon_damage_rate\t%s",params);
map_zone_mf_cache_add(m,rflag);
}
}
} else if ( !strcmpi(flag,"magic_damage_rate") ) {
if( !state ) {
- if( maplist[m].magic_damage_rate != 100 ) {
- sprintf(rflag,"magic_damage_rate\t%d",maplist[m].magic_damage_rate);
+ if( map->list[m].magic_damage_rate != 100 ) {
+ sprintf(rflag,"magic_damage_rate\t%d",map->list[m].magic_damage_rate);
map_zone_mf_cache_add(m,rflag);
}
} if( sscanf(params, "%d", &state) == 1 ) {
- if( state != maplist[m].magic_damage_rate ) {
+ if( state != map->list[m].magic_damage_rate ) {
sprintf(rflag,"magic_damage_rate\t%s",params);
map_zone_mf_cache_add(m,rflag);
}
}
} else if ( !strcmpi(flag,"misc_damage_rate") ) {
if( !state ) {
- if( maplist[m].misc_damage_rate != 100 ) {
- sprintf(rflag,"misc_damage_rate\t%d",maplist[m].misc_damage_rate);
+ if( map->list[m].misc_damage_rate != 100 ) {
+ sprintf(rflag,"misc_damage_rate\t%d",map->list[m].misc_damage_rate);
map_zone_mf_cache_add(m,rflag);
}
} if( sscanf(params, "%d", &state) == 1 ) {
- if( state != maplist[m].misc_damage_rate ) {
+ if( state != map->list[m].misc_damage_rate ) {
sprintf(rflag,"misc_damage_rate\t%s",params);
map_zone_mf_cache_add(m,rflag);
}
}
} else if ( !strcmpi(flag,"short_damage_rate") ) {
if( !state ) {
- if( maplist[m].short_damage_rate != 100 ) {
- sprintf(rflag,"short_damage_rate\t%d",maplist[m].short_damage_rate);
+ if( map->list[m].short_damage_rate != 100 ) {
+ sprintf(rflag,"short_damage_rate\t%d",map->list[m].short_damage_rate);
map_zone_mf_cache_add(m,rflag);
}
} if( sscanf(params, "%d", &state) == 1 ) {
- if( state != maplist[m].short_damage_rate ) {
+ if( state != map->list[m].short_damage_rate ) {
sprintf(rflag,"short_damage_rate\t%s",params);
map_zone_mf_cache_add(m,rflag);
}
}
} else if ( !strcmpi(flag,"long_damage_rate") ) {
if( !state ) {
- if( maplist[m].long_damage_rate != 100 ) {
- sprintf(rflag,"long_damage_rate\t%d",maplist[m].long_damage_rate);
+ if( map->list[m].long_damage_rate != 100 ) {
+ sprintf(rflag,"long_damage_rate\t%d",map->list[m].long_damage_rate);
map_zone_mf_cache_add(m,rflag);
}
} if( sscanf(params, "%d", &state) == 1 ) {
- if( state != maplist[m].long_damage_rate ) {
+ if( state != map->list[m].long_damage_rate ) {
sprintf(rflag,"long_damage_rate\t%s",params);
map_zone_mf_cache_add(m,rflag);
}
@@ -4236,7 +4387,7 @@ void map_zone_apply(int m, struct map_zone_data *zone, const char* start, const
int i;
char empty[1] = "\0";
char flag[MAP_ZONE_MAPFLAG_LENGTH], params[MAP_ZONE_MAPFLAG_LENGTH];
- maplist[m].zone = zone;
+ map->list[m].zone = zone;
for(i = 0; i < zone->mapflags_count; i++) {
int len = strlen(zone->mapflags[i]);
int k;
@@ -4250,10 +4401,10 @@ void map_zone_apply(int m, struct map_zone_data *zone, const char* start, const
}
}
- if( map_zone_mf_cache(m,flag,params) )
+ if( map->zone_mf_cache(m,flag,params) )
continue;
- npc->parse_mapflag(maplist[m].name,empty,flag,params,start,buffer,filepath);
+ npc->parse_mapflag(map->list[m].name,empty,flag,params,start,buffer,filepath);
}
}
/* used on npc load and reload to apply all "Normal" and "PK Mode" zones */
@@ -4263,7 +4414,7 @@ void map_zone_init(void) {
char empty[1] = "\0";
int i,k,j;
- zone = &map_zone_all;
+ zone = &map->zone_all;
for(i = 0; i < zone->mapflags_count; i++) {
int len = strlen(zone->mapflags[i]);
@@ -4277,17 +4428,17 @@ void map_zone_init(void) {
}
}
- for(j = 0; j < map->map_num; j++) {
- if( maplist[j].zone == zone ) {
- if( map_zone_mf_cache(j,flag,params) )
+ for(j = 0; j < map->count; j++) {
+ if( map->list[j].zone == zone ) {
+ if( map->zone_mf_cache(j,flag,params) )
break;
- npc->parse_mapflag(maplist[j].name,empty,flag,params,empty,empty,empty);
+ npc->parse_mapflag(map->list[j].name,empty,flag,params,empty,empty,empty);
}
}
}
if( battle_config.pk_mode ) {
- zone = &map_zone_pk;
+ zone = &map->zone_pk;
for(i = 0; i < zone->mapflags_count; i++) {
int len = strlen(zone->mapflags[i]);
params[0] = '\0';
@@ -4299,11 +4450,11 @@ void map_zone_init(void) {
break;
}
}
- for(j = 0; j < map->map_num; j++) {
- if( maplist[j].zone == zone ) {
- if( map_zone_mf_cache(j,flag,params) )
+ for(j = 0; j < map->count; j++) {
+ if( map->list[j].zone == zone ) {
+ if( map->zone_mf_cache(j,flag,params) )
break;
- npc->parse_mapflag(maplist[j].name,empty,flag,params,empty,empty,empty);
+ npc->parse_mapflag(map->list[j].name,empty,flag,params,empty,empty,empty);
}
}
}
@@ -4431,7 +4582,7 @@ void read_map_zone_db(void) {
continue;
}
- if( strdb_exists(zone_db, zonename) ) {
+ if( strdb_exists(map->zone_db, zonename) ) {
ShowError("map_zone_db: duplicate zone name '%s', skipping...\n",zonename);
config_setting_remove_elem(zones,i);/* remove from the tree */
--zone_count;
@@ -4441,10 +4592,10 @@ void read_map_zone_db(void) {
/* is this the global template? */
if( strncmpi(zonename,MAP_ZONE_NORMAL_NAME,MAP_ZONE_NAME_LENGTH) == 0 ) {
- zone = &map_zone_all;
+ zone = &map->zone_all;
is_all = true;
} else if( strncmpi(zonename,MAP_ZONE_PK_NAME,MAP_ZONE_NAME_LENGTH) == 0 ) {
- zone = &map_zone_pk;
+ zone = &map->zone_pk;
is_all = true;
} else {
CREATE( zone, struct map_zone_data, 1 );
@@ -4459,14 +4610,14 @@ void read_map_zone_db(void) {
for(h = 0; h < config_setting_length(skills); h++) {
config_setting_t *skillinfo = config_setting_get_elem(skills, h);
name = config_setting_name(skillinfo);
- if( !map_zone_str2skillid(name) ) {
+ if( !map->zone_str2skillid(name) ) {
ShowError("map_zone_db: unknown skill (%s) in disabled_skills for zone '%s', skipping skill...\n",name,zone->name);
config_setting_remove_elem(skills,h);
--disabled_skills_count;
--h;
continue;
}
- if( !map_zone_bl_type(config_setting_get_string_elem(skills,h),&subtype) )/* we dont remove it from the three due to inheritance */
+ if( !map->zone_bl_type(config_setting_get_string_elem(skills,h),&subtype) )/* we dont remove it from the three due to inheritance */
--disabled_skills_count;
}
/* all ok, process */
@@ -4477,10 +4628,10 @@ void read_map_zone_db(void) {
enum bl_type type;
name = config_setting_name(skillinfo);
- if( (type = map_zone_bl_type(config_setting_get_string_elem(skills,h),&subtype)) ) { /* only add if enabled */
+ if( (type = map->zone_bl_type(config_setting_get_string_elem(skills,h),&subtype)) ) { /* only add if enabled */
CREATE( entry, struct map_zone_disabled_skill_entry, 1 );
- entry->nameid = map_zone_str2skillid(name);
+ entry->nameid = map->zone_str2skillid(name);
entry->type = type;
entry->subtype = subtype;
@@ -4497,7 +4648,7 @@ void read_map_zone_db(void) {
for(h = 0; h < config_setting_length(items); h++) {
config_setting_t *item = config_setting_get_elem(items, h);
name = config_setting_name(item);
- if( !map_zone_str2itemid(name) ) {
+ if( !map->zone_str2itemid(name) ) {
ShowError("map_zone_db: unknown item (%s) in disabled_items for zone '%s', skipping item...\n",name,zone->name);
config_setting_remove_elem(items,h);
--disabled_items_count;
@@ -4514,7 +4665,7 @@ void read_map_zone_db(void) {
if( config_setting_get_bool(item) ) { /* only add if enabled */
name = config_setting_name(item);
- zone->disabled_items[v++] = map_zone_str2itemid(name);
+ zone->disabled_items[v++] = map->zone_str2itemid(name);
}
}
@@ -4578,14 +4729,14 @@ void read_map_zone_db(void) {
for(h = 0; h < config_setting_length(caps); h++) {
config_setting_t *cap = config_setting_get_elem(caps, h);
name = config_setting_name(cap);
- if( !map_zone_str2skillid(name) ) {
+ if( !map->zone_str2skillid(name) ) {
ShowError("map_zone_db: unknown skill (%s) in skill_damage_cap for zone '%s', skipping skill...\n",name,zone->name);
config_setting_remove_elem(caps,h);
--capped_skills_count;
--h;
continue;
}
- if( !map_zone_bl_type(config_setting_get_string_elem(cap,1),&subtype) )/* we dont remove it from the three due to inheritance */
+ if( !map->zone_bl_type(config_setting_get_string_elem(cap,1),&subtype) )/* we dont remove it from the three due to inheritance */
--capped_skills_count;
}
/* all ok, process */
@@ -4596,10 +4747,10 @@ void read_map_zone_db(void) {
enum bl_type type;
name = config_setting_name(cap);
- if( (type = map_zone_bl_type(config_setting_get_string_elem(cap,1),&subtype)) ) { /* only add if enabled */
+ if( (type = map->zone_bl_type(config_setting_get_string_elem(cap,1),&subtype)) ) { /* only add if enabled */
CREATE( entry, struct map_zone_skill_damage_cap_entry, 1 );
- entry->nameid = map_zone_str2skillid(name);
+ entry->nameid = map->zone_str2skillid(name);
entry->cap = config_setting_get_int_elem(cap,0);
entry->type = type;
entry->subtype = subtype;
@@ -4610,7 +4761,7 @@ void read_map_zone_db(void) {
}
if( !is_all ) /* global template doesn't go into db -- since it isn't a alloc'd piece of data */
- strdb_put(zone_db, zonename, zone);
+ strdb_put(map->zone_db, zonename, zone);
}
@@ -4650,17 +4801,17 @@ void read_map_zone_db(void) {
name = config_setting_get_string_elem(inherit_tree, h);
config_setting_lookup_string(zone_e, "name", &zonename);/* will succeed for we validated it earlier */
- if( !(izone = strdb_get(zone_db, name)) ) {
+ if( !(izone = strdb_get(map->zone_db, name)) ) {
ShowError("map_zone_db: Unknown zone '%s' being inherit by zone '%s', skipping...\n",name,zonename);
continue;
}
if( strncmpi(zonename,MAP_ZONE_NORMAL_NAME,MAP_ZONE_NAME_LENGTH) == 0 ) {
- zone = &map_zone_all;
+ zone = &map->zone_all;
} else if( strncmpi(zonename,MAP_ZONE_PK_NAME,MAP_ZONE_NAME_LENGTH) == 0 ) {
- zone = &map_zone_pk;
+ zone = &map->zone_pk;
} else
- zone = strdb_get(zone_db, zonename);/* will succeed for we just put it in here */
+ zone = strdb_get(map->zone_db, zonename);/* will succeed for we just put it in here */
disabled_skills_count_i = izone->disabled_skills_count;
disabled_items_count_i = izone->disabled_items_count;
@@ -4677,7 +4828,7 @@ void read_map_zone_db(void) {
int k;
for(k = 0; k < disabled_skills_count; k++) {
config_setting_t *skillinfo = config_setting_get_elem(skills, k);
- if( map_zone_str2skillid(config_setting_name(skillinfo)) == izone->disabled_skills[j]->nameid ) {
+ if( map->zone_str2skillid(config_setting_name(skillinfo)) == izone->disabled_skills[j]->nameid ) {
break;
}
}
@@ -4703,7 +4854,7 @@ void read_map_zone_db(void) {
name = config_setting_name(item);
- if( map_zone_str2itemid(name) == izone->disabled_items[j] ) {
+ if( map->zone_str2itemid(name) == izone->disabled_items[j] ) {
if( config_setting_get_bool(item) )
continue;
break;
@@ -4770,7 +4921,7 @@ void read_map_zone_db(void) {
int k;
for(k = 0; k < capped_skills_count; k++) {
config_setting_t *cap = config_setting_get_elem(caps, k);
- if( map_zone_str2skillid(config_setting_name(cap)) == izone->capped_skills[j]->nameid ) {
+ if( map->zone_str2skillid(config_setting_name(cap)) == izone->capped_skills[j]->nameid ) {
break;
}
}
@@ -4796,8 +4947,8 @@ void read_map_zone_db(void) {
}
/**
-* @see DBApply
-*/
+ * @see DBApply
+ */
int map_db_final(DBKey key, DBData *data, va_list ap) {
struct map_data_other_server *mdos = DB->data2ptr(data);
@@ -4808,8 +4959,8 @@ int map_db_final(DBKey key, DBData *data, va_list ap) {
}
/**
-* @see DBApply
-*/
+ * @see DBApply
+ */
int nick_db_final(DBKey key, DBData *data, va_list args)
{
struct charid2nick* p = DB->data2ptr(data);
@@ -4831,39 +4982,39 @@ int cleanup_sub(struct block_list *bl, va_list ap) {
nullpo_ret(bl);
switch(bl->type) {
- case BL_PC:
- map->quit((struct map_session_data *) bl);
- break;
- case BL_NPC:
- npc->unload((struct npc_data *)bl,false);
- break;
- case BL_MOB:
- unit->free(bl,CLR_OUTSIGHT);
- break;
- case BL_PET:
- //There is no need for this, the pet is removed together with the player. [Skotlex]
- break;
- case BL_ITEM:
- map->clearflooritem(bl);
- break;
- case BL_SKILL:
- skill->delunit((struct skill_unit *) bl);
- break;
+ case BL_PC:
+ map->quit((struct map_session_data *) bl);
+ break;
+ case BL_NPC:
+ npc->unload((struct npc_data *)bl,false);
+ break;
+ case BL_MOB:
+ unit->free(bl,CLR_OUTSIGHT);
+ break;
+ case BL_PET:
+ //There is no need for this, the pet is removed together with the player. [Skotlex]
+ break;
+ case BL_ITEM:
+ map->clearflooritem(bl);
+ break;
+ case BL_SKILL:
+ skill->delunit((struct skill_unit *) bl);
+ break;
}
return 1;
}
/**
-* @see DBApply
-*/
-static int cleanup_db_sub(DBKey key, DBData *data, va_list va) {
+ * @see DBApply
+ */
+int cleanup_db_sub(DBKey key, DBData *data, va_list va) {
return map->cleanup_sub(DB->data2ptr(data), va);
}
/*==========================================
-* map destructor
-*------------------------------------------*/
+ * map destructor
+ *------------------------------------------*/
void do_final(void)
{
int i;
@@ -4871,9 +5022,11 @@ void do_final(void)
struct s_mapiterator* iter;
ShowStatus("Terminating...\n");
+
hChSys.closing = true;
HPM->event(HPET_FINAL);
- if (cpsd) aFree(cpsd);
+
+ if (map->cpsd) aFree(map->cpsd);
//Ladies and babies first.
iter = mapit_getallusers();
@@ -4885,14 +5038,14 @@ void do_final(void)
npc->do_clear_npc();
// remove all objects on maps
- for (i = 0; i < map->map_num; i++) {
- ShowStatus("Cleaning up maps [%d/%d]: %s..."CL_CLL"\r", i+1, map->map_num, maplist[i].name);
- if (maplist[i].m >= 0)
- map_foreachinmap(map->cleanup_sub, i, BL_ALL);
+ for (i = 0; i < map->count; i++) {
+ ShowStatus("Cleaning up maps [%d/%d]: %s..."CL_CLL"\r", i+1, map->count, map->list[i].name);
+ if (map->list[i].m >= 0)
+ map->foreachinmap(map->cleanup_sub, i, BL_ALL);
}
- ShowStatus("Cleaned up %d maps."CL_CLL"\n", map->map_num);
+ ShowStatus("Cleaned up %d maps."CL_CLL"\n", map->count);
- id_db->foreach(id_db,cleanup_db_sub);
+ map->id_db->foreach(map->id_db,map->cleanup_db_sub);
chrif->char_reset_offline();
chrif->flush_fifo();
@@ -4905,10 +5058,10 @@ void do_final(void)
script->final();
itemdb->final();
instance->final();
- storage->final();
+ gstorage->final();
guild->final();
- party->do_final_party();
- pc->do_final_pc();
+ party->final();
+ pc->final();
pet->final();
mob->final();
homun->final();
@@ -4918,38 +5071,39 @@ void do_final(void)
unit->final();
bg->final();
duel->final();
- elemental->do_final_elemental();
- do_final_maps();
+ elemental->final();
+ map->list_final();
vending->final();
- map_db->destroy(map_db, map_db_final);
+ map->map_db->destroy(map->map_db, map->db_final);
mapindex_final();
- if(enable_grf)
+ if(map->enable_grf)
grfio_final();
- id_db->destroy(id_db, NULL);
- pc_db->destroy(pc_db, NULL);
- mobid_db->destroy(mobid_db, NULL);
- bossid_db->destroy(bossid_db, NULL);
- nick_db->destroy(nick_db, nick_db_final);
- charid_db->destroy(charid_db, NULL);
- iwall_db->destroy(iwall_db, NULL);
- regen_db->destroy(regen_db, NULL);
+ db_destroy(map->id_db);
+ db_destroy(map->pc_db);
+ db_destroy(map->mobid_db);
+ db_destroy(map->bossid_db);
+ map->nick_db->destroy(map->nick_db, map->nick_db_final);
+ db_destroy(map->charid_db);
+ db_destroy(map->iwall_db);
+ db_destroy(map->regen_db);
- map_sql_close();
- ers_destroy(map_iterator_ers);
+ map->sql_close();
+ ers_destroy(map->iterator_ers);
- aFree(maplist);
+ aFree(map->list);
- if( !enable_grf )
- aFree(map_cache_buffer);
+ if( !map->enable_grf )
+ aFree(map->cache_buffer);
+ HPM->event(HPET_POST_FINAL);
+
ShowStatus("Finished.\n");
}
-static int map_abort_sub(struct map_session_data* sd, va_list ap)
-{
+int map_abort_sub(struct map_session_data* sd, va_list ap) {
chrif->save(sd,1);
return 1;
}
@@ -4970,19 +5124,19 @@ void do_abort(void)
run = 1;
if (!chrif->isconnected())
{
- if (pc_db->size(pc_db))
- ShowFatalError("Server has crashed without a connection to the char-server, %u characters can't be saved!\n", pc_db->size(pc_db));
+ if (db_size(map->pc_db))
+ ShowFatalError("Server has crashed without a connection to the char-server, %u characters can't be saved!\n", db_size(map->pc_db));
return;
}
ShowError("Server received crash signal! Attempting to save all online characters!\n");
- map->map_foreachpc(map_abort_sub);
+ map->foreachpc(map->abort_sub);
chrif->flush_fifo();
}
/*======================================================
* Map-Server Version Screen [MC Cameri]
*------------------------------------------------------*/
-static void map_helpscreen(bool do_exit)
+void map_helpscreen(bool do_exit)
{
ShowInfo("Usage: %s [options]\n", SERVER_NAME);
ShowInfo("\n");
@@ -5003,9 +5157,9 @@ static void map_helpscreen(bool do_exit)
}
/*======================================================
-* Map-Server Version Screen [MC Cameri]
-*------------------------------------------------------*/
-static void map_versionscreen(bool do_exit) {
+ * Map-Server Version Screen [MC Cameri]
+ *------------------------------------------------------*/
+void map_versionscreen(bool do_exit) {
const char *svn = get_svn_revision();
const char *git = get_git_hash();
ShowInfo(CL_WHITE"Hercules version: %s" CL_RESET"\n", git[0] != HERC_UNKNOWN_VER ? git : svn[0] != HERC_UNKNOWN_VER ? svn : "Unknown");
@@ -5040,7 +5194,7 @@ void do_shutdown(void)
}
}
-static bool map_arg_next_value(const char* option, int i, int argc)
+bool map_arg_next_value(const char* option, int i, int argc)
{
if( i >= argc-1 ) {
ShowWarning("Missing value for option '%s'.\n", option);
@@ -5064,15 +5218,15 @@ CPCMD(gm_position) {
return;
}
- if( x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) {
+ if( x < 0 || x >= map->list[m].xs || y < 0 || y >= map->list[m].ys ) {
ShowError("gm:info '"CL_WHITE"%d %d"CL_RESET"' is out of '"CL_WHITE"%s"CL_RESET"' map bounds!\n",x,y,map_name);
return;
}
ShowInfo("HCP: updated console's game position to '"CL_WHITE"%d %d %s"CL_RESET"'\n",x,y,map_name);
- cpsd->bl.x = x;
- cpsd->bl.y = y;
- cpsd->bl.m = m;
+ map->cpsd->bl.x = x;
+ map->cpsd->bl.y = y;
+ map->cpsd->bl.m = m;
}
CPCMD(gm_use) {
@@ -5080,23 +5234,23 @@ CPCMD(gm_use) {
ShowError("gm:use invalid syntax. use '"CL_WHITE"gm:use @command <optional params>"CL_RESET"'\n");
return;
}
- cpsd->fd = -2;
- if( !atcommand->parse(cpsd->fd, cpsd, line, 0) )
+ map->cpsd->fd = -2;
+ if( !atcommand->parse(map->cpsd->fd, map->cpsd, line, 0) )
ShowInfo("HCP: '"CL_WHITE"%s"CL_RESET"' failed\n",line);
else
ShowInfo("HCP: '"CL_WHITE"%s"CL_RESET"' was used\n",line);
- cpsd->fd = 0;
+ map->cpsd->fd = 0;
}
/* Hercules Console Parser */
void map_cp_defaults(void) {
#ifdef CONSOLE_INPUT
/* default HCP data */
- cpsd = pc->get_dummy_sd();
- strcpy(cpsd->status.name, "Hercules Console");
- cpsd->bl.x = MAP_DEFAULT_X;
- cpsd->bl.y = MAP_DEFAULT_Y;
- cpsd->bl.m = map->mapname2mapid(MAP_DEFAULT);
+ map->cpsd = pc->get_dummy_sd();
+ strcpy(map->cpsd->status.name, "Hercules Console");
+ map->cpsd->bl.x = MAP_DEFAULT_X;
+ map->cpsd->bl.y = MAP_DEFAULT_Y;
+ map->cpsd->bl.m = map->mapname2mapid(MAP_DEFAULT);
console->addCommand("gm:info",CPCMD_A(gm_position));
console->addCommand("gm:use",CPCMD_A(gm_use));
@@ -5119,6 +5273,7 @@ void map_hp_symbols(void) {
HPM->share(itemdb,"itemdb");
HPM->share(logs,"logs");
HPM->share(mail,"mail");
+ HPM->share(instance,"instance");
HPM->share(script,"script");
HPM->share(searchstore,"searchstore");
HPM->share(skill,"skill");
@@ -5146,7 +5301,7 @@ void map_hp_symbols(void) {
/* partial */
HPM->share(mapit,"mapit");
/* sql link */
- HPM->share(mmysql_handle,"sql_handle");
+ HPM->share(map->mysql_handle,"sql_handle");
/* specific */
HPM->share(atcommand->create,"addCommand");
HPM->share(script->addScript,"addScript");
@@ -5154,7 +5309,7 @@ void map_hp_symbols(void) {
HPM->share(HPM_map_getFromMSD,"getFromMSD");
HPM->share(HPM_map_removeFromMSD,"removeFromMSD");
/* vars */
- HPM->share(maplist,"maplist");
+ HPM->share(map->list,"map->list");
}
void map_load_defaults(void) {
@@ -5207,44 +5362,6 @@ int do_init(int argc, char *argv[])
map_defaults();
- map->map_num = 0;
-
- sprintf(map->db_path ,"db");
- sprintf(map->help_txt ,"conf/help.txt");
- sprintf(map->help2_txt ,"conf/help2.txt");
- sprintf(map->charhelp_txt ,"conf/charhelp.txt");
-
- sprintf(map->wisp_server_name ,"Server"); // can be modified in char-server configuration file
-
- map->autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
- map->minsave_interval = 100;
- map->save_settings = 0xFFFF;
- map->agit_flag = 0;
- map->agit2_flag = 0;
- map->night_flag = 0; // 0=day, 1=night [Yor]
- map->enable_spy = 0; //To enable/disable @spy commands, which consume too much cpu time when sending packets. [Skotlex]
-
- map->db_use_sql_item_db = 0;
- map->db_use_sql_mob_db = 0;
- map->db_use_sql_mob_skill_db = 0;
-
- sprintf(map->item_db_db, "item_db");
- sprintf(map->item_db2_db, "item_db2");
- sprintf(map->item_db_re_db, "item_db_re");
- sprintf(map->mob_db_db, "mob_db");
- sprintf(map->mob_db2_db, "mob_db2");
- sprintf(map->mob_skill_db_db, "mob_skill_db");
- sprintf(map->mob_skill_db2_db, "mob_skill_db2");
- sprintf(map->interreg_db, "interreg");
-
- map->INTER_CONF_NAME="conf/inter-server.conf";
- map->LOG_CONF_NAME="conf/logs.conf";
- map->MAP_CONF_NAME = "conf/map-server.conf";
- map->BATTLE_CONF_FILENAME = "conf/battle.conf";
- map->ATCOMMAND_CONF_FILENAME = "conf/atcommand.conf";
- map->SCRIPT_CONF_NAME = "conf/script.conf";
- map->MSG_CONF_NAME = "conf/messages.conf";
- map->GRF_PATH_FILENAME = "conf/grf-files.txt";
rnd_init();
for( i = 1; i < argc ; i++ ) {
@@ -5257,32 +5374,32 @@ int do_init(int argc, char *argv[])
arg++;
if( strcmp(arg, "help") == 0 ) {
- map_helpscreen(true);
+ map->helpscreen(true);
} else if( strcmp(arg, "version") == 0 ) {
- map_versionscreen(true);
+ map->versionscreen(true);
} else if( strcmp(arg, "map-config") == 0 ) {
- if( map_arg_next_value(arg, i, argc) )
+ if( map->arg_next_value(arg, i, argc) )
map->MAP_CONF_NAME = argv[++i];
} else if( strcmp(arg, "battle-config") == 0 ) {
- if( map_arg_next_value(arg, i, argc) )
+ if( map->arg_next_value(arg, i, argc) )
map->BATTLE_CONF_FILENAME = argv[++i];
} else if( strcmp(arg, "atcommand-config") == 0 ) {
- if( map_arg_next_value(arg, i, argc) )
+ if( map->arg_next_value(arg, i, argc) )
map->ATCOMMAND_CONF_FILENAME = argv[++i];
} else if( strcmp(arg, "script-config") == 0 ) {
- if( map_arg_next_value(arg, i, argc) )
+ if( map->arg_next_value(arg, i, argc) )
map->SCRIPT_CONF_NAME = argv[++i];
} else if( strcmp(arg, "msg-config") == 0 ) {
- if( map_arg_next_value(arg, i, argc) )
+ if( map->arg_next_value(arg, i, argc) )
map->MSG_CONF_NAME = argv[++i];
} else if( strcmp(arg, "grf-path-file") == 0 ) {
- if( map_arg_next_value(arg, i, argc) )
+ if( map->arg_next_value(arg, i, argc) )
map->GRF_PATH_FILENAME = argv[++i];
} else if( strcmp(arg, "inter-config") == 0 ) {
- if( map_arg_next_value(arg, i, argc) )
+ if( map->arg_next_value(arg, i, argc) )
map->INTER_CONF_NAME = argv[++i];
} else if( strcmp(arg, "log-config") == 0 ) {
- if( map_arg_next_value(arg, i, argc) )
+ if( map->arg_next_value(arg, i, argc) )
map->LOG_CONF_NAME = argv[++i];
} else if( strcmp(arg, "run-once") == 0 ) { // close the map-server as soon as its done.. for testing [Celest]
runflag = CORE_ST_STOP;
@@ -5290,32 +5407,33 @@ int do_init(int argc, char *argv[])
ShowError("Unknown option '%s'.\n", argv[i]);
exit(EXIT_FAILURE);
}
- } else switch( arg[0] ) {// short option
- case '?':
- case 'h':
- map_helpscreen(true);
- break;
- case 'v':
- map_versionscreen(true);
- break;
- default:
- ShowError("Unknown option '%s'.\n", argv[i]);
- exit(EXIT_FAILURE);
+ } else {
+ switch( arg[0] ) {// short option
+ case '?':
+ case 'h':
+ map->helpscreen(true);
+ break;
+ case 'v':
+ map->versionscreen(true);
+ break;
+ default:
+ ShowError("Unknown option '%s'.\n", argv[i]);
+ exit(EXIT_FAILURE);
+ }
}
}
- memset(&index2mapid, -1, sizeof(index2mapid));
map_load_defaults();
- map_config_read(map->MAP_CONF_NAME);
- CREATE(maplist,struct map_data,map->map_num);
- map->map_num = 0;
- map_config_read_sub(map->MAP_CONF_NAME);
+ map->config_read(map->MAP_CONF_NAME);
+ CREATE(map->list,struct map_data,map->count);
+ map->count = 0;
+ map->config_read_sub(map->MAP_CONF_NAME);
// loads npcs
map->reloadnpc(false);
chrif->checkdefaultlogin();
- if (!map_ip_set || !char_ip_set) {
+ if (!map->ip_set || !map->char_ip_set) {
char ip_str[16];
ip2str(addr_[0], ip_str);
@@ -5328,46 +5446,45 @@ int do_init(int argc, char *argv[])
ShowInfo("Defaulting to %s as our IP address\n", ip_str);
- if (!map_ip_set)
+ if (!map->ip_set)
clif->setip(ip_str);
- if (!char_ip_set)
+ if (!map->char_ip_set)
chrif->setip(ip_str);
}
battle->config_read(map->BATTLE_CONF_FILENAME);
atcommand->msg_read(map->MSG_CONF_NAME);
script->config_read(map->SCRIPT_CONF_NAME);
- inter_config_read(map->INTER_CONF_NAME);
+ map->inter_config_read(map->INTER_CONF_NAME);
logs->config_read(map->LOG_CONF_NAME);
- id_db = idb_alloc(DB_OPT_BASE);
- pc_db = idb_alloc(DB_OPT_BASE); //Added for reliable map->id2sd() use. [Skotlex]
- mobid_db = idb_alloc(DB_OPT_BASE); //Added to lower the load of the lazy mob ai. [Skotlex]
- bossid_db = idb_alloc(DB_OPT_BASE); // Used for Convex Mirror quick MVP search
- map_db = uidb_alloc(DB_OPT_BASE);
- nick_db = idb_alloc(DB_OPT_BASE);
- charid_db = idb_alloc(DB_OPT_BASE);
- regen_db = idb_alloc(DB_OPT_BASE); // efficient status_natural_heal processing
+ map->id_db = idb_alloc(DB_OPT_BASE);
+ map->pc_db = idb_alloc(DB_OPT_BASE); //Added for reliable map->id2sd() use. [Skotlex]
+ map->mobid_db = idb_alloc(DB_OPT_BASE); //Added to lower the load of the lazy mob ai. [Skotlex]
+ map->bossid_db = idb_alloc(DB_OPT_BASE); // Used for Convex Mirror quick MVP search
+ map->map_db = uidb_alloc(DB_OPT_BASE);
+ map->nick_db = idb_alloc(DB_OPT_BASE);
+ map->charid_db = idb_alloc(DB_OPT_BASE);
+ map->regen_db = idb_alloc(DB_OPT_BASE); // efficient status_natural_heal processing
+ 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);
- iwall_db = strdb_alloc(DB_OPT_RELEASE_DATA,2*NAME_LENGTH+2+1); // [Zephyrus] Invisible Walls
- 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_NONE);
-
- map_sql_init();
+ map->sql_init();
if (logs->config.sql_logs)
- log_sql_init();
+ logs->sql_init();
mapindex_init();
- if(enable_grf)
+ if(map->enable_grf)
grfio_init(map->GRF_PATH_FILENAME);
- map_readallmaps();
+ map->readallmaps();
- timer->add_func_list(map_freeblock_timer, "map_freeblock_timer");
- timer->add_func_list(map_clearflooritem_timer, "map_clearflooritem_timer");
- timer->add_func_list(map_removemobs_timer, "map_removemobs_timer");
- timer->add_interval(timer->gettick()+1000, map_freeblock_timer, 0, 0, 60*1000);
+ timer->add_func_list(map->freeblock_timer, "map_freeblock_timer");
+ timer->add_func_list(map->clearflooritem_timer, "map_clearflooritem_timer");
+ timer->add_func_list(map->removemobs_timer, "map_removemobs_timer");
+ timer->add_interval(timer->gettick()+1000, map->freeblock_timer, 0, 0, 60*1000);
HPM->load_sub = HPM_map_plugin_load_sub;
HPM->symbol_defaults_sub = map_hp_symbols;
@@ -5383,17 +5500,17 @@ int do_init(int argc, char *argv[])
script->init();
itemdb->init();
skill->init();
- read_map_zone_db();/* read after item and skill initalization */
+ map->read_zone_db();/* read after item and skill initalization */
mob->init();
- pc->do_init_pc();
+ pc->init();
status->init();
- party->do_init_party();
+ party->init();
guild->init();
- storage->init();
+ gstorage->init();
pet->init();
homun->init();
mercenary->init();
- elemental->do_init_elemental();
+ elemental->init();
quest->init();
npc->init();
unit->init();
@@ -5406,13 +5523,13 @@ int do_init(int argc, char *argv[])
if (battle_config.pk_mode)
ShowNotice("Server is running on '"CL_WHITE"PK Mode"CL_RESET"'.\n");
- Sql_HerculesUpdateCheck(mmysql_handle);
+ Sql_HerculesUpdateCheck(map->mysql_handle);
#ifdef CONSOLE_INPUT
- console->setSQL(mmysql_handle);
+ console->setSQL(map->mysql_handle);
#endif
- ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map_port);
+ ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map->port);
if( runflag != CORE_ST_STOP ) {
shutdown_callback = map->do_shutdown;
@@ -5434,6 +5551,89 @@ int do_init(int argc, char *argv[])
void map_defaults(void) {
map = &map_s;
+ /* */
+ map->count = 0;
+
+ sprintf(map->db_path ,"db");
+ sprintf(map->help_txt ,"conf/help.txt");
+ sprintf(map->help2_txt ,"conf/help2.txt");
+ sprintf(map->charhelp_txt ,"conf/charhelp.txt");
+
+ sprintf(map->wisp_server_name ,"Server"); // can be modified in char-server configuration file
+
+ map->autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
+ map->minsave_interval = 100;
+ map->save_settings = 0xFFFF;
+ map->agit_flag = 0;
+ map->agit2_flag = 0;
+ map->night_flag = 0; // 0=day, 1=night [Yor]
+ map->enable_spy = 0; //To enable/disable @spy commands, which consume too much cpu time when sending packets. [Skotlex]
+
+ map->db_use_sql_item_db = 0;
+ map->db_use_sql_mob_db = 0;
+ map->db_use_sql_mob_skill_db = 0;
+
+ sprintf(map->item_db_db, "item_db");
+ sprintf(map->item_db2_db, "item_db2");
+ sprintf(map->item_db_re_db, "item_db_re");
+ sprintf(map->mob_db_db, "mob_db");
+ sprintf(map->mob_db2_db, "mob_db2");
+ sprintf(map->mob_skill_db_db, "mob_skill_db");
+ sprintf(map->mob_skill_db2_db, "mob_skill_db2");
+ sprintf(map->interreg_db, "interreg");
+
+ map->INTER_CONF_NAME="conf/inter-server.conf";
+ map->LOG_CONF_NAME="conf/logs.conf";
+ map->MAP_CONF_NAME = "conf/map-server.conf";
+ map->BATTLE_CONF_FILENAME = "conf/battle.conf";
+ map->ATCOMMAND_CONF_FILENAME = "conf/atcommand.conf";
+ map->SCRIPT_CONF_NAME = "conf/script.conf";
+ map->MSG_CONF_NAME = "conf/messages.conf";
+ map->GRF_PATH_FILENAME = "conf/grf-files.txt";
+
+ map->default_codepage[0] = '\0';
+ map->server_port = 3306;
+ sprintf(map->server_ip,"127.0.0.1");
+ sprintf(map->server_id,"ragnarok");
+ sprintf(map->server_pw,"ragnarok");
+ sprintf(map->server_db,"ragnarok");
+ map->mysql_handle = NULL;
+
+ map->port = 0;
+ map->users = 0;
+ map->ip_set = 0;
+ map->char_ip_set = 0;
+ map->enable_grf = 0;
+
+ memset(&map->index2mapid, -1, sizeof(map->index2mapid));
+
+ map->id_db = NULL;
+ map->pc_db = NULL;
+ map->mobid_db = NULL;
+ map->bossid_db = NULL;
+ map->map_db = NULL;
+ map->nick_db = NULL;
+ map->charid_db = NULL;
+ map->regen_db = NULL;
+ map->zone_db = NULL;
+ map->iwall_db = NULL;
+
+ //all in a big chunk, respects order
+ memset(map->block_free,0,sizeof(map->block_free)
+ + sizeof(map->block_free_count)
+ + sizeof(map->block_free_lock)
+ + sizeof(map->bl_list)
+ + sizeof(map->bl_list_count)
+ + sizeof(map->bl_head)
+ + sizeof(map->zone_all)
+ + sizeof(map->zone_pk)
+ );
+
+ map->cpsd = NULL;
+ map->list = NULL;
+
+ map->iterator_ers = NULL;
+ map->cache_buffer = NULL;
/* funcs */
map->zone_init = map_zone_init;
map->zone_remove = map_zone_remove;
@@ -5479,21 +5679,36 @@ void map_defaults(void) {
map->charid2nick = map_charid2nick;
map->charid2sd = map_charid2sd;
- map->map_foreachpc = map_map_foreachpc;
- map->map_foreachmob = map_map_foreachmob;
- map->map_foreachnpc = map_map_foreachnpc;
- map->map_foreachregen = map_map_foreachregen;
- map->map_foreachiddb = map_map_foreachiddb;
-
+ map->vforeachpc = map_vforeachpc;
+ map->foreachpc = map_foreachpc;
+ map->vforeachmob = map_vforeachmob;
+ map->foreachmob = map_foreachmob;
+ map->vforeachnpc = map_vforeachnpc;
+ map->foreachnpc = map_foreachnpc;
+ map->vforeachregen = map_vforeachregen;
+ map->foreachregen = map_foreachregen;
+ map->vforeachiddb = map_vforeachiddb;
+ map->foreachiddb = map_foreachiddb;
+
+ map->vforeachinrange = map_vforeachinrange;
map->foreachinrange = map_foreachinrange;
+ map->vforeachinshootrange = map_vforeachinshootrange;
map->foreachinshootrange = map_foreachinshootrange;
+ map->vforeachinarea = map_vforeachinarea;
map->foreachinarea = map_foreachinarea;
+ map->vforcountinrange = map_vforcountinrange;
map->forcountinrange = map_forcountinrange;
+ map->vforcountinarea = map_vforcountinarea;
map->forcountinarea = map_forcountinarea;
+ map->vforeachinmovearea = map_vforeachinmovearea;
map->foreachinmovearea = map_foreachinmovearea;
+ map->vforeachincell = map_vforeachincell;
map->foreachincell = map_foreachincell;
+ map->vforeachinpath = map_vforeachinpath;
map->foreachinpath = map_foreachinpath;
+ map->vforeachinmap = map_vforeachinmap;
map->foreachinmap = map_foreachinmap;
+ map->vforeachininstance = map_vforeachininstance;
map->foreachininstance = map_foreachininstance;
map->id2sd = map_id2sd;
@@ -5541,7 +5756,55 @@ void map_defaults(void) {
map->do_shutdown = do_shutdown;
- /* FIXME: temporary until the map.c "Hercules Renewal Phase One" design is complete. [Ind] */
+ map->freeblock_timer = map_freeblock_timer;
+ map->searchrandfreecell = map_searchrandfreecell;
+ map->count_sub = map_count_sub;
+ map->create_charid2nick = create_charid2nick;
+ map->removemobs_sub = map_removemobs_sub;
+ map->gat2cell = map_gat2cell;
+ map->cell2gat = map_cell2gat;
+ map->getcellp = map_getcellp;
+ map->setcell = map_setcell;
+ map->sub_getcellp = map_sub_getcellp;
+ map->sub_setcell = map_sub_setcell;
+ map->iwall_nextxy = map_iwall_nextxy;
+ map->create_map_data_other_server = create_map_data_other_server;
+ map->eraseallipport_sub = map_eraseallipport_sub;
+ map->init_mapcache = map_init_mapcache;
+ map->readfromcache = map_readfromcache;
+ map->addmap = map_addmap;
+ map->delmapid = map_delmapid;
+ map->zone_db_clear = map_zone_db_clear;
+ map->list_final = do_final_maps;
+ map->waterheight = map_waterheight;
+ map->readgat = map_readgat;
+ map->readallmaps = map_readallmaps;
+ map->config_read = map_config_read;
+ map->config_read_sub = map_config_read_sub;
+ map->reloadnpc_sub = map_reloadnpc_sub;
+ map->inter_config_read = inter_config_read;
+ map->sql_init = map_sql_init;
+ map->sql_close = map_sql_close;
+ map->zone_mf_cache = map_zone_mf_cache;
+ map->zone_str2itemid = map_zone_str2itemid;
+ map->zone_str2skillid = map_zone_str2skillid;
+ map->zone_bl_type = map_zone_bl_type;
+ map->read_zone_db = read_map_zone_db;
+ map->db_final = map_db_final;
+ map->nick_db_final = nick_db_final;
+ map->cleanup_db_sub = cleanup_db_sub;
+ map->abort_sub = map_abort_sub;
+ map->helpscreen = map_helpscreen;
+ map->versionscreen = map_versionscreen;
+ map->arg_next_value = map_arg_next_value;
+
+ map->addblcell = map_addblcell;
+ map->delblcell = map_delblcell;
+
+ /**
+ * mapit interface
+ **/
+
mapit = &mapit_s;
mapit->alloc = mapit_alloc;
diff --git a/src/map/map.h b/src/map/map.h
index 4b06a065b..29c1dfecc 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -11,6 +11,7 @@
#include "../common/mapindex.h"
#include "../common/db.h"
#include "../config/core.h"
+#include "../common/sql.h"
#include "atcommand.h"
#include <stdarg.h>
@@ -40,6 +41,11 @@ enum E_MAPSERVER_ST {
#define MAX_VENDING 12
#define MAX_MAP_SIZE 512*512 // Wasn't there something like this already? Can't find it.. [Shinryo]
+#define BLOCK_SIZE 8
+#define block_free_max 1048576
+#define BL_LIST_MAX 1048576
+
+
// Added definitions for WoESE objects. [L0ne_W0lf]
enum MOBID {
MOBID_EMPERIUM = 1288,
@@ -67,10 +73,12 @@ enum MOBID {
#define JOBL_UPPER 0x1000 //4096
#define JOBL_BABY 0x2000 //8192
#define JOBL_THIRD 0x4000 //16384
+
// For filtering and quick checking.
#define MAPID_BASEMASK 0x00ff
#define MAPID_UPPERMASK 0x0fff
#define MAPID_THIRDMASK (JOBL_THIRD|MAPID_UPPERMASK)
+
//First Jobs
//Note the oddity of the novice:
//Super Novices are considered the 2-1 version of the novice! Novices are considered a first class type.
@@ -99,6 +107,7 @@ enum {
MAPID_BLACKSMITH,
MAPID_ASSASSIN,
MAPID_STAR_GLADIATOR,
+ MAPID_REBELLION = JOBL_2_1|0x09,
MAPID_KAGEROUOBORO = JOBL_2_1|0x0A,
MAPID_DEATH_KNIGHT = JOBL_2_1|0x0E,
//2-2 Jobs
@@ -214,13 +223,13 @@ enum {
#define EVENT_NAME_LENGTH ( NAME_LENGTH * 2 + 3 )
#define DEFAULT_AUTOSAVE_INTERVAL 5*60*1000
// Specifies maps where players may hit each other
-#define map_flag_vs(m) (maplist[m].flag.pvp || maplist[m].flag.gvg_dungeon || maplist[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && maplist[m].flag.gvg_castle) || maplist[m].flag.battleground)
+#define map_flag_vs(m) (map->list[m].flag.pvp || map->list[m].flag.gvg_dungeon || map->list[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) || map->list[m].flag.battleground)
// Specifies maps that have special GvG/WoE restrictions
-#define map_flag_gvg(m) (maplist[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && maplist[m].flag.gvg_castle))
+#define map_flag_gvg(m) (map->list[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle))
// Specifies if the map is tagged as GvG/WoE (regardless of map->agit_flag status)
-#define map_flag_gvg2(m) (maplist[m].flag.gvg || maplist[m].flag.gvg_castle)
+#define map_flag_gvg2(m) (map->list[m].flag.gvg || map->list[m].flag.gvg_castle)
// No Kill Steal Protection
-#define map_flag_ks(m) (maplist[m].flag.town || maplist[m].flag.pvp || maplist[m].flag.gvg || maplist[m].flag.battleground)
+#define map_flag_ks(m) (map->list[m].flag.town || map->list[m].flag.pvp || map->list[m].flag.gvg || map->list[m].flag.battleground)
//This stackable implementation does not means a BL can be more than one type at a time, but it's
// meant to make it easier to check for multiple types at a time on invocations such as map_foreach* calls [Skotlex]
@@ -459,19 +468,19 @@ typedef enum {
struct mapcell {
// terrain flags
unsigned char
-walkable : 1,
-shootable : 1,
-water : 1;
+ walkable : 1,
+ shootable : 1,
+ water : 1;
// dynamic flags
unsigned char
-npc : 1,
-basilica : 1,
-landprotector : 1,
-novending : 1,
-nochat : 1,
-maelstrom : 1,
-icewall : 1;
+ npc : 1,
+ basilica : 1,
+ landprotector : 1,
+ novending : 1,
+ nochat : 1,
+ maelstrom : 1,
+ icewall : 1;
#ifdef CELL_NOSTACK
unsigned char cell_bl; //Holds amount of bls in this cell.
@@ -524,9 +533,6 @@ struct map_zone_skill_damage_cap_entry {
#define MAP_ZONE_PK_NAME "PK Mode"
#define MAP_ZONE_MAPFLAG_LENGTH 50
-//TODO place it in the map interface
-DBMap *zone_db;/* string => struct map_zone_data */
-
struct map_zone_data {
char name[MAP_ZONE_NAME_LENGTH];/* 20'd */
struct map_zone_disabled_skill_entry **disabled_skills;
@@ -541,9 +547,6 @@ struct map_zone_data {
int capped_skills_count;
};
-struct map_zone_data map_zone_all;/* used as a base on all maps */
-struct map_zone_data map_zone_pk;/* used for (pk_mode) */
-
struct map_drop_list {
int drop_id;
int drop_type;
@@ -695,10 +698,7 @@ struct map_data_other_server {
uint16 port;
};
-
-struct map_data *maplist;
-
-#define map_id2index(id) maplist[(id)].index
+#define map_id2index(id) map->list[(id)].index
/// Bitfield of flags for the iterator.
enum e_mapitflags {
@@ -717,7 +717,7 @@ struct mapit_interface {
struct block_list* (*next) (struct s_mapiterator* iter);
struct block_list* (*prev) (struct s_mapiterator* iter);
bool (*exists) (struct s_mapiterator* iter);
-} mapit_s;
+};
struct mapit_interface *mapit;
@@ -742,11 +742,29 @@ typedef struct elemental_data TBL_ELEM;
#define BL_CAST(type_, bl) \
( ((bl) == (struct block_list*)NULL || (bl)->type != (type_)) ? (T ## type_ *)NULL : (T ## type_ *)(bl) )
-#include "../common/sql.h"
+struct charid_request {
+ struct charid_request* next;
+ int charid;// who want to be notified of the nick
+};
+struct charid2nick {
+ char nick[NAME_LENGTH];
+ struct charid_request* requests;// requests of notification on this nick
+};
+// This is the main header found at the very beginning of the map cache
+struct map_cache_main_header {
+ uint32 file_size;
+ uint16 map_count;
+};
+
+// This is the header appended before every compressed map cells info in the map cache
+struct map_cache_map_info {
+ char name[MAP_NAME_LENGTH];
+ int16 xs;
+ int16 ys;
+ int32 len;
+};
-extern Sql* mmysql_handle;
-extern Sql* logmysql_handle;
/*=====================================
* Interface : map.h
@@ -756,7 +774,7 @@ extern Sql* logmysql_handle;
struct map_interface {
/* vars */
- int map_num;
+ int count;
int autosave_interval;
int minsave_interval;
@@ -795,6 +813,47 @@ struct map_interface {
char mob_skill_db2_db[32];
char interreg_db[32];
+ char default_codepage[32];
+
+ int server_port;
+ char server_ip[32];
+ char server_id[32];
+ char server_pw[32];
+ char server_db[32];
+ Sql* mysql_handle;
+
+ int port;
+ int users;
+ int enable_grf; //To enable/disable reading maps from GRF files, bypassing mapcache [blackhole89]
+ int ip_set;
+ int char_ip_set;
+
+ int16 index2mapid[MAX_MAPINDEX];
+ /* */
+ DBMap* id_db; // int id -> struct block_list*
+ DBMap* pc_db; // int id -> struct map_session_data*
+ DBMap* mobid_db; // int id -> struct mob_data*
+ DBMap* bossid_db; // int id -> struct mob_data* (MVP db)
+ DBMap* map_db; // unsigned int mapindex -> struct map_data_other_server*
+ DBMap* nick_db; // int char_id -> struct charid2nick* (requested names of offline characters)
+ DBMap* charid_db; // int char_id -> struct map_session_data*
+ DBMap* regen_db; // int id -> struct block_list* (status_natural_heal processing)
+ DBMap* zone_db; // string => struct map_zone_data
+ DBMap* iwall_db;
+ /* order respected by map_defaults() in order to zero */
+ /* from block_free until zone_pk */
+ struct block_list *block_free[block_free_max];
+ int block_free_count, block_free_lock;
+ struct block_list *bl_list[BL_LIST_MAX];
+ int bl_list_count;
+ struct block_list bl_head;
+ struct map_zone_data zone_all;/* used as a base on all maps */
+ struct map_zone_data zone_pk;/* used for (pk_mode) */
+ struct map_session_data *cpsd;
+ struct map_data *list;
+ /* [Ind/Hercules] */
+ struct eri *iterator_ers;
+ char *cache_buffer; // Has the uncompressed gat data of all maps, so just one allocation has to be made
/* funcs */
void (*zone_init) (void);
void (*zone_remove) (int m);
@@ -817,17 +876,17 @@ struct map_interface {
// blocklist manipulation
int (*addblock) (struct block_list* bl);
int (*delblock) (struct block_list* bl);
- int (*moveblock) (struct block_list *, int, int, unsigned int);
+ int (*moveblock) (struct block_list *bl, int x1, int y1, unsigned int tick);
//blocklist nb in one cell
int (*count_oncell) (int16 m,int16 x,int16 y,int type);
- struct skill_unit * (*find_skill_unit_oncell) (struct block_list *,int16 x,int16 y,uint16 skill_id,struct skill_unit *, int flag);
+ struct skill_unit * (*find_skill_unit_oncell) (struct block_list* target,int16 x,int16 y,uint16 skill_id,struct skill_unit* out_unit, int flag);
// search and creation
int (*get_new_object_id) (void);
int (*search_freecell) (struct block_list *src, int16 m, int16 *x, int16 *y, int16 rx, int16 ry, int flag);
//
- int (*quit) (struct map_session_data *);
+ int (*quit) (struct map_session_data *sd);
// npc
- bool (*addnpc) (int16 m,struct npc_data *);
+ bool (*addnpc) (int16 m,struct npc_data *nd);
// map item
int (*clearflooritem_timer) (int tid, unsigned int tick, int id, intptr_t data);
int (*removemobs_timer) (int tid, unsigned int tick, int id, intptr_t data);
@@ -840,21 +899,36 @@ struct map_interface {
const char* (*charid2nick) (int charid);
struct map_session_data* (*charid2sd) (int charid);
- void (*map_foreachpc) (int (*func)(struct map_session_data* sd, va_list args), ...);
- void (*map_foreachmob) (int (*func)(struct mob_data* md, va_list args), ...);
- void (*map_foreachnpc) (int (*func)(struct npc_data* nd, va_list args), ...);
- void (*map_foreachregen) (int (*func)(struct block_list* bl, va_list args), ...);
- void (*map_foreachiddb) (int (*func)(struct block_list* bl, va_list args), ...);
-
+ void (*vforeachpc) (int (*func)(struct map_session_data* sd, va_list args), va_list args);
+ void (*foreachpc) (int (*func)(struct map_session_data* sd, va_list args), ...);
+ void (*vforeachmob) (int (*func)(struct mob_data* md, va_list args), va_list args);
+ void (*foreachmob) (int (*func)(struct mob_data* md, va_list args), ...);
+ void (*vforeachnpc) (int (*func)(struct npc_data* nd, va_list args), va_list args);
+ void (*foreachnpc) (int (*func)(struct npc_data* nd, va_list args), ...);
+ void (*vforeachregen) (int (*func)(struct block_list* bl, va_list args), va_list args);
+ void (*foreachregen) (int (*func)(struct block_list* bl, va_list args), ...);
+ void (*vforeachiddb) (int (*func)(struct block_list* bl, va_list args), va_list args);
+ void (*foreachiddb) (int (*func)(struct block_list* bl, va_list args), ...);
+
+ int (*vforeachinrange) (int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int type, va_list ap);
int (*foreachinrange) (int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int type, ...);
+ int (*vforeachinshootrange) (int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int type, va_list ap);
int (*foreachinshootrange) (int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int type, ...);
+ int (*vforeachinarea) (int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int type, va_list ap);
int (*foreachinarea) (int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int type, ...);
+ int (*vforcountinrange) (int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int count, int type, va_list ap);
int (*forcountinrange) (int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int count, int type, ...);
+ int (*vforcountinarea) (int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int count, int type, va_list ap);
int (*forcountinarea) (int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int count, int type, ...);
+ int (*vforeachinmovearea) (int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int16 dx, int16 dy, int type, va_list ap);
int (*foreachinmovearea) (int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int16 dx, int16 dy, int type, ...);
+ int (*vforeachincell) (int (*func)(struct block_list*,va_list), int16 m, int16 x, int16 y, int type, va_list ap);
int (*foreachincell) (int (*func)(struct block_list*,va_list), int16 m, int16 x, int16 y, int type, ...);
+ int (*vforeachinpath) (int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int16 range, int length, int type, va_list ap);
int (*foreachinpath) (int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int16 range, int length, int type, ...);
+ int (*vforeachinmap) (int (*func)(struct block_list*,va_list), int16 m, int type, va_list args);
int (*foreachinmap) (int (*func)(struct block_list*,va_list), int16 m, int type, ...);
+ int (*vforeachininstance)(int (*func)(struct block_list*,va_list), int16 instance_id, int type, va_list ap);
int (*foreachininstance)(int (*func)(struct block_list*,va_list), int16 instance_id, int type,...);
struct map_session_data * (*id2sd) (int id);
@@ -871,10 +945,10 @@ struct map_interface {
int (*setipport) (unsigned short mapindex, uint32 ip, uint16 port);
int (*eraseipport) (unsigned short mapindex, uint32 ip, uint16 port);
int (*eraseallipport) (void);
- void (*addiddb) (struct block_list *);
+ void (*addiddb) (struct block_list *bl);
void (*deliddb) (struct block_list *bl);
/* */
- struct map_session_data * (*nick2sd) (const char*);
+ struct map_session_data * (*nick2sd) (const char *nick);
struct mob_data * (*getmob_boss) (int16 m);
struct mob_data * (*id2boss) (int id);
// reload config file looking only for npcs
@@ -902,6 +976,50 @@ struct map_interface {
void (*clean) (int i);
void (*do_shutdown) (void);
+
+ int (*freeblock_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*searchrandfreecell) (int16 m, int16 *x, int16 *y, int stack);
+ int (*count_sub) (struct block_list *bl, va_list ap);
+ DBData (*create_charid2nick) (DBKey key, va_list args);
+ int (*removemobs_sub) (struct block_list *bl, va_list ap);
+ struct mapcell (*gat2cell) (int gat);
+ int (*cell2gat) (struct mapcell cell);
+ int (*getcellp) (struct map_data *m, int16 x, int16 y, cell_chk cellchk);
+ void (*setcell) (int16 m, int16 x, int16 y, cell_t cell, bool flag);
+ int (*sub_getcellp) (struct map_data *m, int16 x, int16 y, cell_chk cellchk);
+ void (*sub_setcell) (int16 m, int16 x, int16 y, cell_t cell, bool flag);
+ void (*iwall_nextxy) (int16 x, int16 y, int8 dir, int pos, int16 *x1, int16 *y1);
+ DBData (*create_map_data_other_server) (DBKey key, va_list args);
+ int (*eraseallipport_sub) (DBKey key, DBData *data, va_list va);
+ char* (*init_mapcache) (FILE *fp);
+ int (*readfromcache) (struct map_data *m, char *buffer);
+ int (*addmap) (char *mapname);
+ void (*delmapid) (int id);
+ void (*zone_db_clear) (void);
+ void (*list_final) (void);
+ int (*waterheight) (char *mapname);
+ int (*readgat) (struct map_data *m);
+ int (*readallmaps) (void);
+ int (*config_read) (char *cfgName);
+ int (*config_read_sub) (char *cfgName);
+ void (*reloadnpc_sub) (char *cfgName);
+ int (*inter_config_read) (char *cfgName);
+ int (*sql_init) (void);
+ int (*sql_close) (void);
+ bool (*zone_mf_cache) (int m, char *flag, char *params);
+ unsigned short (*zone_str2itemid) (const char *name);
+ unsigned short (*zone_str2skillid) (const char *name);
+ enum bl_type (*zone_bl_type) (const char *entry, enum map_zone_skill_subtype *subtype);
+ void (*read_zone_db) (void);
+ int (*db_final) (DBKey key, DBData *data, va_list ap);
+ int (*nick_db_final) (DBKey key, DBData *data, va_list args);
+ int (*cleanup_db_sub) (DBKey key, DBData *data, va_list va);
+ int (*abort_sub) (struct map_session_data *sd, va_list ap);
+ void (*helpscreen) (bool do_exit);
+ void (*versionscreen) (bool do_exit);
+ bool (*arg_next_value) (const char *option, int i, int argc);
+ void (*addblcell) (struct block_list *bl);
+ void (*delblcell) (struct block_list *bl);
};
struct map_interface *map;
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c
index 0a0b8f75f..902b7c39b 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -10,7 +10,7 @@
#include "../common/sql.h"
#include "../common/strlib.h"
#include "../common/timer.h"
-#include "map.h" // mmysql_handle
+#include "map.h" // map->mysql_handle
#include "script.h"
#include "mapreg.h"
#include <stdlib.h>
@@ -55,9 +55,9 @@ bool mapreg_setreg(int uid, int val) {
if(name[1] != '@') {// write new variable to database
char tmp_str[32*2+1];
- SQL->EscapeStringLen(mmysql_handle, tmp_str, name, strnlen(name, 32));
- if( SQL_ERROR == SQL->Query(mmysql_handle, "INSERT INTO `%s`(`varname`,`index`,`value`) VALUES ('%s','%d','%d')", mapreg->table, tmp_str, i, val) )
- Sql_ShowDebug(mmysql_handle);
+ SQL->EscapeStringLen(map->mysql_handle, tmp_str, name, strnlen(name, 32));
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "INSERT INTO `%s`(`varname`,`index`,`value`) VALUES ('%s','%d','%d')", mapreg->table, tmp_str, i, val) )
+ Sql_ShowDebug(map->mysql_handle);
}
idb_put(mapreg->db, uid, m);
}
@@ -68,8 +68,8 @@ bool mapreg_setreg(int uid, int val) {
idb_remove(mapreg->db,uid);
if( name[1] != '@' ) {// Remove from database because it is unused.
- if( SQL_ERROR == SQL->Query(mmysql_handle, "DELETE FROM `%s` WHERE `varname`='%s' AND `index`='%d'", mapreg->table, name, i) )
- Sql_ShowDebug(mmysql_handle);
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `%s` WHERE `varname`='%s' AND `index`='%d'", mapreg->table, name, i) )
+ Sql_ShowDebug(map->mysql_handle);
}
}
@@ -85,8 +85,8 @@ bool mapreg_setregstr(int uid, const char* str) {
if( str == NULL || *str == 0 ) {
if(name[1] != '@') {
- if( SQL_ERROR == SQL->Query(mmysql_handle, "DELETE FROM `%s` WHERE `varname`='%s' AND `index`='%d'", mapreg->table, name, i) )
- Sql_ShowDebug(mmysql_handle);
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `%s` WHERE `varname`='%s' AND `index`='%d'", mapreg->table, name, i) )
+ Sql_ShowDebug(map->mysql_handle);
}
if( (m = idb_get(mapreg->str_db,uid)) ) {
if( m->u.str != NULL )
@@ -113,10 +113,10 @@ bool mapreg_setregstr(int uid, const char* str) {
if(name[1] != '@') { //put returned null, so we must insert.
char tmp_str[32*2+1];
char tmp_str2[255*2+1];
- SQL->EscapeStringLen(mmysql_handle, tmp_str, name, strnlen(name, 32));
- SQL->EscapeStringLen(mmysql_handle, tmp_str2, str, strnlen(str, 255));
- if( SQL_ERROR == SQL->Query(mmysql_handle, "INSERT INTO `%s`(`varname`,`index`,`value`) VALUES ('%s','%d','%s')", mapreg->table, tmp_str, i, tmp_str2) )
- Sql_ShowDebug(mmysql_handle);
+ SQL->EscapeStringLen(map->mysql_handle, tmp_str, name, strnlen(name, 32));
+ SQL->EscapeStringLen(map->mysql_handle, tmp_str2, str, strnlen(str, 255));
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "INSERT INTO `%s`(`varname`,`index`,`value`) VALUES ('%s','%d','%s')", mapreg->table, tmp_str, i, tmp_str2) )
+ Sql_ShowDebug(map->mysql_handle);
}
idb_put(mapreg->str_db, uid, m);
}
@@ -133,7 +133,7 @@ void script_load_mapreg(void) {
| varname | index | value |
+-------------------------+
*/
- SqlStmt* stmt = SQL->StmtMalloc(mmysql_handle);
+ SqlStmt* stmt = SQL->StmtMalloc(map->mysql_handle);
char varname[32+1];
int index;
char value[255+1];
@@ -199,8 +199,8 @@ void script_save_mapreg(void) {
int i = (m->uid & 0xff000000) >> 24;
const char* name = script->get_str(num);
- if( SQL_ERROR == SQL->Query(mmysql_handle, "UPDATE `%s` SET `value`='%d' WHERE `varname`='%s' AND `index`='%d' LIMIT 1", mapreg->table, m->u.i, name, i) )
- Sql_ShowDebug(mmysql_handle);
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "UPDATE `%s` SET `value`='%d' WHERE `varname`='%s' AND `index`='%d' LIMIT 1", mapreg->table, m->u.i, name, i) )
+ Sql_ShowDebug(map->mysql_handle);
m->save = false;
}
}
@@ -217,9 +217,9 @@ void script_save_mapreg(void) {
const char* name = script->get_str(num);
char tmp_str2[2*255+1];
- SQL->EscapeStringLen(mmysql_handle, tmp_str2, m->u.str, safestrnlen(m->u.str, 255));
- if( SQL_ERROR == SQL->Query(mmysql_handle, "UPDATE `%s` SET `value`='%s' WHERE `varname`='%s' AND `index`='%d' LIMIT 1", mapreg->table, tmp_str2, name, i) )
- Sql_ShowDebug(mmysql_handle);
+ SQL->EscapeStringLen(map->mysql_handle, tmp_str2, m->u.str, safestrnlen(m->u.str, 255));
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "UPDATE `%s` SET `value`='%s' WHERE `varname`='%s' AND `index`='%d' LIMIT 1", mapreg->table, tmp_str2, name, i) )
+ Sql_ShowDebug(map->mysql_handle);
m->save = false;
}
}
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index a1e2986b2..8b8353f46 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -50,12 +50,12 @@ int merc_search_index(int class_)
bool merc_class(int class_)
{
- return (bool)(merc_search_index(class_) > -1);
+ return (bool)(mercenary->search_index(class_) > -1);
}
struct view_data * merc_get_viewdata(int class_)
{
- int i = merc_search_index(class_);
+ int i = mercenary->search_index(class_);
if( i < 0 )
return 0;
@@ -69,7 +69,7 @@ int merc_create(struct map_session_data *sd, int class_, unsigned int lifetime)
int i;
nullpo_retr(0,sd);
- if( (i = merc_search_index(class_)) < 0 )
+ if( (i = mercenary->search_index(class_)) < 0 )
return 0;
db = &mercenary->db[i];
@@ -217,7 +217,7 @@ int mercenary_save(struct mercenary_data *md)
return 1;
}
-static int merc_contract_end(int tid, unsigned int tick, int id, intptr_t data) {
+int merc_contract_end_timer(int tid, unsigned int tick, int id, intptr_t data) {
struct map_session_data *sd;
struct mercenary_data *md;
@@ -228,7 +228,7 @@ static int merc_contract_end(int tid, unsigned int tick, int id, intptr_t data)
if( md->contract_timer != tid )
{
- ShowError("merc_contract_end %d != %d.\n", md->contract_timer, tid);
+ ShowError("merc_contract_end_timer %d != %d.\n", md->contract_timer, tid);
return 0;
}
@@ -268,14 +268,14 @@ void merc_contract_stop(struct mercenary_data *md)
{
nullpo_retv(md);
if( md->contract_timer != INVALID_TIMER )
- timer->delete(md->contract_timer, merc_contract_end);
+ timer->delete(md->contract_timer, mercenary->contract_end_timer);
md->contract_timer = INVALID_TIMER;
}
void merc_contract_init(struct mercenary_data *md)
{
if( md->contract_timer == INVALID_TIMER )
- md->contract_timer = timer->add(timer->gettick() + md->mercenary.life_time, merc_contract_end, md->master->bl.id, 0);
+ md->contract_timer = timer->add(timer->gettick() + md->mercenary.life_time, mercenary->contract_end_timer, md->master->bl.id, 0);
md->regen.state.block = 0;
}
@@ -284,7 +284,7 @@ int merc_data_received(struct s_mercenary *merc, bool flag) {
struct map_session_data *sd;
struct mercenary_data *md;
struct s_mercenary_db *db;
- int i = merc_search_index(merc->class_);
+ int i = mercenary->search_index(merc->class_);
if( (sd = map->charid2sd(merc->char_id)) == NULL )
return 0;
@@ -372,7 +372,7 @@ int mercenary_kills(struct mercenary_data *md)
if( (md->mercenary.kill_count % 50) == 0 )
{
mercenary->set_faith(md, 1);
- mercenary_killbonus(md);
+ mercenary->killbonus(md);
}
if( md->master )
@@ -393,7 +393,7 @@ int mercenary_checkskill(struct mercenary_data *md, uint16 skill_id)
return 0;
}
-static bool read_mercenarydb_sub(char* str[], int columns, int current) {
+bool read_mercenarydb_sub(char* str[], int columns, int current) {
int ele;
struct s_mercenary_db *db;
struct status_data *mstatus;
@@ -448,12 +448,12 @@ static bool read_mercenarydb_sub(char* str[], int columns, int current) {
int read_mercenarydb(void) {
memset(mercenary->db,0,sizeof(mercenary->db));
- sv->readdb(map->db_path, "mercenary_db.txt", ',', 26, 26, MAX_MERCENARY_CLASS, &read_mercenarydb_sub);
+ sv->readdb(map->db_path, "mercenary_db.txt", ',', 26, 26, MAX_MERCENARY_CLASS, mercenary->read_db_sub);
return 0;
}
-static bool read_mercenary_skilldb_sub(char* str[], int columns, int current)
+bool read_mercenary_skilldb_sub(char* str[], int columns, int current)
{// <merc id>,<skill id>,<skill level>
struct s_mercenary_db *db;
int i, class_;
@@ -485,22 +485,18 @@ static bool read_mercenary_skilldb_sub(char* str[], int columns, int current)
}
int read_mercenary_skilldb(void) {
- sv->readdb(map->db_path, "mercenary_skill_db.txt", ',', 3, 3, -1, &read_mercenary_skilldb_sub);
+ sv->readdb(map->db_path, "mercenary_skill_db.txt", ',', 3, 3, -1, mercenary->read_skill_db_sub);
return 0;
}
-int do_init_mercenary(void)
-{
+void do_init_mercenary(void) {
mercenary->read_db();
mercenary->read_skilldb();
- //add_timer_func_list(mercenary_contract, "mercenary_contract");
- return 0;
+ timer->add_func_list(mercenary->contract_end_timer, "merc_contract_end_timer");
}
-int do_final_mercenary(void);
-
/*=====================================
* Default Functions : mercenary.h
* Generated by HerculesInterfaceMaker
@@ -539,5 +535,12 @@ void mercenary_defaults(void) {
mercenary->checkskill = mercenary_checkskill;
mercenary->read_db = read_mercenarydb;
- mercenary->read_skilldb = read_mercenary_skilldb;
+ mercenary->read_skilldb = read_mercenary_skilldb;
+
+ mercenary->killbonus = mercenary_killbonus;
+ mercenary->search_index = merc_search_index;
+
+ mercenary->contract_end_timer = merc_contract_end_timer;
+ mercenary->read_db_sub = read_mercenarydb_sub;
+ mercenary->read_skill_db_sub = read_mercenary_skilldb_sub;
}
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index b59a1c808..47f37ac66 100644
--- a/src/map/mercenary.h
+++ b/src/map/mercenary.h
@@ -1,5 +1,6 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#ifndef _MERCENARY_H_
#define _MERCENARY_H_
@@ -58,7 +59,7 @@ struct mercenary_interface {
/* funcs */
- int (*init) (void);
+ void (*init) (void);
bool (*class) (int class_);
struct view_data * (*get_viewdata) (int class_);
@@ -83,7 +84,14 @@ struct mercenary_interface {
int (*checkskill) (struct mercenary_data *md, uint16 skill_id);
int (*read_db) (void);
- int (*read_skilldb) (void);
+ int (*read_skilldb) (void);
+
+ int (*killbonus) (struct mercenary_data *md);
+ int (*search_index) (int class_);
+
+ int (*contract_end_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ bool (*read_db_sub) (char* str[], int columns, int current);
+ bool (*read_skill_db_sub) (char* str[], int columns, int current);
};
struct mercenary_interface *mercenary;
diff --git a/src/map/mob.c b/src/map/mob.c
index 8e956adc1..7023bcb9d 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -173,11 +173,11 @@ void mvptomb_destroy(struct mob_data *md) {
map->delblock(&nd->bl);
- ARR_FIND( 0, maplist[m].npc_num, i, maplist[m].npc[i] == nd );
- if( !(i == maplist[m].npc_num) ) {
- maplist[m].npc_num--;
- maplist[m].npc[i] = maplist[m].npc[maplist[m].npc_num];
- maplist[m].npc[maplist[m].npc_num] = NULL;
+ ARR_FIND( 0, map->list[m].npc_num, i, map->list[m].npc[i] == nd );
+ if( !(i == map->list[m].npc_num) ) {
+ map->list[m].npc_num--;
+ map->list[m].npc[i] = map->list[m].npc[map->list[m].npc_num];
+ map->list[m].npc[map->list[m].npc_num] = NULL;
}
map->deliddb(&nd->bl);
@@ -363,7 +363,7 @@ bool mob_ksprotected (struct block_list *src, struct block_list *target)
t_sd = BL_CAST(BL_PC,s_bl);
do {
- if( maplist[md->bl.m].flag.allowks || map_flag_ks(md->bl.m) )
+ if( map->list[md->bl.m].flag.allowks || map_flag_ks(md->bl.m) )
return false; // Ignores GVG, PVP and AllowKS map flags
if( md->db->mexp || md->master_id )
@@ -638,12 +638,12 @@ int mob_spawn_guardian(const char* mapname, short x, short y, const char* mobnam
if( !has_index ) {
guardian = -1;
} else if( guardian < 0 || guardian >= MAX_GUARDIANS ) {
- ShowError("mob_spawn_guardian: Invalid guardian index %d for guardian %d (castle map %s)\n", guardian, class_, maplist[m].name);
+ ShowError("mob_spawn_guardian: Invalid guardian index %d for guardian %d (castle map %s)\n", guardian, class_, map->list[m].name);
return 0;
}
if((x<=0 || y<=0) && !map->search_freecell(NULL, m, &x, &y, -1,-1, 1)) {
- ShowWarning("mob_spawn_guardian: Couldn't locate a spawn cell for guardian class %d (index %d) at castle map %s\n",class_, guardian, maplist[m].name);
+ ShowWarning("mob_spawn_guardian: Couldn't locate a spawn cell for guardian class %d (index %d) at castle map %s\n",class_, guardian, map->list[m].name);
return 0;
}
data.x = x;
@@ -653,13 +653,13 @@ int mob_spawn_guardian(const char* mapname, short x, short y, const char* mobnam
if (!mob->parse_dataset(&data))
return 0;
- gc=guild->mapname2gc(maplist[m].name);
+ gc=guild->mapname2gc(map->list[m].name);
if (gc == NULL) {
- ShowError("mob_spawn_guardian: No castle set at map %s\n", maplist[m].name);
+ ShowError("mob_spawn_guardian: No castle set at map %s\n", map->list[m].name);
return 0;
}
if (!gc->guild_id)
- ShowWarning("mob_spawn_guardian: Spawning guardian %d on a castle with no guild (castle map %s)\n", class_, maplist[m].name);
+ ShowWarning("mob_spawn_guardian: Spawning guardian %d on a castle with no guild (castle map %s)\n", class_, map->list[m].name);
else
g = guild->search(gc->guild_id);
@@ -670,7 +670,7 @@ int mob_spawn_guardian(const char* mapname, short x, short y, const char* mobnam
&& md2->guardian_data
&& md2->guardian_data->number == guardian
) {
- ShowError("mob_spawn_guardian: Attempted to spawn guardian in position %d which already has a guardian (castle map %s)\n", guardian, maplist[m].name);
+ ShowError("mob_spawn_guardian: Attempted to spawn guardian in position %d which already has a guardian (castle map %s)\n", guardian, map->list[m].name);
return 0;
}
}
@@ -732,7 +732,7 @@ int mob_spawn_bg(const char* mapname, short x, short y, const char* mobname, int
data.class_ = class_;
if( (x <= 0 || y <= 0) && !map->search_freecell(NULL, m, &x, &y, -1,-1, 1) ) {
- ShowWarning("mob_spawn_bg: Couldn't locate a spawn cell for guardian class %d (bg_id %d) at map %s\n",class_, bg_id, maplist[m].name);
+ ShowWarning("mob_spawn_bg: Couldn't locate a spawn cell for guardian class %d (bg_id %d) at map %s\n",class_, bg_id, map->list[m].name);
return 0;
}
@@ -963,7 +963,7 @@ int mob_spawn (struct mob_data *md)
mob->mvptomb_destroy(md);
map->addblock(&md->bl);
- if( maplist[md->bl.m].users )
+ if( map->list[md->bl.m].users )
clif->spawn(&md->bl);
skill->unit_move(&md->bl,tick,1);
mob->skill_use(md, tick, MSC_SPAWN);
@@ -1068,7 +1068,7 @@ int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
battle->check_range(&md->bl,bl,md->db->range2)
) { //Pick closest target?
- if( maplist[bl->m].icewall_num &&
+ if( map->list[bl->m].icewall_num &&
!path->search_long(NULL,bl->m,md->bl.x,md->bl.y,bl->x,bl->y,CELL_CHKICEWALL) ) {
if( !check_distance_bl(&md->bl, bl, status_get_range(&md->bl) ) )
@@ -1337,7 +1337,7 @@ int mob_randomwalk(struct mob_data *md,unsigned int tick)
if(i==retrycount){
md->move_fail_count++;
if(md->move_fail_count>1000){
- ShowWarning("MOB can't move. random spawn %d, class = %d, at %s (%d,%d)\n",md->bl.id,md->class_,maplist[md->bl.m].name, md->bl.x, md->bl.y);
+ ShowWarning("MOB can't move. random spawn %d, class = %d, at %s (%d,%d)\n",md->bl.id,md->class_,map->list[md->bl.m].name, md->bl.x, md->bl.y);
md->move_fail_count=0;
mob->spawn(md);
}
@@ -1683,7 +1683,7 @@ int mob_ai_sub_lazy(struct mob_data *md, va_list args)
tick = va_arg(args,unsigned int);
- if (battle_config.mob_ai&0x20 && maplist[md->bl.m].users>0)
+ if (battle_config.mob_ai&0x20 && map->list[md->bl.m].users>0)
return (int)mob->ai_sub_hard(md, tick);
if (md->bl.prev==NULL || md->status.hp == 0)
@@ -1720,7 +1720,7 @@ int mob_ai_sub_lazy(struct mob_data *md, va_list args)
}
if( DIFF_TICK(md->next_walktime,tick) < 0 && (status_get_mode(&md->bl)&MD_CANMOVE) && unit->can_move(&md->bl) ) {
- if( maplist[md->bl.m].users > 0 )
+ if( map->list[md->bl.m].users > 0 )
{
if( rnd()%1000 < MOB_LAZYMOVEPERC(md) )
mob->randomwalk(md, tick);
@@ -1741,7 +1741,7 @@ int mob_ai_sub_lazy(struct mob_data *md, va_list args)
* Negligent processing for mob outside PC field of view (interval timer function)
*------------------------------------------*/
int mob_ai_lazy(int tid, unsigned int tick, int id, intptr_t data) {
- map->map_foreachmob(mob->ai_sub_lazy,tick);
+ map->foreachmob(mob->ai_sub_lazy,tick);
return 0;
}
@@ -1751,9 +1751,9 @@ int mob_ai_lazy(int tid, unsigned int tick, int id, intptr_t data) {
int mob_ai_hard(int tid, unsigned int tick, int id, intptr_t data) {
if (battle_config.mob_ai&0x20)
- map->map_foreachmob(mob->ai_sub_lazy,tick);
+ map->foreachmob(mob->ai_sub_lazy,tick);
else
- map->map_foreachpc(mob->ai_sub_foreachclient,tick);
+ map->foreachpc(mob->ai_sub_foreachclient,tick);
return 0;
}
@@ -2145,9 +2145,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
}
if( !(type&2) //No exp
- && (!maplist[m].flag.pvp || battle_config.pvp_exp) //Pvp no exp rule [MouseJstr]
+ && (!map->list[m].flag.pvp || battle_config.pvp_exp) //Pvp no exp rule [MouseJstr]
&& (!md->master_id || !md->special_state.ai) //Only player-summoned mobs do not give exp. [Skotlex]
- && (!maplist[m].flag.nobaseexp || !maplist[m].flag.nojobexp) //Gives Exp
+ && (!map->list[m].flag.nobaseexp || !map->list[m].flag.nojobexp) //Gives Exp
) { //Experience calculation.
int bonus = 100; //Bonus on top of your share (common to all attackers).
if (md->sc.data[SC_RICHMANKIM])
@@ -2157,8 +2157,8 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
if(sd->sc.data[SC_MIRACLE]) i = 2; //All mobs are Star Targets
else
ARR_FIND(0, MAX_PC_FEELHATE, i, temp == sd->hate_mob[i] &&
- (battle_config.allow_skill_without_day || sg_info[i].day_func()));
- if(i<MAX_PC_FEELHATE && (temp=pc->checkskill(sd,sg_info[i].bless_id)))
+ (battle_config.allow_skill_without_day || pc->sg_info[i].day_func()));
+ if(i<MAX_PC_FEELHATE && (temp=pc->checkskill(sd,pc->sg_info[i].bless_id)))
bonus += (i==2?20:10)*temp;
}
if(battle_config.mobs_level_up && md->level > md->db->lv) // [Valaris]
@@ -2209,15 +2209,15 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
zeny*=rnd()%250;
}
- if (maplist[m].flag.nobaseexp || !md->db->base_exp)
+ if (map->list[m].flag.nobaseexp || !md->db->base_exp)
base_exp = 0;
else
- base_exp = (unsigned int)cap_value(md->db->base_exp * per * bonus/100. * maplist[m].bexp/100., 1, UINT_MAX);
+ base_exp = (unsigned int)cap_value(md->db->base_exp * per * bonus/100. * map->list[m].bexp/100., 1, UINT_MAX);
- if (maplist[m].flag.nojobexp || !md->db->job_exp || md->dmglog[i].flag == MDLF_HOMUN) //Homun earned job-exp is always lost.
+ if (map->list[m].flag.nojobexp || !md->db->job_exp || md->dmglog[i].flag == MDLF_HOMUN) //Homun earned job-exp is always lost.
job_exp = 0;
else
- job_exp = (unsigned int)cap_value(md->db->job_exp * per * bonus/100. * maplist[m].jexp/100., 1, UINT_MAX);
+ job_exp = (unsigned int)cap_value(md->db->job_exp * per * bonus/100. * map->list[m].jexp/100., 1, UINT_MAX);
if ( (temp = tmpsd[i]->status.party_id) > 0 ) {
int j;
@@ -2271,7 +2271,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
} //End EXP giving.
- if( !(type&1) && !maplist[m].flag.nomobloot && !md->state.rebirth && (
+ if( !(type&1) && !map->list[m].flag.nomobloot && !md->state.rebirth && (
!md->special_state.ai || //Non special mob
battle_config.alchemist_summon_reward == 2 || //All summoned give drops
(md->special_state.ai==2 && battle_config.alchemist_summon_reward == 1) //Marine Sphere Drops items.
@@ -2439,7 +2439,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
double exp;
//mapflag: noexp check [Lorky]
- if (maplist[m].flag.nobaseexp || type&2)
+ if (map->list[m].flag.nobaseexp || type&2)
exp =1;
else {
exp = md->db->mexp;
@@ -2454,7 +2454,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
pc->gainexp(mvp_sd, &md->bl, mexp,0, false);
log_mvp[1] = mexp;
- if( !(maplist[m].flag.nomvploot || type&1) ) {
+ if( !(map->list[m].flag.nomvploot || type&1) ) {
/* pose them randomly in the list -- so on 100% drop servers it wont always drop the same item */
int mdrop_id[MAX_MVP_DROP];
int mdrop_p[MAX_MVP_DROP];
@@ -2598,7 +2598,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
return 5; // Note: Actually, it's 4. Oh well...
// MvP tomb [GreenBox]
- if (battle_config.mvp_tomb_enabled && md->spawn->state.boss && maplist[md->bl.m].flag.notomb != 1)
+ if (battle_config.mvp_tomb_enabled && md->spawn->state.boss && map->list[md->bl.m].flag.notomb != 1)
mob->mvptomb_create(md, mvp_sd ? mvp_sd->status.name : NULL, time(NULL));
if( !rebirth ) {
@@ -2781,7 +2781,7 @@ int mob_warpslave_sub(struct block_list *bl,va_list ap) {
return 0;
map->search_freecell(master, 0, &x, &y, range, range, 0);
- unit->warp(&md->bl, master->m, x, y,CLR_RESPAWN);
+ unit->warp(&md->bl, master->m, x, y,CLR_TELEPORT);
return 1;
}
@@ -3348,18 +3348,18 @@ int mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, cons
//Go Backwards to give better priority to advanced skills.
for (i=0,j = MAX_SKILL_TREE-1;j>=0 && i< MAX_MOBSKILL ;j--) {
- int idx = skill_tree[pc->class2idx(sd->status.class_)][j].idx;
- skill_id = skill_tree[pc->class2idx(sd->status.class_)][j].id;
+ int idx = pc->skill_tree[pc->class2idx(sd->status.class_)][j].idx;
+ skill_id = pc->skill_tree[pc->class2idx(sd->status.class_)][j].id;
if (!skill_id || sd->status.skill[idx].lv < 1 ||
(skill->db[idx].inf2&(INF2_WEDDING_SKILL|INF2_GUILD_SKILL))
)
continue;
- for(h = 0; h < maplist[sd->bl.m].zone->disabled_skills_count; h++) {
- if( skill_id == maplist[sd->bl.m].zone->disabled_skills[h]->nameid && maplist[sd->bl.m].zone->disabled_skills[h]->subtype == MZS_CLONE ) {
+ for(h = 0; h < map->list[sd->bl.m].zone->disabled_skills_count; h++) {
+ if( skill_id == map->list[sd->bl.m].zone->disabled_skills[h]->nameid && map->list[sd->bl.m].zone->disabled_skills[h]->subtype == MZS_CLONE ) {
break;
}
}
- if( h < maplist[sd->bl.m].zone->disabled_skills_count )
+ if( h < map->list[sd->bl.m].zone->disabled_skills_count )
continue;
//Normal aggressive mob, disable skills that cannot help them fight
//against players (those with flags UF_NOMOB and UF_NOPC are specific
@@ -3890,13 +3890,13 @@ int mob_read_sqldb(void) {
uint32 lines = 0, count = 0;
// retrieve all rows from the mob database
- if( SQL_ERROR == SQL->Query(mmysql_handle, "SELECT * FROM `%s`", mob_db_name[fi]) ) {
- Sql_ShowDebug(mmysql_handle);
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "SELECT * FROM `%s`", mob_db_name[fi]) ) {
+ Sql_ShowDebug(map->mysql_handle);
continue;
}
// process rows one by one
- while( SQL_SUCCESS == SQL->NextRow(mmysql_handle) ) {
+ while( SQL_SUCCESS == SQL->NextRow(map->mysql_handle) ) {
// wrap the result into a TXT-compatible format
char line[1024];
char* str[31+2*MAX_MVP_DROP+2*MAX_MOB_DROP];
@@ -3908,7 +3908,7 @@ int mob_read_sqldb(void) {
{
char* data;
size_t len;
- SQL->GetData(mmysql_handle, i, &data, &len);
+ SQL->GetData(map->mysql_handle, i, &data, &len);
strcpy(p, data);
str[i] = p;
@@ -3922,7 +3922,7 @@ int mob_read_sqldb(void) {
}
// free the query result
- SQL->FreeResult(mmysql_handle);
+ SQL->FreeResult(map->mysql_handle);
ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, mob_db_name[fi]);
}
@@ -4454,13 +4454,13 @@ int mob_read_sqlskilldb(void) {
uint32 lines = 0, count = 0;
// retrieve all rows from the mob skill database
- if( SQL_ERROR == SQL->Query(mmysql_handle, "SELECT * FROM `%s`", mob_skill_db_name[fi]) ) {
- Sql_ShowDebug(mmysql_handle);
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "SELECT * FROM `%s`", mob_skill_db_name[fi]) ) {
+ Sql_ShowDebug(map->mysql_handle);
continue;
}
// process rows one by one
- while( SQL_SUCCESS == SQL->NextRow(mmysql_handle) ) {
+ while( SQL_SUCCESS == SQL->NextRow(map->mysql_handle) ) {
// wrap the result into a TXT-compatible format
char* str[19];
char* dummy = "";
@@ -4468,7 +4468,7 @@ int mob_read_sqlskilldb(void) {
++lines;
for( i = 0; i < 19; ++i )
{
- SQL->GetData(mmysql_handle, i, &str[i], NULL);
+ SQL->GetData(map->mysql_handle, i, &str[i], NULL);
if( str[i] == NULL ) str[i] = dummy; // get rid of NULL columns
}
@@ -4479,7 +4479,7 @@ int mob_read_sqlskilldb(void) {
}
// free the query result
- SQL->FreeResult(mmysql_handle);
+ SQL->FreeResult(map->mysql_handle);
ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, mob_skill_db_name[fi]);
}
diff --git a/src/map/mob.h b/src/map/mob.h
index f4cbd77c6..210983675 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -245,8 +245,8 @@ struct item_drop_list {
#define mob_stop_walking(md, type) unit->stop_walking(&(md)->bl, type)
#define mob_stop_attack(md) unit->stop_attack(&(md)->bl)
-#define mob_is_battleground(md) ( maplist[(md)->bl.m].flag.battleground && ((md)->class_ == MOBID_BARRICADE2 || ((md)->class_ >= MOBID_FOOD_STOR && (md)->class_ <= MOBID_PINK_CRYST)) )
-#define mob_is_gvg(md) (maplist[(md)->bl.m].flag.gvg_castle && ( (md)->class_ == MOBID_EMPERIUM || (md)->class_ == MOBID_BARRICADE1 || (md)->class_ == MOBID_GUARIDAN_STONE1 || (md)->class_ == MOBID_GUARIDAN_STONE2) )
+#define mob_is_battleground(md) ( map->list[(md)->bl.m].flag.battleground && ((md)->class_ == MOBID_BARRICADE2 || ((md)->class_ >= MOBID_FOOD_STOR && (md)->class_ <= MOBID_PINK_CRYST)) )
+#define mob_is_gvg(md) (map->list[(md)->bl.m].flag.gvg_castle && ( (md)->class_ == MOBID_EMPERIUM || (md)->class_ == MOBID_BARRICADE1 || (md)->class_ == MOBID_GUARIDAN_STONE1 || (md)->class_ == MOBID_GUARIDAN_STONE2) )
#define mob_is_treasure(md) (((md)->class_ >= MOBID_TREAS01 && (md)->class_ <= MOBID_TREAS40) || ((md)->class_ >= MOBID_TREAS41 && (md)->class_ <= MOBID_TREAS49))
struct mob_interface {
diff --git a/src/map/npc.c b/src/map/npc.c
index 21e4221da..c52dce325 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -212,11 +212,11 @@ struct npc_data* npc_name2id(const char* name)
/**
* For the Secure NPC Timeout option (check config/Secure.h) [RR]
**/
-#ifdef SECURE_NPCTIMEOUT
/**
* Timer to check for idle time and timeout the dialog if necessary
**/
int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t data) {
+#ifdef SECURE_NPCTIMEOUT
struct map_session_data* sd = NULL;
unsigned int timeout = NPC_SECURE_TIMEOUT_NEXT;
if( (sd = map->id2sd(id)) == NULL || !sd->npc_id ) {
@@ -251,9 +251,9 @@ int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t dat
sd->npc_idle_timer = INVALID_TIMER;
} else //Create a new instance of ourselves to continue
sd->npc_idle_timer = timer->add(timer->gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc->secure_timeout_timer,sd->bl.id,0);
+#endif
return 0;
}
-#endif
/*==========================================
* Dequeue event and add timer for execution (100ms)
@@ -881,53 +881,53 @@ int npc_touch_areanpc(struct map_session_data* sd, int16 m, int16 x, int16 y)
//if(sd->npc_id)
// return 1;
- for(i=0;i<maplist[m].npc_num;i++) {
- if (maplist[m].npc[i]->option&OPTION_INVISIBLE) {
+ for(i=0;i<map->list[m].npc_num;i++) {
+ if (map->list[m].npc[i]->option&OPTION_INVISIBLE) {
f=0; // a npc was found, but it is disabled; don't print warning
continue;
}
- switch(maplist[m].npc[i]->subtype) {
+ switch(map->list[m].npc[i]->subtype) {
case WARP:
- xs=maplist[m].npc[i]->u.warp.xs;
- ys=maplist[m].npc[i]->u.warp.ys;
+ xs=map->list[m].npc[i]->u.warp.xs;
+ ys=map->list[m].npc[i]->u.warp.ys;
break;
case SCRIPT:
- xs=maplist[m].npc[i]->u.scr.xs;
- ys=maplist[m].npc[i]->u.scr.ys;
+ xs=map->list[m].npc[i]->u.scr.xs;
+ ys=map->list[m].npc[i]->u.scr.ys;
break;
default:
continue;
}
- if( x >= maplist[m].npc[i]->bl.x-xs && x <= maplist[m].npc[i]->bl.x+xs
- && y >= maplist[m].npc[i]->bl.y-ys && y <= maplist[m].npc[i]->bl.y+ys )
+ if( x >= map->list[m].npc[i]->bl.x-xs && x <= map->list[m].npc[i]->bl.x+xs
+ && y >= map->list[m].npc[i]->bl.y-ys && y <= map->list[m].npc[i]->bl.y+ys )
break;
}
- if( i == maplist[m].npc_num ) {
+ if( i == map->list[m].npc_num ) {
if( f == 1 ) // no npc found
- ShowError("npc_touch_areanpc : stray NPC cell/NPC not found in the block on coordinates '%s',%d,%d\n", maplist[m].name, x, y);
+ ShowError("npc_touch_areanpc : stray NPC cell/NPC not found in the block on coordinates '%s',%d,%d\n", map->list[m].name, x, y);
return 1;
}
- switch(maplist[m].npc[i]->subtype) {
+ switch(map->list[m].npc[i]->subtype) {
case WARP:
if( pc_ishiding(sd) || (sd->sc.count && sd->sc.data[SC_CAMOUFLAGE]) )
break; // hidden chars cannot use warps
- pc->setpos(sd,maplist[m].npc[i]->u.warp.mapindex,maplist[m].npc[i]->u.warp.x,maplist[m].npc[i]->u.warp.y,CLR_OUTSIGHT);
+ pc->setpos(sd,map->list[m].npc[i]->u.warp.mapindex,map->list[m].npc[i]->u.warp.x,map->list[m].npc[i]->u.warp.y,CLR_OUTSIGHT);
break;
case SCRIPT:
- for (j = i; j < maplist[m].npc_num; j++) {
- if (maplist[m].npc[j]->subtype != WARP) {
+ for (j = i; j < map->list[m].npc_num; j++) {
+ if (map->list[m].npc[j]->subtype != WARP) {
continue;
}
- if ((sd->bl.x >= (maplist[m].npc[j]->bl.x - maplist[m].npc[j]->u.warp.xs)
- && sd->bl.x <= (maplist[m].npc[j]->bl.x + maplist[m].npc[j]->u.warp.xs))
- && (sd->bl.y >= (maplist[m].npc[j]->bl.y - maplist[m].npc[j]->u.warp.ys)
- && sd->bl.y <= (maplist[m].npc[j]->bl.y + maplist[m].npc[j]->u.warp.ys))
+ if ((sd->bl.x >= (map->list[m].npc[j]->bl.x - map->list[m].npc[j]->u.warp.xs)
+ && sd->bl.x <= (map->list[m].npc[j]->bl.x + map->list[m].npc[j]->u.warp.xs))
+ && (sd->bl.y >= (map->list[m].npc[j]->bl.y - map->list[m].npc[j]->u.warp.ys)
+ && sd->bl.y <= (map->list[m].npc[j]->bl.y + map->list[m].npc[j]->u.warp.ys))
) {
if( pc_ishiding(sd) || (sd->sc.count && sd->sc.data[SC_CAMOUFLAGE]) )
break; // hidden chars cannot use warps
- pc->setpos(sd,maplist[m].npc[j]->u.warp.mapindex,maplist[m].npc[j]->u.warp.x,maplist[m].npc[j]->u.warp.y,CLR_OUTSIGHT);
+ pc->setpos(sd,map->list[m].npc[j]->u.warp.mapindex,map->list[m].npc[j]->u.warp.x,map->list[m].npc[j]->u.warp.y,CLR_OUTSIGHT);
found_warp = 1;
break;
}
@@ -937,7 +937,7 @@ int npc_touch_areanpc(struct map_session_data* sd, int16 m, int16 x, int16 y)
break;
}
- if( npc->ontouch_event(sd,maplist[m].npc[i]) > 0 && npc->ontouch2_event(sd,maplist[m].npc[i]) > 0 )
+ if( npc->ontouch_event(sd,map->list[m].npc[i]) > 0 && npc->ontouch2_event(sd,map->list[m].npc[i]) > 0 )
{ // failed to run OnTouch event, so just click the npc
struct unit_data *ud = unit->bl2ud(&sd->bl);
if( ud && ud->walkpath.path_pos < ud->walkpath.path_len )
@@ -945,8 +945,8 @@ int npc_touch_areanpc(struct map_session_data* sd, int16 m, int16 x, int16 y)
clif->fixpos(&sd->bl);
ud->walkpath.path_pos = ud->walkpath.path_len;
}
- sd->areanpc_id = maplist[m].npc[i]->bl.id;
- npc->click(sd,maplist[m].npc[i]);
+ sd->areanpc_id = map->list[m].npc[i]->bl.id;
+ npc->click(sd,map->list[m].npc[i]);
}
break;
}
@@ -962,42 +962,42 @@ int npc_touch_areanpc2(struct mob_data *md)
struct event_data* ev;
int xs, ys;
- for( i = 0; i < maplist[m].npc_num; i++ ) {
- if( maplist[m].npc[i]->option&OPTION_INVISIBLE )
+ for( i = 0; i < map->list[m].npc_num; i++ ) {
+ if( map->list[m].npc[i]->option&OPTION_INVISIBLE )
continue;
- switch( maplist[m].npc[i]->subtype ) {
+ switch( map->list[m].npc[i]->subtype ) {
case WARP:
if( !( battle_config.mob_warp&1 ) )
continue;
- xs = maplist[m].npc[i]->u.warp.xs;
- ys = maplist[m].npc[i]->u.warp.ys;
+ xs = map->list[m].npc[i]->u.warp.xs;
+ ys = map->list[m].npc[i]->u.warp.ys;
break;
case SCRIPT:
- xs = maplist[m].npc[i]->u.scr.xs;
- ys = maplist[m].npc[i]->u.scr.ys;
+ xs = map->list[m].npc[i]->u.scr.xs;
+ ys = map->list[m].npc[i]->u.scr.ys;
break;
default:
continue; // Keep Searching
}
- if( x >= maplist[m].npc[i]->bl.x-xs && x <= maplist[m].npc[i]->bl.x+xs && y >= maplist[m].npc[i]->bl.y-ys && y <= maplist[m].npc[i]->bl.y+ys ) {
+ if( x >= map->list[m].npc[i]->bl.x-xs && x <= map->list[m].npc[i]->bl.x+xs && y >= map->list[m].npc[i]->bl.y-ys && y <= map->list[m].npc[i]->bl.y+ys ) {
// In the npc touch area
- switch( maplist[m].npc[i]->subtype ) {
+ switch( map->list[m].npc[i]->subtype ) {
case WARP:
- xs = map->mapindex2mapid(maplist[m].npc[i]->u.warp.mapindex);
+ xs = map->mapindex2mapid(map->list[m].npc[i]->u.warp.mapindex);
if( m < 0 )
break; // Cannot Warp between map servers
- if( unit->warp(&md->bl, xs, maplist[m].npc[i]->u.warp.x, maplist[m].npc[i]->u.warp.y, CLR_OUTSIGHT) == 0 )
+ if( unit->warp(&md->bl, xs, map->list[m].npc[i]->u.warp.x, map->list[m].npc[i]->u.warp.y, CLR_OUTSIGHT) == 0 )
return 1; // Warped
break;
case SCRIPT:
- if( maplist[m].npc[i]->bl.id == md->areanpc_id )
+ if( map->list[m].npc[i]->bl.id == md->areanpc_id )
break; // Already touch this NPC
- snprintf(eventname, ARRAYLENGTH(eventname), "%s::OnTouchNPC", maplist[m].npc[i]->exname);
+ snprintf(eventname, ARRAYLENGTH(eventname), "%s::OnTouchNPC", map->list[m].npc[i]->exname);
if( (ev = (struct event_data*)strdb_get(npc->ev_db, eventname)) == NULL || ev->nd == NULL )
break; // No OnTouchNPC Event
- md->areanpc_id = maplist[m].npc[i]->bl.id;
+ md->areanpc_id = map->list[m].npc[i]->bl.id;
id = md->bl.id; // Stores Unique ID
script->run(ev->nd->u.scr.script, ev->pos, md->bl.id, ev->nd->bl.id);
if( map->id2md(id) == NULL ) return 1; // Not Warped, but killed
@@ -1023,8 +1023,8 @@ int npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range) {
if (range < 0) return 0;
x0 = max(x-range, 0);
y0 = max(y-range, 0);
- x1 = min(x+range, maplist[m].xs-1);
- y1 = min(y+range, maplist[m].ys-1);
+ x1 = min(x+range, map->list[m].xs-1);
+ y1 = min(y+range, map->list[m].ys-1);
//First check for npc_cells on the range given
i = 0;
@@ -1037,35 +1037,35 @@ int npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range) {
if (!i) return 0; //No NPC_CELLs.
//Now check for the actual NPC on said range.
- for(i=0;i<maplist[m].npc_num;i++) {
- if (maplist[m].npc[i]->option&OPTION_INVISIBLE)
+ for(i=0;i<map->list[m].npc_num;i++) {
+ if (map->list[m].npc[i]->option&OPTION_INVISIBLE)
continue;
- switch(maplist[m].npc[i]->subtype) {
+ switch(map->list[m].npc[i]->subtype) {
case WARP:
if (!(flag&1))
continue;
- xs=maplist[m].npc[i]->u.warp.xs;
- ys=maplist[m].npc[i]->u.warp.ys;
+ xs=map->list[m].npc[i]->u.warp.xs;
+ ys=map->list[m].npc[i]->u.warp.ys;
break;
case SCRIPT:
if (!(flag&2))
continue;
- xs=maplist[m].npc[i]->u.scr.xs;
- ys=maplist[m].npc[i]->u.scr.ys;
+ xs=map->list[m].npc[i]->u.scr.xs;
+ ys=map->list[m].npc[i]->u.scr.ys;
break;
default:
continue;
}
- if( x1 >= maplist[m].npc[i]->bl.x-xs && x0 <= maplist[m].npc[i]->bl.x+xs
- && y1 >= maplist[m].npc[i]->bl.y-ys && y0 <= maplist[m].npc[i]->bl.y+ys )
+ if( x1 >= map->list[m].npc[i]->bl.x-xs && x0 <= map->list[m].npc[i]->bl.x+xs
+ && y1 >= map->list[m].npc[i]->bl.y-ys && y0 <= map->list[m].npc[i]->bl.y+ys )
break; // found a npc
}
- if (i==maplist[m].npc_num)
+ if (i==map->list[m].npc_num)
return 0;
- return (maplist[m].npc[i]->bl.id);
+ return (map->list[m].npc[i]->bl.id);
}
/*==========================================
@@ -1410,7 +1410,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
if( (double)nd->u.shop.shop_item[i].value * amount > INT_MAX ) {
ShowWarning("npc_cashshop_buy: Item '%s' (%d) price overflow attempt!\n", item->name, nameid);
ShowDebug("(NPC:'%s' (%s,%d,%d), player:'%s' (%d/%d), value:%d, amount:%d)\n",
- nd->exname, maplist[nd->bl.m].name, nd->bl.x, nd->bl.y,
+ nd->exname, map->list[nd->bl.m].name, nd->bl.x, nd->bl.y,
sd->status.name, sd->status.account_id, sd->status.char_id,
nd->u.shop.shop_item[i].value, amount);
return 5;
@@ -1707,13 +1707,13 @@ int npc_remove_map(struct npc_data* nd) {
clif->clearunit_area(&nd->bl,CLR_RESPAWN);
npc->unsetcells(nd);
map->delblock(&nd->bl);
- //Remove npc from maplist[].npc list. [Skotlex]
- ARR_FIND( 0, maplist[m].npc_num, i, maplist[m].npc[i] == nd );
- if( i == maplist[m].npc_num ) return 2; //failed to find it?
+ //Remove npc from map->list[].npc list. [Skotlex]
+ ARR_FIND( 0, map->list[m].npc_num, i, map->list[m].npc[i] == nd );
+ if( i == map->list[m].npc_num ) return 2; //failed to find it?
- maplist[m].npc_num--;
- maplist[m].npc[i] = maplist[m].npc[maplist[m].npc_num];
- maplist[m].npc[maplist[m].npc_num] = NULL;
+ map->list[m].npc_num--;
+ map->list[m].npc[i] = map->list[m].npc[map->list[m].npc_num];
+ map->list[m].npc[map->list[m].npc_num] = NULL;
return 0;
}
@@ -1759,7 +1759,7 @@ int npc_unload_dup_sub(struct npc_data* nd, va_list args)
//Removes all npcs that are duplicates of the passed one. [Skotlex]
void npc_unload_duplicates(struct npc_data* nd) {
- map->map_foreachnpc(npc->unload_dup_sub,nd->bl.id);
+ map->foreachnpc(npc->unload_dup_sub,nd->bl.id);
}
//Removes an npc from map and db.
@@ -2054,7 +2054,7 @@ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short
map->addblock(&nd->bl);
status->set_viewdata(&nd->bl, nd->class_);
nd->ud = &npc->base_ud;
- if( maplist[nd->bl.m].users )
+ if( map->list[nd->bl.m].users )
clif->spawn(&nd->bl);
strdb_put(npc->name_db, nd->exname, nd);
@@ -2086,8 +2086,8 @@ const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* s
return strchr(start,'\n');// skip and continue
}
- if( m != -1 && ( x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) ) {
- ShowError("npc_parse_warp: out-of-bounds coordinates (\"%s\",%d,%d), map is %dx%d, in file '%s', line '%d'\n", maplist[m].name, x, y, maplist[m].xs, maplist[m].ys,filepath,strline(buffer,start-buffer));
+ if( m != -1 && ( x < 0 || x >= map->list[m].xs || y < 0 || y >= map->list[m].ys ) ) {
+ ShowError("npc_parse_warp: out-of-bounds coordinates (\"%s\",%d,%d), map is %dx%d, in file '%s', line '%d'\n", map->list[m].name, x, y, map->list[m].xs, map->list[m].ys,filepath,strline(buffer,start-buffer));
return strchr(start,'\n');;//try next
}
@@ -2119,7 +2119,7 @@ const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* s
map->addblock(&nd->bl);
status->set_viewdata(&nd->bl, nd->class_);
nd->ud = &npc->base_ud;
- if( maplist[nd->bl.m].users )
+ if( map->list[nd->bl.m].users )
clif->spawn(&nd->bl);
strdb_put(npc->name_db, nd->exname, nd);
@@ -2152,8 +2152,8 @@ const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* s
m = map->mapname2mapid(mapname);
}
- if( m != -1 && ( x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) ) {
- ShowError("npc_parse_shop: out-of-bounds coordinates (\"%s\",%d,%d), map is %dx%d, in file '%s', line '%d'\n", maplist[m].name, x, y, maplist[m].xs, maplist[m].ys,filepath,strline(buffer,start-buffer));
+ if( m != -1 && ( x < 0 || x >= map->list[m].xs || y < 0 || y >= map->list[m].ys ) ) {
+ ShowError("npc_parse_shop: out-of-bounds coordinates (\"%s\",%d,%d), map is %dx%d, in file '%s', line '%d'\n", map->list[m].name, x, y, map->list[m].xs, map->list[m].ys,filepath,strline(buffer,start-buffer));
return strchr(start,'\n');;//try next
}
@@ -2232,7 +2232,7 @@ const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* s
status->set_viewdata(&nd->bl, nd->class_);
nd->ud = &npc->base_ud;
nd->dir = dir;
- if( maplist[nd->bl.m].users )
+ if( map->list[nd->bl.m].users )
clif->spawn(&nd->bl);
} else {// 'floating' shop?
map->addiddb(&nd->bl);
@@ -2419,7 +2419,7 @@ const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char*
map->addblock(&nd->bl);
if( class_ >= 0 ) {
status->set_viewdata(&nd->bl, nd->class_);
- if( maplist[nd->bl.m].users )
+ if( map->list[nd->bl.m].users )
clif->spawn(&nd->bl);
}
} else {
@@ -2509,8 +2509,8 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
m = map->mapname2mapid(mapname);
}
- if( m != -1 && ( x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) ) {
- ShowError("npc_parse_duplicate: out-of-bounds coordinates (\"%s\",%d,%d), map is %dx%d, in file '%s', line '%d'\n", maplist[m].name, x, y, maplist[m].xs, maplist[m].ys,filepath,strline(buffer,start-buffer));
+ if( m != -1 && ( x < 0 || x >= map->list[m].xs || y < 0 || y >= map->list[m].ys ) ) {
+ ShowError("npc_parse_duplicate: out-of-bounds coordinates (\"%s\",%d,%d), map is %dx%d, in file '%s', line '%d'\n", map->list[m].name, x, y, map->list[m].xs, map->list[m].ys,filepath,strline(buffer,start-buffer));
return end;//try next
}
@@ -2575,7 +2575,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
map->addblock(&nd->bl);
if( class_ >= 0 ) {
status->set_viewdata(&nd->bl, nd->class_);
- if( maplist[nd->bl.m].users )
+ if( map->list[nd->bl.m].users )
clif->spawn(&nd->bl);
}
} else {
@@ -2605,12 +2605,12 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
int npc_duplicate4instance(struct npc_data *snd, int16 m) {
char newname[NAME_LENGTH];
- if( m == -1 || maplist[m].instance_id == -1 )
+ if( m == -1 || map->list[m].instance_id == -1 )
return 1;
- snprintf(newname, ARRAYLENGTH(newname), "dup_%d_%d", maplist[m].instance_id, snd->bl.id);
+ snprintf(newname, ARRAYLENGTH(newname), "dup_%d_%d", map->list[m].instance_id, snd->bl.id);
if( npc->name2id(newname) != NULL ) { // Name already in use
- ShowError("npc_duplicate4instance: the npcname (%s) is already in use while trying to duplicate npc %s in instance %d.\n", newname, snd->exname, maplist[m].instance_id);
+ ShowError("npc_duplicate4instance: the npcname (%s) is already in use while trying to duplicate npc %s in instance %d.\n", newname, snd->exname, map->list[m].instance_id);
return 1;
}
@@ -2619,8 +2619,8 @@ int npc_duplicate4instance(struct npc_data *snd, int16 m) {
int dm = map->mapindex2mapid(snd->u.warp.mapindex), im;
if( dm < 0 ) return 1;
- if( ( im = instance->mapid2imapid(dm, maplist[m].instance_id) ) == -1 ) {
- ShowError("npc_duplicate4instance: warp (%s) leading to instanced map (%s), but instance map is not attached to current instance.\n", maplist[dm].name, snd->exname);
+ if( ( im = instance->mapid2imapid(dm, map->list[m].instance_id) ) == -1 ) {
+ ShowError("npc_duplicate4instance: warp (%s) leading to instanced map (%s), but instance map is not attached to current instance.\n", map->list[dm].name, snd->exname);
return 1;
}
@@ -2646,14 +2646,14 @@ int npc_duplicate4instance(struct npc_data *snd, int16 m) {
map->addblock(&wnd->bl);
status->set_viewdata(&wnd->bl, wnd->class_);
wnd->ud = &npc->base_ud;
- if( maplist[wnd->bl.m].users )
+ if( map->list[wnd->bl.m].users )
clif->spawn(&wnd->bl);
strdb_put(npc->name_db, wnd->exname, wnd);
} else {
static char w1[50], w2[50], w3[50], w4[50];
const char* stat_buf = "- call from instancing subsystem -\n";
- snprintf(w1, sizeof(w1), "%s,%d,%d,%d", maplist[m].name, snd->bl.x, snd->bl.y, snd->dir);
+ snprintf(w1, sizeof(w1), "%s,%d,%d,%d", map->list[m].name, snd->bl.x, snd->bl.y, snd->dir);
snprintf(w2, sizeof(w2), "duplicate(%s)", snd->exname);
snprintf(w3, sizeof(w3), "%s::%s", snd->name, newname);
@@ -2686,14 +2686,14 @@ void npc_setcells(struct npc_data* nd) {
return; // Other types doesn't have touch area
}
- if (m < 0 || xs < 0 || ys < 0 || maplist[m].cell == (struct mapcell *)0xdeadbeaf) //invalid range or map
+ if (m < 0 || xs < 0 || ys < 0 || map->list[m].cell == (struct mapcell *)0xdeadbeaf) //invalid range or map
return;
for (i = y-ys; i <= y+ys; i++) {
for (j = x-xs; j <= x+xs; j++) {
if (map->getcell(m, j, i, CELL_CHKNOPASS))
continue;
- maplist[m].setcell(m, j, i, CELL_NPC, true);
+ map->list[m].setcell(m, j, i, CELL_NPC, true);
}
}
}
@@ -2718,20 +2718,20 @@ void npc_unsetcells(struct npc_data* nd) {
ys = nd->u.scr.ys;
}
- if (m < 0 || xs < 0 || ys < 0 || maplist[m].cell == (struct mapcell *)0xdeadbeaf)
+ if (m < 0 || xs < 0 || ys < 0 || map->list[m].cell == (struct mapcell *)0xdeadbeaf)
return;
//Locate max range on which we can locate npc cells
//FIXME: does this really do what it's supposed to do? [ultramage]
for(x0 = x-xs; x0 > 0 && map->getcell(m, x0, y, CELL_CHKNPC); x0--);
- for(x1 = x+xs; x1 < maplist[m].xs-1 && map->getcell(m, x1, y, CELL_CHKNPC); x1++);
+ for(x1 = x+xs; x1 < map->list[m].xs-1 && map->getcell(m, x1, y, CELL_CHKNPC); x1++);
for(y0 = y-ys; y0 > 0 && map->getcell(m, x, y0, CELL_CHKNPC); y0--);
- for(y1 = y+ys; y1 < maplist[m].ys-1 && map->getcell(m, x, y1, CELL_CHKNPC); y1++);
+ for(y1 = y+ys; y1 < map->list[m].ys-1 && map->getcell(m, x, y1, CELL_CHKNPC); y1++);
//Erase this npc's cells
for (i = y-ys; i <= y+ys; i++)
for (j = x-xs; j <= x+xs; j++)
- maplist[m].setcell(m, j, i, CELL_NPC, false);
+ map->list[m].setcell(m, j, i, CELL_NPC, false);
//Re-deploy NPC cells for other nearby npcs.
map->foreachinarea( npc->unsetcells_sub, m, x0, y0, x1, y1, BL_NPC, nd->bl.id );
@@ -2742,8 +2742,8 @@ void npc_movenpc(struct npc_data* nd, int16 x, int16 y)
const int16 m = nd->bl.m;
if (m < 0 || nd->bl.prev == NULL) return; //Not on a map.
- x = cap_value(x, 0, maplist[m].xs-1);
- y = cap_value(y, 0, maplist[m].ys-1);
+ x = cap_value(x, 0, map->list[m].xs-1);
+ y = cap_value(y, 0, map->list[m].ys-1);
map->foreachinrange(clif->outsight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl);
map->moveblock(&nd->bl, x, y, timer->gettick());
@@ -2759,7 +2759,7 @@ void npc_setdisplayname(struct npc_data* nd, const char* newname)
nullpo_retv(nd);
safestrncpy(nd->name, newname, sizeof(nd->name));
- if( maplist[nd->bl.m].users )
+ if( map->list[nd->bl.m].users )
clif->charnameack(0, &nd->bl);
}
@@ -2773,11 +2773,11 @@ void npc_setclass(struct npc_data* nd, short class_) {
if( nd->class_ == class_ )
return;
- if( maplist[nd->bl.m].users )
+ if( map->list[nd->bl.m].users )
clif->clearunit_area(&nd->bl, CLR_OUTSIGHT);// fade out
nd->class_ = class_;
status->set_viewdata(&nd->bl, class_);
- if( maplist[nd->bl.m].users )
+ if( map->list[nd->bl.m].users )
clif->spawn(&nd->bl);// fade in
}
@@ -2931,8 +2931,8 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st
return strchr(start,'\n');// skip and continue
mobspawn.m = (unsigned short)m;
- if( x < 0 || x >= maplist[mobspawn.m].xs || y < 0 || y >= maplist[mobspawn.m].ys ) {
- ShowError("npc_parse_mob: Spawn coordinates out of range: %s (%d,%d), map size is (%d,%d) - %s %s (file '%s', line '%d').\n", maplist[mobspawn.m].name, x, y, (maplist[mobspawn.m].xs-1), (maplist[mobspawn.m].ys-1), w1, w3, filepath, strline(buffer,start-buffer));
+ if( x < 0 || x >= map->list[mobspawn.m].xs || y < 0 || y >= map->list[mobspawn.m].ys ) {
+ ShowError("npc_parse_mob: Spawn coordinates out of range: %s (%d,%d), map size is (%d,%d) - %s %s (file '%s', line '%d').\n", map->list[mobspawn.m].name, x, y, (map->list[mobspawn.m].xs-1), (map->list[mobspawn.m].ys-1), w1, w3, filepath, strline(buffer,start-buffer));
return strchr(start,'\n');// skip and continue
}
@@ -3044,7 +3044,7 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st
// check if target map has players
// (usually shouldn't occur when map server is just starting,
// but not the case when we do @reloadscript
- if( maplist[data->m].users > 0 ) {
+ if( map->list[data->m].users > 0 ) {
npc->parse_mob2(data);
}
} else {
@@ -3088,68 +3088,68 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
if (state == 0)
; //Map flag disabled.
else if (!strcmpi(w4, "SavePoint")) {
- maplist[m].save.map = 0;
- maplist[m].save.x = -1;
- maplist[m].save.y = -1;
+ 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) {
- maplist[m].save.map = mapindex_name2id(savemap);
- maplist[m].save.x = savex;
- maplist[m].save.y = savey;
- if (!maplist[m].save.map) {
+ 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) {
ShowWarning("npc_parse_mapflag: Specified save point map '%s' for mapflag 'nosave' not found (file '%s', line '%d'), using 'SavePoint'.\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", savemap, filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
- maplist[m].save.x = -1;
- maplist[m].save.y = -1;
+ map->list[m].save.x = -1;
+ map->list[m].save.y = -1;
}
}
- maplist[m].flag.nosave = state;
+ map->list[m].flag.nosave = state;
}
else if (!strcmpi(w3,"autotrade"))
- maplist[m].flag.autotrade=state;
+ map->list[m].flag.autotrade=state;
else if (!strcmpi(w3,"allowks"))
- maplist[m].flag.allowks=state; // [Kill Steal Protection]
+ map->list[m].flag.allowks=state; // [Kill Steal Protection]
else if (!strcmpi(w3,"town"))
- maplist[m].flag.town=state;
+ map->list[m].flag.town=state;
else if (!strcmpi(w3,"nomemo"))
- maplist[m].flag.nomemo=state;
+ map->list[m].flag.nomemo=state;
else if (!strcmpi(w3,"noteleport"))
- maplist[m].flag.noteleport=state;
+ map->list[m].flag.noteleport=state;
else if (!strcmpi(w3,"nowarp"))
- maplist[m].flag.nowarp=state;
+ map->list[m].flag.nowarp=state;
else if (!strcmpi(w3,"nowarpto"))
- maplist[m].flag.nowarpto=state;
+ map->list[m].flag.nowarpto=state;
else if (!strcmpi(w3,"noreturn"))
- maplist[m].flag.noreturn=state;
+ map->list[m].flag.noreturn=state;
else if (!strcmpi(w3,"monster_noteleport"))
- maplist[m].flag.monster_noteleport=state;
+ map->list[m].flag.monster_noteleport=state;
else if (!strcmpi(w3,"nobranch"))
- maplist[m].flag.nobranch=state;
+ map->list[m].flag.nobranch=state;
else if (!strcmpi(w3,"nopenalty")) {
- maplist[m].flag.noexppenalty=state;
- maplist[m].flag.nozenypenalty=state;
+ map->list[m].flag.noexppenalty=state;
+ map->list[m].flag.nozenypenalty=state;
}
else if (!strcmpi(w3,"pvp")) {
struct map_zone_data *zone;
- maplist[m].flag.pvp = state;
- if( state && (maplist[m].flag.gvg || maplist[m].flag.gvg_dungeon || maplist[m].flag.gvg_castle) ) {
- maplist[m].flag.gvg = 0;
- maplist[m].flag.gvg_dungeon = 0;
- maplist[m].flag.gvg_castle = 0;
- ShowWarning("npc_parse_mapflag: You can't set PvP and GvG flags for the same map! Removing GvG flags from %s (file '%s', line '%d').\n", maplist[m].name, filepath, strline(buffer,start-buffer));
- }
- if( state && maplist[m].flag.battleground ) {
- maplist[m].flag.battleground = 0;
- ShowWarning("npc_parse_mapflag: You can't set PvP and BattleGround flags for the same map! Removing BattleGround flag from %s (file '%s', line '%d').\n", maplist[m].name, filepath, strline(buffer,start-buffer));
- }
- if( state && (zone = strdb_get(zone_db, MAP_ZONE_PVP_NAME)) && maplist[m].zone != zone ) {
+ map->list[m].flag.pvp = state;
+ if( state && (map->list[m].flag.gvg || map->list[m].flag.gvg_dungeon || map->list[m].flag.gvg_castle) ) {
+ map->list[m].flag.gvg = 0;
+ map->list[m].flag.gvg_dungeon = 0;
+ map->list[m].flag.gvg_castle = 0;
+ ShowWarning("npc_parse_mapflag: You can't set PvP and GvG flags for the same map! Removing GvG flags from %s (file '%s', line '%d').\n", map->list[m].name, filepath, strline(buffer,start-buffer));
+ }
+ if( state && map->list[m].flag.battleground ) {
+ map->list[m].flag.battleground = 0;
+ ShowWarning("npc_parse_mapflag: You can't set PvP and BattleGround flags for the same map! Removing BattleGround flag from %s (file '%s', line '%d').\n", map->list[m].name, filepath, strline(buffer,start-buffer));
+ }
+ if( state && (zone = strdb_get(map->zone_db, MAP_ZONE_PVP_NAME)) && map->list[m].zone != zone ) {
map->zone_change(m,zone,start,buffer,filepath);
} else if ( !state ) {
- maplist[m].zone = &map_zone_pk;
+ map->list[m].zone = &map->zone_pk;
}
}
else if (!strcmpi(w3,"pvp_noparty"))
- maplist[m].flag.pvp_noparty=state;
+ map->list[m].flag.pvp_noparty=state;
else if (!strcmpi(w3,"pvp_noguild"))
- maplist[m].flag.pvp_noguild=state;
+ map->list[m].flag.pvp_noguild=state;
else if (!strcmpi(w3, "pvp_nightmaredrop")) {
char drop_arg1[16], drop_arg2[16];
int drop_per = 0;
@@ -3167,145 +3167,145 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
drop_type = 3;
if (drop_id != 0) {
- RECREATE(maplist[m].drop_list, struct map_drop_list, ++maplist[m].drop_list_count);
- maplist[m].drop_list[maplist[m].drop_list_count-1].drop_id = drop_id;
- maplist[m].drop_list[maplist[m].drop_list_count-1].drop_type = drop_type;
- maplist[m].drop_list[maplist[m].drop_list_count-1].drop_per = drop_per;
- maplist[m].flag.pvp_nightmaredrop = 1;
+ RECREATE(map->list[m].drop_list, struct map_drop_list, ++map->list[m].drop_list_count);
+ map->list[m].drop_list[map->list[m].drop_list_count-1].drop_id = drop_id;
+ map->list[m].drop_list[map->list[m].drop_list_count-1].drop_type = drop_type;
+ map->list[m].drop_list[map->list[m].drop_list_count-1].drop_per = drop_per;
+ map->list[m].flag.pvp_nightmaredrop = 1;
}
} else if (!state) //Disable
- maplist[m].flag.pvp_nightmaredrop = 0;
+ map->list[m].flag.pvp_nightmaredrop = 0;
}
else if (!strcmpi(w3,"pvp_nocalcrank"))
- maplist[m].flag.pvp_nocalcrank=state;
+ map->list[m].flag.pvp_nocalcrank=state;
else if (!strcmpi(w3,"gvg")) {
struct map_zone_data *zone;
- maplist[m].flag.gvg = state;
- if( state && maplist[m].flag.pvp ) {
- maplist[m].flag.pvp = 0;
- ShowWarning("npc_parse_mapflag: You can't set PvP and GvG flags for the same map! Removing PvP flag from %s (file '%s', line '%d').\n", maplist[m].name, filepath, strline(buffer,start-buffer));
+ map->list[m].flag.gvg = state;
+ if( state && map->list[m].flag.pvp ) {
+ map->list[m].flag.pvp = 0;
+ ShowWarning("npc_parse_mapflag: You can't set PvP and GvG flags for the same map! Removing PvP flag from %s (file '%s', line '%d').\n", map->list[m].name, filepath, strline(buffer,start-buffer));
}
- if( state && maplist[m].flag.battleground ) {
- maplist[m].flag.battleground = 0;
- ShowWarning("npc_parse_mapflag: You can't set GvG and BattleGround flags for the same map! Removing BattleGround flag from %s (file '%s', line '%d').\n", maplist[m].name, filepath, strline(buffer,start-buffer));
+ if( state && map->list[m].flag.battleground ) {
+ map->list[m].flag.battleground = 0;
+ ShowWarning("npc_parse_mapflag: You can't set GvG and BattleGround flags for the same map! Removing BattleGround flag from %s (file '%s', line '%d').\n", map->list[m].name, filepath, strline(buffer,start-buffer));
}
- if( state && (zone = strdb_get(zone_db, MAP_ZONE_GVG_NAME)) && maplist[m].zone != zone ) {
+ if( state && (zone = strdb_get(map->zone_db, MAP_ZONE_GVG_NAME)) && map->list[m].zone != zone ) {
map->zone_change(m,zone,start,buffer,filepath);
}
}
else if (!strcmpi(w3,"gvg_noparty"))
- maplist[m].flag.gvg_noparty=state;
+ map->list[m].flag.gvg_noparty=state;
else if (!strcmpi(w3,"gvg_dungeon")) {
- maplist[m].flag.gvg_dungeon=state;
- if (state) maplist[m].flag.pvp=0;
+ map->list[m].flag.gvg_dungeon=state;
+ if (state) map->list[m].flag.pvp=0;
}
else if (!strcmpi(w3,"gvg_castle")) {
- maplist[m].flag.gvg_castle=state;
- if (state) maplist[m].flag.pvp=0;
+ map->list[m].flag.gvg_castle=state;
+ if (state) map->list[m].flag.pvp=0;
}
else if (!strcmpi(w3,"battleground")) {
struct map_zone_data *zone;
if( state ) {
if( sscanf(w4, "%d", &state) == 1 )
- maplist[m].flag.battleground = state;
+ map->list[m].flag.battleground = state;
else
- maplist[m].flag.battleground = 1; // Default value
+ map->list[m].flag.battleground = 1; // Default value
} else
- maplist[m].flag.battleground = 0;
+ map->list[m].flag.battleground = 0;
- if( maplist[m].flag.battleground && maplist[m].flag.pvp ) {
- maplist[m].flag.pvp = 0;
- ShowWarning("npc_parse_mapflag: You can't set PvP and BattleGround flags for the same map! Removing PvP flag from %s (file '%s', line '%d').\n", maplist[m].name, filepath, strline(buffer,start-buffer));
+ if( map->list[m].flag.battleground && map->list[m].flag.pvp ) {
+ map->list[m].flag.pvp = 0;
+ ShowWarning("npc_parse_mapflag: You can't set PvP and BattleGround flags for the same map! Removing PvP flag from %s (file '%s', line '%d').\n", map->list[m].name, filepath, strline(buffer,start-buffer));
}
- if( maplist[m].flag.battleground && (maplist[m].flag.gvg || maplist[m].flag.gvg_dungeon || maplist[m].flag.gvg_castle) ) {
- maplist[m].flag.gvg = 0;
- maplist[m].flag.gvg_dungeon = 0;
- maplist[m].flag.gvg_castle = 0;
- ShowWarning("npc_parse_mapflag: You can't set GvG and BattleGround flags for the same map! Removing GvG flag from %s (file '%s', line '%d').\n", maplist[m].name, filepath, strline(buffer,start-buffer));
+ if( map->list[m].flag.battleground && (map->list[m].flag.gvg || map->list[m].flag.gvg_dungeon || map->list[m].flag.gvg_castle) ) {
+ map->list[m].flag.gvg = 0;
+ map->list[m].flag.gvg_dungeon = 0;
+ map->list[m].flag.gvg_castle = 0;
+ ShowWarning("npc_parse_mapflag: You can't set GvG and BattleGround flags for the same map! Removing GvG flag from %s (file '%s', line '%d').\n", map->list[m].name, filepath, strline(buffer,start-buffer));
}
- if( state && (zone = strdb_get(zone_db, MAP_ZONE_BG_NAME)) && maplist[m].zone != zone ) {
+ if( state && (zone = strdb_get(map->zone_db, MAP_ZONE_BG_NAME)) && map->list[m].zone != zone ) {
map->zone_change(m,zone,start,buffer,filepath);
}
}
else if (!strcmpi(w3,"noexppenalty"))
- maplist[m].flag.noexppenalty=state;
+ map->list[m].flag.noexppenalty=state;
else if (!strcmpi(w3,"nozenypenalty"))
- maplist[m].flag.nozenypenalty=state;
+ map->list[m].flag.nozenypenalty=state;
else if (!strcmpi(w3,"notrade"))
- maplist[m].flag.notrade=state;
+ map->list[m].flag.notrade=state;
else if (!strcmpi(w3,"novending"))
- maplist[m].flag.novending=state;
+ map->list[m].flag.novending=state;
else if (!strcmpi(w3,"nodrop"))
- maplist[m].flag.nodrop=state;
+ map->list[m].flag.nodrop=state;
else if (!strcmpi(w3,"noskill"))
- maplist[m].flag.noskill=state;
+ map->list[m].flag.noskill=state;
else if (!strcmpi(w3,"noicewall"))
- maplist[m].flag.noicewall=state;
+ map->list[m].flag.noicewall=state;
else if (!strcmpi(w3,"snow"))
- maplist[m].flag.snow=state;
+ map->list[m].flag.snow=state;
else if (!strcmpi(w3,"clouds"))
- maplist[m].flag.clouds=state;
+ map->list[m].flag.clouds=state;
else if (!strcmpi(w3,"clouds2"))
- maplist[m].flag.clouds2=state;
+ map->list[m].flag.clouds2=state;
else if (!strcmpi(w3,"fog"))
- maplist[m].flag.fog=state;
+ map->list[m].flag.fog=state;
else if (!strcmpi(w3,"fireworks"))
- maplist[m].flag.fireworks=state;
+ map->list[m].flag.fireworks=state;
else if (!strcmpi(w3,"sakura"))
- maplist[m].flag.sakura=state;
+ map->list[m].flag.sakura=state;
else if (!strcmpi(w3,"leaves"))
- maplist[m].flag.leaves=state;
+ map->list[m].flag.leaves=state;
else if (!strcmpi(w3,"nightenabled"))
- maplist[m].flag.nightenabled=state;
+ map->list[m].flag.nightenabled=state;
else if (!strcmpi(w3,"noexp")) {
- maplist[m].flag.nobaseexp=state;
- maplist[m].flag.nojobexp=state;
+ map->list[m].flag.nobaseexp=state;
+ map->list[m].flag.nojobexp=state;
}
else if (!strcmpi(w3,"nobaseexp"))
- maplist[m].flag.nobaseexp=state;
+ map->list[m].flag.nobaseexp=state;
else if (!strcmpi(w3,"nojobexp"))
- maplist[m].flag.nojobexp=state;
+ map->list[m].flag.nojobexp=state;
else if (!strcmpi(w3,"noloot")) {
- maplist[m].flag.nomobloot=state;
- maplist[m].flag.nomvploot=state;
+ map->list[m].flag.nomobloot=state;
+ map->list[m].flag.nomvploot=state;
}
else if (!strcmpi(w3,"nomobloot"))
- maplist[m].flag.nomobloot=state;
+ map->list[m].flag.nomobloot=state;
else if (!strcmpi(w3,"nomvploot"))
- maplist[m].flag.nomvploot=state;
+ map->list[m].flag.nomvploot=state;
else if (!strcmpi(w3,"nocommand")) {
if (state) {
if (sscanf(w4, "%d", &state) == 1)
- maplist[m].nocommand =state;
+ map->list[m].nocommand =state;
else //No level specified, block everyone.
- maplist[m].nocommand =100;
+ map->list[m].nocommand =100;
} else
- maplist[m].nocommand=0;
+ map->list[m].nocommand=0;
}
else if (!strcmpi(w3,"jexp")) {
- maplist[m].jexp = (state) ? atoi(w4) : 100;
- if( maplist[m].jexp < 0 ) maplist[m].jexp = 100;
- maplist[m].flag.nojobexp = (maplist[m].jexp==0)?1:0;
+ map->list[m].jexp = (state) ? atoi(w4) : 100;
+ if( map->list[m].jexp < 0 ) map->list[m].jexp = 100;
+ map->list[m].flag.nojobexp = (map->list[m].jexp==0)?1:0;
}
else if (!strcmpi(w3,"bexp")) {
- maplist[m].bexp = (state) ? atoi(w4) : 100;
- if( maplist[m].bexp < 0 ) maplist[m].bexp = 100;
- maplist[m].flag.nobaseexp = (maplist[m].bexp==0)?1:0;
+ map->list[m].bexp = (state) ? atoi(w4) : 100;
+ if( map->list[m].bexp < 0 ) map->list[m].bexp = 100;
+ map->list[m].flag.nobaseexp = (map->list[m].bexp==0)?1:0;
}
else if (!strcmpi(w3,"loadevent"))
- maplist[m].flag.loadevent=state;
+ map->list[m].flag.loadevent=state;
else if (!strcmpi(w3,"nochat"))
- maplist[m].flag.nochat=state;
+ map->list[m].flag.nochat=state;
else if (!strcmpi(w3,"partylock"))
- maplist[m].flag.partylock=state;
+ map->list[m].flag.partylock=state;
else if (!strcmpi(w3,"guildlock"))
- maplist[m].flag.guildlock=state;
+ map->list[m].flag.guildlock=state;
else if (!strcmpi(w3,"reset"))
- maplist[m].flag.reset=state;
+ map->list[m].flag.reset=state;
else if (!strcmpi(w3,"notomb"))
- maplist[m].flag.notomb=state;
+ map->list[m].flag.notomb=state;
else if (!strcmpi(w3,"adjust_unit_duration")) {
int skill_id, k;
char skill_name[MAP_ZONE_MAPFLAG_LENGTH], modifier[MAP_ZONE_MAPFLAG_LENGTH];
@@ -3323,41 +3323,41 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
}
if( modifier[0] == '\0' ) {
- ShowWarning("npc_parse_mapflag: Missing 5th param for 'adjust_unit_duration' flag! removing flag from %s (file '%s', line '%d').\n", maplist[m].name, filepath, strline(buffer,start-buffer));
+ ShowWarning("npc_parse_mapflag: Missing 5th param for 'adjust_unit_duration' flag! removing flag from %s (file '%s', line '%d').\n", map->list[m].name, filepath, strline(buffer,start-buffer));
} else if( !( skill_id = skill->name2id(skill_name) ) || !skill->get_unit_id( skill->name2id(skill_name), 0) ) {
- ShowWarning("npc_parse_mapflag: Unknown skill (%s) for 'adjust_unit_duration' flag! removing flag from %s (file '%s', line '%d').\n",skill_name, maplist[m].name, filepath, strline(buffer,start-buffer));
+ ShowWarning("npc_parse_mapflag: Unknown skill (%s) for 'adjust_unit_duration' flag! removing flag from %s (file '%s', line '%d').\n",skill_name, map->list[m].name, filepath, strline(buffer,start-buffer));
} else if ( atoi(modifier) < 1 || atoi(modifier) > USHRT_MAX ) {
- ShowWarning("npc_parse_mapflag: Invalid modifier '%d' for skill '%s' for 'adjust_unit_duration' flag! removing flag from %s (file '%s', line '%d').\n", atoi(modifier), skill_name, maplist[m].name, filepath, strline(buffer,start-buffer));
+ ShowWarning("npc_parse_mapflag: Invalid modifier '%d' for skill '%s' for 'adjust_unit_duration' flag! removing flag from %s (file '%s', line '%d').\n", atoi(modifier), skill_name, map->list[m].name, filepath, strline(buffer,start-buffer));
} else {
- int idx = maplist[m].unit_count;
+ int idx = map->list[m].unit_count;
- ARR_FIND(0, idx, k, maplist[m].units[k]->skill_id == skill_id);
+ ARR_FIND(0, idx, k, map->list[m].units[k]->skill_id == skill_id);
if( k < idx ) {
if( atoi(modifier) != 100 )
- maplist[m].units[k]->modifier = (unsigned short)atoi(modifier);
+ map->list[m].units[k]->modifier = (unsigned short)atoi(modifier);
else { /* remove */
int cursor = 0;
- aFree(maplist[m].units[k]);
- maplist[m].units[k] = NULL;
+ aFree(map->list[m].units[k]);
+ map->list[m].units[k] = NULL;
for( k = 0; k < idx; k++ ) {
- if( maplist[m].units[k] == NULL )
+ if( map->list[m].units[k] == NULL )
continue;
- maplist[m].units[cursor] = maplist[m].units[k];
+ map->list[m].units[cursor] = map->list[m].units[k];
cursor++;
}
- if( !( maplist[m].unit_count = cursor ) ) {
- aFree(maplist[m].units);
- maplist[m].units = NULL;
+ if( !( map->list[m].unit_count = cursor ) ) {
+ aFree(map->list[m].units);
+ map->list[m].units = NULL;
}
}
} else if( atoi(modifier) != 100 ) {
- RECREATE(maplist[m].units, struct mapflag_skill_adjust*, ++maplist[m].unit_count);
- CREATE(maplist[m].units[idx],struct mapflag_skill_adjust,1);
- maplist[m].units[idx]->skill_id = (unsigned short)skill_id;
- maplist[m].units[idx]->modifier = (unsigned short)atoi(modifier);
+ RECREATE(map->list[m].units, struct mapflag_skill_adjust*, ++map->list[m].unit_count);
+ CREATE(map->list[m].units[idx],struct mapflag_skill_adjust,1);
+ map->list[m].units[idx]->skill_id = (unsigned short)skill_id;
+ map->list[m].units[idx]->modifier = (unsigned short)atoi(modifier);
}
}
} else if (!strcmpi(w3,"adjust_skill_damage")) {
@@ -3377,68 +3377,68 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
}
if( modifier[0] == '\0' ) {
- ShowWarning("npc_parse_mapflag: Missing 5th param for 'adjust_skill_damage' flag! removing flag from %s (file '%s', line '%d').\n", maplist[m].name, filepath, strline(buffer,start-buffer));
+ ShowWarning("npc_parse_mapflag: Missing 5th param for 'adjust_skill_damage' flag! removing flag from %s (file '%s', line '%d').\n", map->list[m].name, filepath, strline(buffer,start-buffer));
} else if( !( skill_id = skill->name2id(skill_name) ) ) {
- ShowWarning("npc_parse_mapflag: Unknown skill (%s) for 'adjust_skill_damage' flag! removing flag from %s (file '%s', line '%d').\n", skill_name, maplist[m].name, filepath, strline(buffer,start-buffer));
+ ShowWarning("npc_parse_mapflag: Unknown skill (%s) for 'adjust_skill_damage' flag! removing flag from %s (file '%s', line '%d').\n", skill_name, map->list[m].name, filepath, strline(buffer,start-buffer));
} else if ( atoi(modifier) < 1 || atoi(modifier) > USHRT_MAX ) {
- ShowWarning("npc_parse_mapflag: Invalid modifier '%d' for skill '%s' for 'adjust_skill_damage' flag! removing flag from %s (file '%s', line '%d').\n", atoi(modifier), skill_name, maplist[m].name, filepath, strline(buffer,start-buffer));
+ ShowWarning("npc_parse_mapflag: Invalid modifier '%d' for skill '%s' for 'adjust_skill_damage' flag! removing flag from %s (file '%s', line '%d').\n", atoi(modifier), skill_name, map->list[m].name, filepath, strline(buffer,start-buffer));
} else {
- int idx = maplist[m].skill_count;
+ int idx = map->list[m].skill_count;
- ARR_FIND(0, idx, k, maplist[m].skills[k]->skill_id == skill_id);
+ ARR_FIND(0, idx, k, map->list[m].skills[k]->skill_id == skill_id);
if( k < idx ) {
if( atoi(modifier) != 100 )
- maplist[m].skills[k]->modifier = (unsigned short)atoi(modifier);
+ map->list[m].skills[k]->modifier = (unsigned short)atoi(modifier);
else { /* remove */
int cursor = 0;
- aFree(maplist[m].skills[k]);
- maplist[m].skills[k] = NULL;
+ aFree(map->list[m].skills[k]);
+ map->list[m].skills[k] = NULL;
for( k = 0; k < idx; k++ ) {
- if( maplist[m].skills[k] == NULL )
+ if( map->list[m].skills[k] == NULL )
continue;
- maplist[m].skills[cursor] = maplist[m].skills[k];
+ map->list[m].skills[cursor] = map->list[m].skills[k];
cursor++;
}
- if( !( maplist[m].skill_count = cursor ) ) {
- aFree(maplist[m].skills);
- maplist[m].skills = NULL;
+ if( !( map->list[m].skill_count = cursor ) ) {
+ aFree(map->list[m].skills);
+ map->list[m].skills = NULL;
}
}
} else if( atoi(modifier) != 100 ) {
- RECREATE(maplist[m].skills, struct mapflag_skill_adjust*, ++maplist[m].skill_count);
- CREATE(maplist[m].skills[idx],struct mapflag_skill_adjust,1);
- maplist[m].skills[idx]->skill_id = (unsigned short)skill_id;
- maplist[m].skills[idx]->modifier = (unsigned short)atoi(modifier);
+ RECREATE(map->list[m].skills, struct mapflag_skill_adjust*, ++map->list[m].skill_count);
+ CREATE(map->list[m].skills[idx],struct mapflag_skill_adjust,1);
+ map->list[m].skills[idx]->skill_id = (unsigned short)skill_id;
+ map->list[m].skills[idx]->modifier = (unsigned short)atoi(modifier);
}
}
} else if (!strcmpi(w3,"zone")) {
struct map_zone_data *zone;
- if( !(zone = strdb_get(zone_db, w4)) ) {
- ShowWarning("npc_parse_mapflag: Invalid zone '%s'! removing flag from %s (file '%s', line '%d').\n", w4, maplist[m].name, filepath, strline(buffer,start-buffer));
- } else if( maplist[m].zone != zone ) {
+ if( !(zone = strdb_get(map->zone_db, w4)) ) {
+ ShowWarning("npc_parse_mapflag: Invalid zone '%s'! removing flag from %s (file '%s', line '%d').\n", w4, map->list[m].name, filepath, strline(buffer,start-buffer));
+ } else if( map->list[m].zone != zone ) {
map->zone_change(m,zone,start,buffer,filepath);
}
} else if ( !strcmpi(w3,"nomapchannelautojoin") ) {
- maplist[m].flag.chsysnolocalaj = state;
+ map->list[m].flag.chsysnolocalaj = state;
} else if ( !strcmpi(w3,"invincible_time_inc") ) {
- maplist[m].invincible_time_inc = (state) ? atoi(w4) : 0;
+ map->list[m].invincible_time_inc = (state) ? atoi(w4) : 0;
} else if ( !strcmpi(w3,"noknockback") ) {
- maplist[m].flag.noknockback = state;
+ map->list[m].flag.noknockback = state;
} else if ( !strcmpi(w3,"weapon_damage_rate") ) {
- maplist[m].weapon_damage_rate = (state) ? atoi(w4) : 100;
+ map->list[m].weapon_damage_rate = (state) ? atoi(w4) : 100;
} else if ( !strcmpi(w3,"magic_damage_rate") ) {
- maplist[m].magic_damage_rate = (state) ? atoi(w4) : 100;
+ map->list[m].magic_damage_rate = (state) ? atoi(w4) : 100;
} else if ( !strcmpi(w3,"misc_damage_rate") ) {
- maplist[m].misc_damage_rate = (state) ? atoi(w4) : 100;
+ map->list[m].misc_damage_rate = (state) ? atoi(w4) : 100;
} else if ( !strcmpi(w3,"short_damage_rate") ) {
- maplist[m].short_damage_rate = (state) ? atoi(w4) : 100;
+ map->list[m].short_damage_rate = (state) ? atoi(w4) : 100;
} else if ( !strcmpi(w3,"long_damage_rate") ) {
- maplist[m].long_damage_rate = (state) ? atoi(w4) : 100;
+ map->list[m].long_damage_rate = (state) ? atoi(w4) : 100;
} else
ShowError("npc_parse_mapflag: unrecognized mapflag '%s' (file '%s', line '%d').\n", w3, filepath, strline(buffer,start-buffer));
@@ -3560,7 +3560,7 @@ void npc_parsesrcfile(const char* filepath, bool runOnInit)
p = strchr(p,'\n');// next line
continue;
}
- if (x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys) {
+ 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 )
{
@@ -3742,20 +3742,20 @@ int npc_reload(void) {
mapit->free(iter);
if(battle_config.dynamic_mobs) {// dynamic check by [random]
- for (m = 0; m < map->map_num; m++) {
+ for (m = 0; m < map->count; m++) {
for (i = 0; i < MAX_MOB_LIST_PER_MAP; i++) {
- if (maplist[m].moblist[i] != NULL) {
- aFree(maplist[m].moblist[i]);
- maplist[m].moblist[i] = NULL;
+ if (map->list[m].moblist[i] != NULL) {
+ aFree(map->list[m].moblist[i]);
+ map->list[m].moblist[i] = NULL;
}
- if( maplist[m].mob_delete_timer != INVALID_TIMER )
+ if( map->list[m].mob_delete_timer != INVALID_TIMER )
{ // Mobs were removed anyway,so delete the timer [Inkfish]
- timer->delete(maplist[m].mob_delete_timer, map->removemobs_timer);
- maplist[m].mob_delete_timer = INVALID_TIMER;
+ timer->delete(map->list[m].mob_delete_timer, map->removemobs_timer);
+ map->list[m].mob_delete_timer = INVALID_TIMER;
}
}
- if (maplist[m].npc_num > 0)
- ShowWarning("npc_reload: %d npcs weren't removed at map %s!\n", maplist[m].npc_num, maplist[m].name);
+ if (map->list[m].npc_num > 0)
+ ShowWarning("npc_reload: %d npcs weren't removed at map %s!\n", map->list[m].npc_num, map->list[m].name);
}
}
@@ -3865,24 +3865,24 @@ void npc_debug_warps_sub(struct npc_data* nd) {
if (map->getcell(m, nd->u.warp.x, nd->u.warp.y, CELL_CHKNPC)) {
ShowWarning("Warp %s at %s(%d,%d) warps directly on top of an area npc at %s(%d,%d)\n",
nd->name,
- maplist[nd->bl.m].name, nd->bl.x, nd->bl.y,
- maplist[m].name, nd->u.warp.x, nd->u.warp.y
+ map->list[nd->bl.m].name, nd->bl.x, nd->bl.y,
+ map->list[m].name, nd->u.warp.x, nd->u.warp.y
);
}
if (map->getcell(m, nd->u.warp.x, nd->u.warp.y, CELL_CHKNOPASS)) {
ShowWarning("Warp %s at %s(%d,%d) warps to a non-walkable tile at %s(%d,%d)\n",
nd->name,
- maplist[nd->bl.m].name, nd->bl.x, nd->bl.y,
- maplist[m].name, nd->u.warp.x, nd->u.warp.y
+ map->list[nd->bl.m].name, nd->bl.x, nd->bl.y,
+ map->list[m].name, nd->u.warp.x, nd->u.warp.y
);
}
}
static void npc_debug_warps(void) {
int16 m, i;
- for (m = 0; m < map->map_num; m++)
- for (i = 0; i < maplist[m].npc_num; i++)
- npc->debug_warps_sub(maplist[m].npc[i]);
+ for (m = 0; m < map->count; m++)
+ for (i = 0; i < map->list[m].npc_num; i++)
+ npc->debug_warps_sub(map->list[m].npc[i]);
}
/*==========================================
@@ -4072,7 +4072,5 @@ void npc_defaults(void) {
npc->do_clear_npc = do_clear_npc;
npc->debug_warps_sub = npc_debug_warps_sub;
npc->debug_warps = npc_debug_warps;
-#ifdef SECURE_NPCTIMEOUT
npc->secure_timeout_timer = npc_rr_secure_timeout_timer;
-#endif
}
diff --git a/src/map/npc.h b/src/map/npc.h
index 3c273fffb..f809cb19c 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -229,9 +229,7 @@ struct npc_interface {
/**
* For the Secure NPC Timeout option (check config/Secure.h) [RR]
**/
-#ifdef SECURE_NPCTIMEOUT
int (*secure_timeout_timer) (int tid, unsigned int tick, int id, intptr_t data);
-#endif
};
struct npc_interface *npc;
diff --git a/src/map/packets.h b/src/map/packets.h
index 8fcc6c863..c91b5d50c 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -1971,14 +1971,14 @@ packet(0x020d,-1);
#ifndef PACKETVER_RE
packet(0x091D,18,clif->pPartyBookingRegisterReq,2,4,6);
#else
- packet(0x08E5,41,clif->pPartyBookingRegisterReq,2,4);
+ packet(0x08E5,41,clif->pPartyRecruitRegisterReq,2,4);
#endif
packet(0x08E6,4);
- packet(0x08E7,10,clif->pPartyBookingSearchReq,2);
+ packet(0x08E7,10,clif->pPartyRecruitSearchReq,2);
packet(0x08E8,-1);
- packet(0x08E9,2,clif->pPartyBookingDeleteReq,2);
+ packet(0x08E9,2,clif->pPartyRecruitDeleteReq,2);
packet(0x08EA,4);
- packet(0x08EB,39,clif->pPartyBookingUpdateReq,2);
+ packet(0x08EB,39,clif->pPartyRecruitUpdateReq,2);
packet(0x08EC,73);
packet(0x08ED,43);
packet(0x08EE,6);
@@ -2022,14 +2022,14 @@ packet(0x020d,-1);
packet(0x0364,8,clif->pMoveFromKafra,2,4);
packet(0x096A,6,clif->pGetCharNameRequest,2);
packet(0x0368,6,clif->pSolveCharName,2);
- packet(0x08E5,41,clif->pPartyBookingRegisterReq,2,4);
+ packet(0x08E5,41,clif->pPartyRecruitRegisterReq,2,4);
packet(0x08d2,10);
packet(0x0916,26,clif->pGuildInvite2,2);
#endif
#ifndef PACKETVER_RE
#if PACKETVER >= 20120604
- packet(0x0861,18,clif->pPartyBookingRegisterReq,2,4,6);
+ packet(0x0861,18,clif->pPartyRecruitRegisterReq,2,4,6);
#endif
#endif
@@ -2118,7 +2118,11 @@ packet(0x020d,-1);
packet(0x035F,6,clif->pReqClickBuyingStore,2);
packet(0x0886,2,clif->pReqCloseBuyingStore,0);
packet(0x0938,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
- packet(0x085D,41,clif->pPartyBookingRegisterReq,2,4);
+#ifdef PACKETVER_RE
+ packet(0x085D,41,clif->pPartyRecruitRegisterReq,2,4);
+#else // not PACKETVER_RE
+ packet(0x085D,18,clif->pPartyBookingRegisterReq,2,4);
+#endif // PACKETVER_RE
//packet(0x095A,8); // unknown usage
packet(0x0868,-1,clif->pItemListWindowSelected,2,4,8);
packet(0x0888,19,clif->pWantToConnection,2,6,10,14,18);
@@ -2159,7 +2163,11 @@ packet(0x020d,-1);
packet(0x0360,6,clif->pReqClickBuyingStore,2);
packet(0x0817,2,clif->pReqCloseBuyingStore,0);
packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
- packet(0x092D,41,clif->pPartyBookingRegisterReq,2,4);
+#ifdef PACKETVER_RE
+ packet(0x092D,41,clif->pPartyRecruitRegisterReq,2,4);
+#else // not PACKETVER_RE
+ packet(0x092D,18,clif->pPartyBookingRegisterReq,2,4);
+#endif // PACKETVER_RE
//packet(0x08AA,8); // CZ_JOIN_BATTLE_FIELD
packet(0x0963,-1,clif->pItemListWindowSelected,2,4,8);
packet(0x0943,19,clif->pWantToConnection,2,6,10,14,18);
@@ -2194,7 +2202,11 @@ packet(0x020d,-1);
packet(0x0368,6,clif->pReqClickBuyingStore,2);
packet(0x086E,2,clif->pReqCloseBuyingStore,0);
packet(0x0874,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
- packet(0x089B,41,clif->pPartyBookingRegisterReq,2,4);
+#ifdef PACKETVER_RE
+ packet(0x089B,41,clif->pPartyRecruitRegisterReq,2,4);
+#else // not PACKETVER_RE
+ packet(0x089B,18,clif->pPartyBookingRegisterReq,2,4);
+#endif // PACKETVER_RE
//packet(0x0965,8); // CZ_JOIN_BATTLE_FIELD
packet(0x086A,-1,clif->pItemListWindowSelected,2,4,8);
packet(0x08A9,19,clif->pWantToConnection,2,6,10,14,18);
@@ -2228,7 +2240,11 @@ packet(0x020d,-1);
packet(0x0892,6,clif->pReqClickBuyingStore,2);
packet(0x0964,2,clif->pReqCloseBuyingStore,0);
packet(0x0869,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
- packet(0x0874,41,clif->pPartyBookingRegisterReq,2,4);
+#ifdef PACKETVER_RE
+ packet(0x0874,41,clif->pPartyRecruitRegisterReq,2,4);
+#else // not PACKETVER_RE
+ packet(0x0874,18,clif->pPartyBookingRegisterReq,2,4);
+#endif // PACKETVER_RE
// packet(0x088E,8); // CZ_JOIN_BATTLE_FIELD
packet(0x0958,-1,clif->pItemListWindowSelected,2,4,8);
packet(0x0919,19,clif->pWantToConnection,2,6,10,14,18);
@@ -2261,7 +2277,11 @@ packet(0x020d,-1);
packet(0x0360,6,clif->pReqClickBuyingStore,2);
packet(0x0817,2,clif->pReqCloseBuyingStore,0);
packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
- packet(0x0365,41,clif->pPartyBookingRegisterReq,2,4);
+#ifdef PACKETVER_RE
+ packet(0x0365,41,clif->pPartyRecruitRegisterReq,2,4);
+#else // not PACKETVER_RE
+ packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4);
+#endif // PACKETVER_RE
// packet(0x0363,8); // CZ_JOIN_BATTLE_FIELD
packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8);
packet(0x022D,19,clif->pWantToConnection,2,6,10,14,18);
@@ -2303,7 +2323,11 @@ packet(0x020d,-1);
packet(0x0862,6,clif->pReqClickBuyingStore,2);
packet(0x085A,2,clif->pReqCloseBuyingStore,0);
packet(0x0932,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
- packet(0x08A7,41,clif->pPartyBookingRegisterReq,2,4);
+#ifdef PACKETVER_RE
+ packet(0x08A7,41,clif->pPartyRecruitRegisterReq,2,4);
+#else // not PACKETVER_RE
+ packet(0x08A7,18,clif->pPartyBookingRegisterReq,2,4);
+#endif // PACKETVER_RE
// packet(0x087A,8); // CZ_JOIN_BATTLE_FIELD
packet(0x0942,-1,clif->pItemListWindowSelected,2,4,8);
packet(0x095B,19,clif->pWantToConnection,2,6,10,14,18);
@@ -2336,7 +2360,11 @@ packet(0x020d,-1);
packet(0x0360,6,clif->pReqClickBuyingStore,2);
packet(0x0365,2,clif->pReqCloseBuyingStore,0);
packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
- packet(0x0894,41,clif->pPartyBookingRegisterReq,2,4);
+#ifdef PACKETVER_RE
+ packet(0x0894,41,clif->pPartyRecruitRegisterReq,2,4);
+#else // not PACKETVER_RE
+ packet(0x0894,18,clif->pPartyBookingRegisterReq,2,4);
+#endif // PACKETVER_RE
// packet(0x0860,8); // CZ_JOIN_BATTLE_FIELD
packet(0x08A5,-1,clif->pItemListWindowSelected,2,4,8);
packet(0x088C,19,clif->pWantToConnection,2,6,10,14,18);
@@ -2357,7 +2385,11 @@ packet(0x020d,-1);
packet(0x0202,6,clif->pReqClickBuyingStore,2);
packet(0x0817,2,clif->pReqCloseBuyingStore,0);
packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
- packet(0x0365,41,clif->pPartyBookingRegisterReq,2,4);
+#ifdef PACKETVER_RE
+ packet(0x0365,41,clif->pPartyRecruitRegisterReq,2,4);
+#else // not PACKETVER_RE
+ packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4);
+#endif // PACKETVER_RE
// packet(0x0363,8); // CZ_JOIN_BATTLE_FIELD
packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8);
packet(0x022D,19,clif->pWantToConnection,2,6,10,14,18);
@@ -2369,6 +2401,42 @@ packet(0x020d,-1);
packet(0x097C,4,clif->pRanklist);
#endif
+//2013-08-07Ragexe (Shakto)
+#if PACKETVER >= 20130807
+ packet(0x0369,7,clif->pActionRequest,2,6);
+ packet(0x083C,10,clif->pUseSkillToId,2,4,6);
+ packet(0x0437,5,clif->pWalkToXY,2);
+ packet(0x035F,6,clif->pTickSend,2);
+ packet(0x0202,5,clif->pChangeDir,2,4);
+ packet(0x07E4,6,clif->pTakeItem,2);
+ packet(0x0362,6,clif->pDropItem,2,4);
+ packet(0x07EC,8,clif->pMoveToKafra,2,4);
+ packet(0x0364,8,clif->pMoveFromKafra,2,4);
+ packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8);
+ packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);
+ packet(0x096A,6,clif->pGetCharNameRequest,2);
+ packet(0x0368,6,clif->pSolveCharName,2);
+ packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10);
+ packet(0x0835,2,clif->pSearchStoreInfoNextPage,0);
+ packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);
+ packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12);
+ packet(0x0360,6,clif->pReqClickBuyingStore,2);
+ packet(0x0817,2,clif->pReqCloseBuyingStore,0);
+ packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
+#ifdef PACKETVER_RE
+ packet(0x0365,41,clif->pPartyRecruitRegisterReq,2,4);
+#else // not PACKETVER_RE
+ packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4);
+#endif // PACKETVER_RE
+ // packet(0x0363,8); // CZ_JOIN_BATTLE_FIELD
+ packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8);
+ packet(0x022D,19,clif->pWantToConnection,2,6,10,14,18);
+ packet(0x0802,26,clif->pPartyInvite2,2);
+ // packet(0x0436,4); // CZ_GANGSI_RANK
+ packet(0x023B,26,clif->pFriendsListAdd,2);
+ packet(0x0361,5,clif->pHomMenu,2,4);
+ packet(0x0887,36,clif->pStoragePassword,0);
+#endif
/* PacketKeys: http://hercules.ws/board/topic/1105-hercules-wpe-free-june-14th-patch/ */
#if PACKETVER >= 20110817
@@ -2559,5 +2627,8 @@ packet(0x020d,-1);
packetKeys(0x4FF90E23,0x0F1432F2,0x4CFA1EDA); /* Thanks to Shakto */
#endif
+#if PACKETVER >= 20130807
+ packetKeys(0x7E241DE0,0x5E805580,0x3D807D80); /* Thanks to Shakto */
+#endif
#endif /* _PACKETS_H_ */
diff --git a/src/map/party.c b/src/map/party.c
index a4eb38629..904110452 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -1,5 +1,6 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#include "../common/cbasetypes.h"
#include "../common/timer.h"
@@ -29,20 +30,13 @@
#include <string.h>
-static DBMap* party_db; // int party_id -> struct party_data* (releases data)
-static DBMap* party_booking_db; // int char_id -> struct party_booking_ad_info* (releases data) // Party Booking [Spiria]
-static unsigned long party_booking_nextid = 1;
-
struct party_interface party_s;
-int party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data);
-
/*==========================================
* Fills the given party_member structure according to the sd provided.
* Used when creating/adding people to a party. [Skotlex]
*------------------------------------------*/
-static void party_fill_member(struct party_member* member, struct map_session_data* sd, unsigned int leader)
-{
+void party_fill_member(struct party_member* member, struct map_session_data* sd, unsigned int leader) {
member->account_id = sd->status.account_id;
member->char_id = sd->status.char_id;
safestrncpy(member->name, sd->status.name, NAME_LENGTH);
@@ -54,8 +48,7 @@ static void party_fill_member(struct party_member* member, struct map_session_da
}
/// Get the member_id of a party member.
/// Return -1 if not in party.
-int party_getmemberid(struct party_data* p, struct map_session_data* sd)
-{
+int party_getmemberid(struct party_data* p, struct map_session_data* sd) {
int member_id;
nullpo_retr(-1, p);
if( sd == NULL )
@@ -68,7 +61,6 @@ int party_getmemberid(struct party_data* p, struct map_session_data* sd)
return member_id;
}
-
/*==========================================
* Request an available sd of this party
*------------------------------------------*/
@@ -83,8 +75,7 @@ struct map_session_data* party_getavailablesd(struct party_data *p)
/*==========================================
* Retrieves and validates the sd pointer for this party member [Skotlex]
*------------------------------------------*/
-
-static TBL_PC* party_sd_check(int party_id, int account_id, int char_id) {
+TBL_PC* party_sd_check(int party_id, int account_id, int char_id) {
TBL_PC* sd = map->id2sd(account_id);
if (!(sd && sd->status.char_id == char_id))
@@ -108,30 +99,12 @@ int party_db_final(DBKey key, DBData *data, va_list ap) {
return 0;
}
-/*==========================================
- * Destructor
- * Called in map shutdown, cleanup var
- *------------------------------------------*/
-void do_final_party(void)
-{
- party_db->destroy(party_db,party_db_final);
- party_booking_db->destroy(party_booking_db,NULL); // Party Booking [Spiria]
-}
-// Constructor, init vars
-void do_init_party(void)
-{
- party_db = idb_alloc(DB_OPT_RELEASE_DATA);
- party_booking_db = idb_alloc(DB_OPT_RELEASE_DATA); // Party Booking [Spiria]
- timer->add_func_list(party_send_xy_timer, "party_send_xy_timer");
- timer->add_interval(timer->gettick()+battle_config.party_update_interval, party_send_xy_timer, 0, 0, battle_config.party_update_interval);
-}
-
/// Party data lookup using party id.
struct party_data* party_search(int party_id)
{
if(!party_id)
return NULL;
- return (struct party_data*)idb_get(party_db,party_id);
+ return (struct party_data*)idb_get(party->db,party_id);
}
/// Party data lookup using party name.
@@ -139,7 +112,7 @@ struct party_data* party_searchname(const char* str)
{
struct party_data* p;
- DBIterator *iter = db_iterator(party_db);
+ DBIterator *iter = db_iterator(party->db);
for( p = dbi_first(iter); dbi_exists(iter); p = dbi_next(iter) )
{
if( strncmpi(p->party.name,str,NAME_LENGTH) == 0 )
@@ -171,7 +144,7 @@ int party_create(struct map_session_data *sd,char *name,int item,int item2)
sd->party_creating = true;
- party_fill_member(&leader, sd, 1);
+ party->fill_member(&leader, sd, 1);
intif->create_party(&leader,name,item,item2);
return 0;
@@ -219,29 +192,27 @@ int party_recv_noinfo(int party_id, int char_id) {
return 0;
}
-static void party_check_state(struct party_data *p)
-{
+void party_check_state(struct party_data *p) {
int i;
memset(&p->state, 0, sizeof(p->state));
- for (i = 0; i < MAX_PARTY; i ++)
- {
+ for (i = 0; i < MAX_PARTY; i ++) {
if (!p->party.member[i].online) continue; //Those not online shouldn't aport to skill usage and all that.
switch (p->party.member[i].class_) {
- case JOB_MONK:
- case JOB_BABY_MONK:
- case JOB_CHAMPION:
- p->state.monk = 1;
- break;
- case JOB_STAR_GLADIATOR:
- p->state.sg = 1;
- break;
- case JOB_SUPER_NOVICE:
- case JOB_SUPER_BABY:
- p->state.snovice = 1;
- break;
- case JOB_TAEKWON:
- p->state.tk = 1;
- break;
+ case JOB_MONK:
+ case JOB_BABY_MONK:
+ case JOB_CHAMPION:
+ p->state.monk = 1;
+ break;
+ case JOB_STAR_GLADIATOR:
+ p->state.sg = 1;
+ break;
+ case JOB_SUPER_NOVICE:
+ case JOB_SUPER_BABY:
+ p->state.snovice = 1;
+ break;
+ case JOB_TAEKWON:
+ p->state.tk = 1;
+ break;
}
}
}
@@ -260,7 +231,7 @@ int party_recv_info(struct party* sp, int char_id)
nullpo_ret(sp);
- p = (struct party_data*)idb_get(party_db, sp->party_id);
+ p = (struct party_data*)idb_get(party->db, sp->party_id);
if( p != NULL ) {// diff members
for( member_id = 0; member_id < MAX_PARTY; ++member_id ) {
member = &p->party.member[member_id];
@@ -289,7 +260,7 @@ int party_recv_info(struct party* sp, int char_id)
CREATE(p, struct party_data, 1);
p->instance = NULL;
p->instances = 0;
- idb_put(party_db, sp->party_id, p);
+ idb_put(party->db, sp->party_id, p);
}
while( removed_count > 0 ) {// no longer in party
member_id = removed[--removed_count];
@@ -305,9 +276,9 @@ int party_recv_info(struct party* sp, int char_id)
member = &p->party.member[member_id];
if ( member->char_id == 0 )
continue;// empty
- p->data[member_id].sd = party_sd_check(sp->party_id, member->account_id, member->char_id);
+ p->data[member_id].sd = party->sd_check(sp->party_id, member->account_id, member->char_id);
}
- party_check_state(p);
+ party->check_state(p);
while( added_count > 0 ) { // new in party
member_id = added[--added_count];
sd = p->data[member_id].sd;
@@ -319,7 +290,7 @@ int party_recv_info(struct party* sp, int char_id)
clif->party_info(p,NULL);
for( j = 0; j < p->instances; j++ ) {
if( p->instance[j] >= 0 ) {
- if( instances[p->instance[j]].idle_timer == INVALID_TIMER && instances[p->instance[j]].progress_timer == INVALID_TIMER )
+ if( instance->list[p->instance[j]].idle_timer == INVALID_TIMER && instance->list[p->instance[j]].progress_timer == INVALID_TIMER )
continue;
clif->instance_join(sd->fd, p->instance[j]);
break;
@@ -412,7 +383,7 @@ void party_reply_invite(struct map_session_data *sd,int party_id,int flag) {
if( flag == 1 && !sd->party_creating && !sd->party_joining )
{// accepted and allowed
sd->party_joining = true;
- party_fill_member(&member, sd, 0);
+ party->fill_member(&member, sd, 0);
intif->party_addmember(sd->party_invite, &member);
}
else
@@ -442,7 +413,7 @@ void party_member_joined(struct map_session_data *sd)
p->data[i].sd = sd;
for( j = 0; j < p->instances; j++ ) {
if( p->instance[j] >= 0 ) {
- if( instances[p->instance[j]].idle_timer == INVALID_TIMER && instances[p->instance[j]].progress_timer == INVALID_TIMER )
+ if( instance->list[p->instance[j]].idle_timer == INVALID_TIMER && instance->list[p->instance[j]].progress_timer == INVALID_TIMER )
continue;
clif->instance_join(sd->fd, p->instance[j]);
break;
@@ -504,7 +475,7 @@ int party_member_added(int party_id,int account_id,int char_id, int flag) {
for( j = 0; j < p->instances; j++ ) {
if( p->instance[j] >= 0 ) {
- if( instances[p->instance[j]].idle_timer == INVALID_TIMER && instances[p->instance[j]].progress_timer == INVALID_TIMER )
+ if( instance->list[p->instance[j]].idle_timer == INVALID_TIMER && instance->list[p->instance[j]].progress_timer == INVALID_TIMER )
continue;
clif->instance_join(sd->fd, p->instance[j]);
break;
@@ -571,7 +542,7 @@ int party_member_withdraw(int party_id, int account_id, int char_id)
memset(&p->party.member[i], 0, sizeof(p->party.member[0]));
memset(&p->data[i], 0, sizeof(p->data[0]));
p->party.count--;
- party_check_state(p);
+ party->check_state(p);
}
}
@@ -604,7 +575,7 @@ int party_broken(int party_id)
for( j = 0; j < p->instances; j++ ) {
if( p->instance[j] >= 0 ) {
instance->destroy( p->instance[j] );
- instances[p->instance[j]].owner_id = 0;
+ instance->list[p->instance[j]].owner_id = 0;
}
}
@@ -615,7 +586,7 @@ int party_broken(int party_id)
}
}
- idb_remove(party_db,party_id);
+ idb_remove(party->db,party_id);
return 0;
}
@@ -659,7 +630,7 @@ bool party_changeleader(struct map_session_data *sd, struct map_session_data *ts
return false;
}
- if( maplist[sd->bl.m].flag.partylock ) {
+ if( map->list[sd->bl.m].flag.partylock ) {
clif->message(sd->fd, msg_txt(287));
return false;
}
@@ -722,7 +693,7 @@ int party_recv_movemap(int party_id,int account_id,int char_id, unsigned short m
m->online = online;
m->lv = lv;
//Check if they still exist on this map server
- p->data[i].sd = party_sd_check(party_id, account_id, char_id);
+ p->data[i].sd = party->sd_check(party_id, account_id, char_id);
clif->party_info(p,NULL);
return 0;
@@ -864,7 +835,7 @@ int party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct party_data* p;
- DBIterator *iter = db_iterator(party_db);
+ DBIterator *iter = db_iterator(party->db);
// for each existing party,
for( p = dbi_first(iter); dbi_exists(iter); p = dbi_next(iter) )
{
@@ -1060,9 +1031,11 @@ int party_sub_count(struct block_list *bl, va_list ap)
return 1;
}
-/// Executes 'func' for each party member on the same map and in range (0:whole map)
-int party_foreachsamemap(int (*func)(struct block_list*,va_list),struct map_session_data *sd,int range,...)
-{
+/**
+ * Arglist-based version of party_foreachsamemap
+ * @see party_foreachsamemap
+ */
+int party_vforeachsamemap(int (*func)(struct block_list*,va_list), struct map_session_data *sd, int range, va_list ap) {
struct party_data *p;
int i;
int x0,y0,x1,y1;
@@ -1096,10 +1069,10 @@ int party_foreachsamemap(int (*func)(struct block_list*,va_list),struct map_sess
map->freeblock_lock();
for(i=0;i<blockcount;i++) {
- va_list ap;
- va_start(ap, range);
- total += func(list[i], ap);
- va_end(ap);
+ va_list ap_copy;
+ va_copy(ap_copy, ap);
+ total += func(list[i], ap_copy);
+ va_end(ap_copy);
}
map->freeblock_unlock();
@@ -1107,123 +1080,190 @@ int party_foreachsamemap(int (*func)(struct block_list*,va_list),struct map_sess
return total;
}
+/**
+ * Executes 'func' for each party member on the same map and within a 'range' cells area
+ * @param func Function to execute
+ * @param sd Reference character for party, map, area center
+ * @param range Area size (0 = whole map)
+ * @param ... Adidtional parameters to pass to func()
+ * @return Sum of the return values from func()
+ */
+int party_foreachsamemap(int (*func)(struct block_list*,va_list), struct map_session_data *sd, int range, ...) {
+ va_list ap;
+ int ret;
+ va_start(ap, range);
+ ret = party->vforeachsamemap(func, sd, range, ap);
+ va_end(ap);
+ return ret;
+}
+
/*==========================================
* Party Booking in KRO [Spiria]
*------------------------------------------*/
-static struct party_booking_ad_info* create_party_booking_data(void)
-{
+struct party_booking_ad_info* create_party_booking_data(void) {
struct party_booking_ad_info *pb_ad;
CREATE(pb_ad, struct party_booking_ad_info, 1);
- pb_ad->index = party_booking_nextid++;
+ pb_ad->index = party->booking_nextid++;
return pb_ad;
}
-#ifndef PARTY_RECRUIT
-void party_booking_register(struct map_session_data *sd, short level, short mapid, short* job)
-#else
-void party_booking_register(struct map_session_data *sd, short level, const char *notice)
-#endif
-{
+void party_recruit_register(struct map_session_data *sd, short level, const char *notice) {
+#ifdef PARTY_RECRUIT
struct party_booking_ad_info *pb_ad;
-#ifndef PARTY_RECRUIT
- int i;
-#endif
- pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id);
+ pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id);
if( pb_ad == NULL )
{
- pb_ad = create_party_booking_data();
- idb_put(party_booking_db, sd->status.char_id, pb_ad);
+ pb_ad = party->create_booking_data();
+ idb_put(party->booking_db, sd->status.char_id, pb_ad);
}
else
{// already registered
- clif->PartyBookingRegisterAck(sd, 2);
+ clif->PartyRecruitRegisterAck(sd, 2);
return;
}
memcpy(pb_ad->charname,sd->status.name,NAME_LENGTH);
pb_ad->expiretime = (int)time(NULL);
pb_ad->p_detail.level = level;
+ safestrncpy(pb_ad->p_detail.notice, notice, PB_NOTICE_LENGTH);
+
+ clif->PartyRecruitRegisterAck(sd, 0);
+ clif->PartyRecruitInsertNotify(sd, pb_ad); // Notice
+#else
+ return;
+#endif
+}
+
+void party_booking_register(struct map_session_data *sd, short level, short mapid, short* job) {
#ifndef PARTY_RECRUIT
+ struct party_booking_ad_info *pb_ad;
+ int i;
+
+ pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id);
+
+ if( pb_ad == NULL )
+ {
+ pb_ad = party->create_booking_data();
+ idb_put(party->booking_db, sd->status.char_id, pb_ad);
+ }
+ else
+ {// already registered
+ clif->PartyBookingRegisterAck(sd, 2);
+ return;
+ }
+
+ memcpy(pb_ad->charname,sd->status.name,NAME_LENGTH);
+ pb_ad->expiretime = (int)time(NULL);
+ pb_ad->p_detail.level = level;
pb_ad->p_detail.mapid = mapid;
-
+
for(i=0;i<PARTY_BOOKING_JOBS;i++)
if(job[i] != 0xFF)
pb_ad->p_detail.job[i] = job[i];
else pb_ad->p_detail.job[i] = -1;
-#else
- safestrncpy(pb_ad->p_detail.notice, notice, PB_NOTICE_LENGTH);
-#endif
-
+
clif->PartyBookingRegisterAck(sd, 0);
clif->PartyBookingInsertNotify(sd, pb_ad); // Notice
-}
-
-#ifndef PARTY_RECRUIT
-void party_booking_update(struct map_session_data *sd, short* job)
#else
-void party_booking_update(struct map_session_data *sd, const char *notice)
-#endif
-{
-#ifndef PARTY_RECRUIT
- int i;
+ return;
#endif
+}
+
+void party_recruit_update(struct map_session_data *sd, const char *notice) {
+#ifdef PARTY_RECRUIT
struct party_booking_ad_info *pb_ad;
- pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id);
+ pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id);
if( pb_ad == NULL )
return;
pb_ad->expiretime = (int)time(NULL);// Update time.
+ if (notice != NULL) {
+ safestrncpy(pb_ad->p_detail.notice, notice, PB_NOTICE_LENGTH);
+ }
+
+ clif->PartyRecruitUpdateNotify(sd, pb_ad);
+#else
+ return;
+#endif
+}
+void party_booking_update(struct map_session_data *sd, short* job) {
#ifndef PARTY_RECRUIT
+ int i;
+ struct party_booking_ad_info *pb_ad;
+
+ pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id);
+
+ if( pb_ad == NULL )
+ return;
+
+ pb_ad->expiretime = (int)time(NULL);// Update time.
+
for(i=0;i<PARTY_BOOKING_JOBS;i++)
if(job[i] != 0xFF)
pb_ad->p_detail.job[i] = job[i];
else pb_ad->p_detail.job[i] = -1;
+
+ clif->PartyBookingUpdateNotify(sd, pb_ad);
#else
- if (notice != NULL) {
- safestrncpy(pb_ad->p_detail.notice, notice, PB_NOTICE_LENGTH);
- }
+ return;
#endif
-
- clif->PartyBookingUpdateNotify(sd, pb_ad);
}
-#ifndef PARTY_RECRUIT
-void party_booking_search(struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount)
-#else
-void party_booking_search(struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount)
-#endif
-{
+
+void party_recruit_search(struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount) {
+#ifdef PARTY_RECRUIT
struct party_booking_ad_info *pb_ad;
-#ifndef PARTY_RECRUIT
- int i;
-#endif
int count = 0;
struct party_booking_ad_info* result_list[PARTY_BOOKING_RESULTS];
bool more_result = false;
- DBIterator* iter = db_iterator(party_booking_db);
+ DBIterator* iter = db_iterator(party->booking_db);
memset(result_list, 0, sizeof(result_list));
for( pb_ad = dbi_first(iter); dbi_exists(iter); pb_ad = dbi_next(iter) )
{
-#ifndef PARTY_RECRUIT
- if (pb_ad->index < lastindex || (level && (pb_ad->p_detail.level < level-15 || pb_ad->p_detail.level > level)))
- continue;
-#else
if ((level && (pb_ad->p_detail.level < level-15 || pb_ad->p_detail.level > level)))
continue;
-#endif
if (count >= PARTY_BOOKING_RESULTS){
more_result = true;
break;
}
+ result_list[count] = pb_ad;
+ if( result_list[count] )
+ {
+ count++;
+ }
+ }
+ dbi_destroy(iter);
+ clif->PartyRecruitSearchAck(sd->fd, result_list, count, more_result);
+#else
+ return;
+#endif
+}
+void party_booking_search(struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount) {
#ifndef PARTY_RECRUIT
+ struct party_booking_ad_info *pb_ad;
+ int i;
+ int count = 0;
+ struct party_booking_ad_info* result_list[PARTY_BOOKING_RESULTS];
+ bool more_result = false;
+ DBIterator* iter = db_iterator(party->booking_db);
+
+ memset(result_list, 0, sizeof(result_list));
+
+ for( pb_ad = dbi_first(iter); dbi_exists(iter); pb_ad = dbi_next(iter) ) {
+ if (pb_ad->index < lastindex || (level && (pb_ad->p_detail.level < level-15 || pb_ad->p_detail.level > level)))
+ continue;
+ if (count >= PARTY_BOOKING_RESULTS){
+ more_result = true;
+ break;
+ }
if (mapid == 0 && job == -1)
result_list[count] = pb_ad;
else if (mapid == 0) {
@@ -1234,9 +1274,6 @@ void party_booking_search(struct map_session_data *sd, short level, short mapid,
if (pb_ad->p_detail.mapid == mapid)
result_list[count] = pb_ad;
}
-#else
- result_list[count] = pb_ad;
-#endif
if( result_list[count] )
{
count++;
@@ -1244,20 +1281,38 @@ void party_booking_search(struct map_session_data *sd, short level, short mapid,
}
dbi_destroy(iter);
clif->PartyBookingSearchAck(sd->fd, result_list, count, more_result);
+#else
+ return;
+#endif
}
+
bool party_booking_delete(struct map_session_data *sd)
{
struct party_booking_ad_info* pb_ad;
- if((pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id))!=NULL)
+ if((pb_ad = (struct party_booking_ad_info*)idb_get(party->booking_db, sd->status.char_id))!=NULL)
{
+#ifdef PARTY_RECRUIT
+ clif->PartyRecruitDeleteNotify(sd, pb_ad->index);
+#else
clif->PartyBookingDeleteNotify(sd, pb_ad->index);
- idb_remove(party_booking_db,sd->status.char_id);
+#endif
+ idb_remove(party->booking_db,sd->status.char_id);
}
return true;
}
-
+void do_final_party(void) {
+ party->db->destroy(party->db,party->db_final);
+ db_destroy(party->booking_db); // Party Booking [Spiria]
+}
+// Constructor, init vars
+void do_init_party(void) {
+ party->db = idb_alloc(DB_OPT_RELEASE_DATA);
+ party->booking_db = idb_alloc(DB_OPT_RELEASE_DATA); // Party Booking [Spiria]
+ timer->add_func_list(party->send_xy_timer, "party_send_xy_timer");
+ timer->add_interval(timer->gettick()+battle_config.party_update_interval, party->send_xy_timer, 0, 0, battle_config.party_update_interval);
+}
/*=====================================
* Default Functions : party.h
* Generated by HerculesInterfaceMaker
@@ -1266,10 +1321,14 @@ bool party_booking_delete(struct map_session_data *sd)
void party_defaults(void) {
party = &party_s;
+ /* */
+ party->db = NULL;
+ party->booking_db = NULL;
+ party->booking_nextid = 1;
/* funcs */
-
- party->do_init_party = do_init_party;
- party->do_final_party = do_final_party;
+ party->init = do_init_party;
+ party->final = do_final_party;
+ /* */
party->search = party_search;
party->searchname = party_searchname;
party->getmemberid = party_getmemberid;
@@ -1306,5 +1365,16 @@ void party_defaults(void) {
party->booking_register = party_booking_register;
party->booking_update = party_booking_update;
party->booking_search = party_booking_search;
+ party->recruit_register = party_recruit_register;
+ party->recruit_update = party_recruit_update;
+ party->recruit_search = party_recruit_search;
party->booking_delete = party_booking_delete;
+ party->vforeachsamemap = party_vforeachsamemap;
+ party->foreachsamemap = party_foreachsamemap;
+ party->send_xy_timer = party_send_xy_timer;
+ party->fill_member = party_fill_member;
+ party->sd_check = party_sd_check;
+ party->check_state = party_check_state;
+ party->create_booking_data = create_party_booking_data;
+ party->db_final = party_db_final;
}
diff --git a/src/map/party.h b/src/map/party.h
index 7ade6b841..208edb846 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -1,16 +1,16 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
+
#ifndef _PARTY_H_
#define _PARTY_H_
+
#include "../common/mmo.h" // struct party
#include "../config/core.h"
-struct block_list;
-struct map_session_data;
-struct party;
-struct item;
-
#include <stdarg.h>
+#include "map.h"
+
#define PARTY_BOOKING_JOBS 6
#define PARTY_BOOKING_RESULTS 10
@@ -34,6 +34,8 @@ struct party_data {
} state;
};
+#define PB_NOTICE_LENGTH (36 + 1)
+
#ifndef PARTY_RECRUIT
struct party_booking_detail {
short level;
@@ -47,8 +49,7 @@ struct party_booking_ad_info {
long expiretime;
struct party_booking_detail p_detail;
};
-#else
-#define PB_NOTICE_LENGTH (36 + 1)
+#else /* PARTY_RECRUIT */
struct party_booking_detail {
short level;
char notice[PB_NOTICE_LENGTH];
@@ -60,14 +61,7 @@ struct party_booking_ad_info {
char charname[NAME_LENGTH];
struct party_booking_detail p_detail;
};
-#endif
-
-
-int party_foreachsamemap(int (*func)(struct block_list *,va_list),struct map_session_data *sd,int range,...);
-
-/*==========================================
- * Party Booking in KRO [Spiria]
- *------------------------------------------*/
+#endif /* PARTY_RECRUIT */
/*=====================================
* Interface : party.h
@@ -75,11 +69,13 @@ int party_foreachsamemap(int (*func)(struct block_list *,va_list),struct map_ses
* created by Susu
*-------------------------------------*/
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;
/* funcs */
-
- void (*do_init_party) (void);
- void (*do_final_party) (void);
+ void (*init) (void);
+ void (*final) (void);
+ /* */
struct party_data* (*search) (int party_id);
struct party_data* (*searchname) (const char* str);
int (*getmemberid) (struct party_data* p, struct map_session_data* sd);
@@ -113,16 +109,26 @@ struct party_interface {
int (*share_loot) (struct party_data* p, struct map_session_data* sd, struct item* item_data, int first_charid);
int (*send_dot_remove) (struct map_session_data *sd);
int (*sub_count) (struct block_list *bl, va_list ap);
-#ifndef PARTY_RECRUIT
+ /*==========================================
+ * Party Booking in KRO [Spiria]
+ *------------------------------------------*/
void (*booking_register) (struct map_session_data *sd, short level, short mapid, short* job);
void (*booking_update) (struct map_session_data *sd, short* job);
void (*booking_search) (struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount);
-#else
- void (*booking_register) (struct map_session_data *sd, short level, const char *notice);
- void (*booking_update) (struct map_session_data *sd, const char *notice);
- void (*booking_search) (struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount);
-#endif
+ /* PARTY_RECRUIT */
+ void (*recruit_register) (struct map_session_data *sd, short level, const char *notice);
+ void (*recruit_update) (struct map_session_data *sd, const char *notice);
+ void (*recruit_search) (struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount);
bool (*booking_delete) (struct map_session_data *sd);
+ /* */
+ int (*vforeachsamemap) (int (*func)(struct block_list *,va_list),struct map_session_data *sd,int range, va_list ap);
+ int (*foreachsamemap) (int (*func)(struct block_list *,va_list),struct map_session_data *sd,int range,...);
+ int (*send_xy_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ void (*fill_member) (struct party_member* member, struct map_session_data* sd, unsigned int leader);
+ TBL_PC* (*sd_check) (int party_id, int account_id, int char_id);
+ void (*check_state) (struct party_data *p);
+ struct party_booking_ad_info* (*create_booking_data) (void);
+ int (*db_final) (DBKey key, DBData *data, va_list ap);
};
struct party_interface *party;
diff --git a/src/map/path.c b/src/map/path.c
index 79e004601..a47677cf5 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -68,9 +68,9 @@ int path_blownpos(int16 m,int16 x0,int16 y0,int16 dx,int16 dy,int count)
{
struct map_data *md;
- if( !maplist[m].cell )
+ if( !map->list[m].cell )
return -1;
- md = &maplist[m];
+ md = &map->list[m];
if( count>25 ){ //Cap to prevent too much processing...?
ShowWarning("path_blownpos: count too many %d !\n",count);
@@ -121,9 +121,9 @@ bool path_search_long(struct shootpath_data *spd,int16 m,int16 x0,int16 y0,int16
if( spd == NULL )
spd = &s_spd; // use dummy output variable
- if (!maplist[m].cell)
+ if (!map->list[m].cell)
return false;
- md = &maplist[m];
+ md = &map->list[m];
dx = (x1 - x0);
if (dx < 0) {
@@ -255,9 +255,9 @@ bool path_search(struct walkpath_data *wpd, int16 m, int16 x0, int16 y0, int16 x
if (wpd == NULL)
wpd = &s_wpd; // use dummy output variable
- if (!maplist[m].cell)
+ if (!map->list[m].cell)
return false;
- md = &maplist[m];
+ md = &map->list[m];
#ifdef CELL_NOSTACK
//Do not check starting cell as that would get you stuck.
diff --git a/src/map/pc.c b/src/map/pc.c
index d11eb7e75..6b7d6c735 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -51,45 +51,6 @@
#include <time.h>
-#define PVP_CALCRANK_INTERVAL 1000 // PVP calculation interval
-static unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL];
-static unsigned int max_level[CLASS_COUNT][2];
-static unsigned int statp[MAX_LEVEL+1];
-#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
-static unsigned int level_penalty[3][RC_MAX][MAX_LEVEL*2+1];
-#endif
-
-// h-files are for declarations, not for implementations... [Shinomori]
-struct skill_tree_entry skill_tree[CLASS_COUNT][MAX_SKILL_TREE];
-// timer for night.day implementation
-int day_timer_tid;
-int night_timer_tid;
-
-struct fame_list smith_fame_list[MAX_FAME_LIST];
-struct fame_list chemist_fame_list[MAX_FAME_LIST];
-struct fame_list taekwon_fame_list[MAX_FAME_LIST];
-
-static unsigned short equip_pos[EQI_MAX]={EQP_ACC_L,EQP_ACC_R,EQP_SHOES,EQP_GARMENT,EQP_HEAD_LOW,EQP_HEAD_MID,EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_GARMENT,EQP_AMMO};
-
-//Links related info to the sd->hate_mob[]/sd->feel_map[] entries
-const struct sg_data sg_info[MAX_PC_FEELHATE] = {
- { SG_SUN_ANGER, SG_SUN_BLESS, SG_SUN_COMFORT, "PC_FEEL_SUN", "PC_HATE_MOB_SUN", is_day_of_sun },
- { SG_MOON_ANGER, SG_MOON_BLESS, SG_MOON_COMFORT, "PC_FEEL_MOON", "PC_HATE_MOB_MOON", is_day_of_moon },
- { SG_STAR_ANGER, SG_STAR_BLESS, SG_STAR_COMFORT, "PC_FEEL_STAR", "PC_HATE_MOB_STAR", is_day_of_star }
- };
-
-/**
- * Item Cool Down Delay Saving
- * Struct item_cd is not a member of struct map_session_data
- * to keep cooldowns in memory between player log-ins.
- * All cooldowns are reset when server is restarted.
- **/
-DBMap* itemcd_db = NULL; // char_id -> struct skill_cd
-struct item_cd {
- unsigned int tick[MAX_ITEMDELAYS];//tick
- short nameid[MAX_ITEMDELAYS];//skill id
-};
-
struct pc_interface pc_s;
//Converts a class to its array index for CLASS_COUNT defined arrays.
@@ -156,7 +117,7 @@ bool pc_should_log_commands(struct map_session_data *sd)
return pc_group_should_log_commands(sd->group);
}
-static int pc_invincible_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_invincible_timer(int tid, unsigned int tick, int id, intptr_t data) {
struct map_session_data *sd;
if( (sd=(struct map_session_data *)map->id2sd(id)) == NULL || sd->bl.type!=BL_PC )
@@ -175,11 +136,11 @@ static int pc_invincible_timer(int tid, unsigned int tick, int id, intptr_t data
void pc_setinvincibletimer(struct map_session_data* sd, int val) {
nullpo_retv(sd);
- val += maplist[sd->bl.m].invincible_time_inc;
+ val += map->list[sd->bl.m].invincible_time_inc;
if( sd->invincible_timer != INVALID_TIMER )
- timer->delete(sd->invincible_timer,pc_invincible_timer);
- sd->invincible_timer = timer->add(timer->gettick()+val,pc_invincible_timer,sd->bl.id,0);
+ timer->delete(sd->invincible_timer,pc->invincible_timer);
+ sd->invincible_timer = timer->add(timer->gettick()+val,pc->invincible_timer,sd->bl.id,0);
}
void pc_delinvincibletimer(struct map_session_data* sd)
@@ -188,13 +149,13 @@ void pc_delinvincibletimer(struct map_session_data* sd)
if( sd->invincible_timer != INVALID_TIMER )
{
- timer->delete(sd->invincible_timer,pc_invincible_timer);
+ timer->delete(sd->invincible_timer,pc->invincible_timer);
sd->invincible_timer = INVALID_TIMER;
skill->unit_move(&sd->bl,timer->gettick(),1);
}
}
-static int pc_spiritball_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_spiritball_timer(int tid, unsigned int tick, int id, intptr_t data) {
struct map_session_data *sd;
int i;
@@ -238,14 +199,14 @@ int pc_addspiritball(struct map_session_data *sd,int interval,int max)
if( sd->spiritball && sd->spiritball >= max ) {
if(sd->spirit_timer[0] != INVALID_TIMER)
- timer->delete(sd->spirit_timer[0],pc_spiritball_timer);
+ timer->delete(sd->spirit_timer[0],pc->spiritball_timer);
sd->spiritball--;
if( sd->spiritball != 0 )
memmove(sd->spirit_timer+0, sd->spirit_timer+1, (sd->spiritball)*sizeof(int));
sd->spirit_timer[sd->spiritball] = INVALID_TIMER;
}
- tid = timer->add(timer->gettick()+interval, pc_spiritball_timer, sd->bl.id, 0);
+ tid = timer->add(timer->gettick()+interval, pc->spiritball_timer, sd->bl.id, 0);
ARR_FIND(0, sd->spiritball, i, sd->spirit_timer[i] == INVALID_TIMER || DIFF_TICK(timer->get(tid)->tick, timer->get(sd->spirit_timer[i])->tick) < 0);
if( i != sd->spiritball )
memmove(sd->spirit_timer+i+1, sd->spirit_timer+i, (sd->spiritball-i)*sizeof(int));
@@ -280,7 +241,7 @@ int pc_delspiritball(struct map_session_data *sd,int count,int type)
for(i=0;i<count;i++) {
if(sd->spirit_timer[i] != INVALID_TIMER) {
- timer->delete(sd->spirit_timer[i],pc_spiritball_timer);
+ timer->delete(sd->spirit_timer[i],pc->spiritball_timer);
sd->spirit_timer[i] = INVALID_TIMER;
}
}
@@ -297,7 +258,7 @@ int pc_delspiritball(struct map_session_data *sd,int count,int type)
}
return 0;
}
-static int pc_check_banding( struct block_list *bl, va_list ap ) {
+int pc_check_banding( struct block_list *bl, va_list ap ) {
int *c, *b_sd;
struct block_list *src;
struct map_session_data *tsd;
@@ -337,7 +298,7 @@ int pc_banding(struct map_session_data *sd, uint16 skill_lv) {
c = 0;
memset(b_sd, 0, sizeof(b_sd));
- i = party_foreachsamemap(pc_check_banding,sd,range,&sd->bl,&c,&b_sd);
+ i = party->foreachsamemap(pc->check_banding,sd,range,&sd->bl,&c,&b_sd);
if( c < 1 ) {
//just recalc status no need to recalc hp
@@ -415,19 +376,19 @@ unsigned char pc_famerank(int char_id, int job)
switch(job){
case MAPID_BLACKSMITH: // Blacksmith
for(i = 0; i < MAX_FAME_LIST; i++){
- if(smith_fame_list[i].id == char_id)
+ if(pc->smith_fame_list[i].id == char_id)
return i + 1;
}
break;
case MAPID_ALCHEMIST: // Alchemist
for(i = 0; i < MAX_FAME_LIST; i++){
- if(chemist_fame_list[i].id == char_id)
+ if(pc->chemist_fame_list[i].id == char_id)
return i + 1;
}
break;
case MAPID_TAEKWON: // Taekwon
for(i = 0; i < MAX_FAME_LIST; i++){
- if(taekwon_fame_list[i].id == char_id)
+ if(pc->taekwon_fame_list[i].id == char_id)
return i + 1;
}
break;
@@ -458,7 +419,7 @@ int pc_setrestartvalue(struct map_session_data *sd,int type) {
/*==========================================
Rental System
*------------------------------------------*/
-static int pc_inventory_rental_end(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_inventory_rental_end(int tid, unsigned int tick, int id, intptr_t data) {
struct map_session_data *sd = map->id2sd(id);
if( sd == NULL )
return 0;
@@ -476,7 +437,7 @@ int pc_inventory_rental_clear(struct map_session_data *sd)
{
if( sd->rental_timer != INVALID_TIMER )
{
- timer->delete(sd->rental_timer, pc_inventory_rental_end);
+ timer->delete(sd->rental_timer, pc->inventory_rental_end);
sd->rental_timer = INVALID_TIMER;
}
@@ -511,7 +472,7 @@ void pc_inventory_rentals(struct map_session_data *sd)
}
if( c > 0 ) // min(next_tick,3600000) 1 hour each timer to keep announcing to the owner, and to avoid a but with rental time > 15 days
- sd->rental_timer = timer->add(timer->gettick() + min(next_tick,3600000), pc_inventory_rental_end, sd->bl.id, 0);
+ sd->rental_timer = timer->add(timer->gettick() + min(next_tick,3600000), pc->inventory_rental_end, sd->bl.id, 0);
else
sd->rental_timer = INVALID_TIMER;
}
@@ -530,11 +491,11 @@ void pc_inventory_rental_add(struct map_session_data *sd, int seconds)
if( DIFF_TICK(td->tick, timer->gettick()) > tick )
{ // Update Timer as this one ends first than the current one
pc->inventory_rental_clear(sd);
- sd->rental_timer = timer->add(timer->gettick() + tick, pc_inventory_rental_end, sd->bl.id, 0);
+ sd->rental_timer = timer->add(timer->gettick() + tick, pc->inventory_rental_end, sd->bl.id, 0);
}
}
else
- sd->rental_timer = timer->add(timer->gettick() + min(tick,3600000), pc_inventory_rental_end, sd->bl.id, 0);
+ sd->rental_timer = timer->add(timer->gettick() + min(tick,3600000), pc->inventory_rental_end, sd->bl.id, 0);
}
/**
@@ -586,8 +547,8 @@ int pc_makesavestatus(struct map_session_data *sd)
sd->status.last_point.y = sd->bl.y;
}
- if(maplist[sd->bl.m].flag.nosave || maplist[sd->bl.m].instance_id >= 0) {
- struct map_data *m=&maplist[sd->bl.m];
+ if(map->list[sd->bl.m].flag.nosave || map->list[sd->bl.m].instance_id >= 0) {
+ struct map_data *m=&map->list[sd->bl.m];
if(m->save.map)
memcpy(&sd->status.last_point,&m->save,sizeof(sd->status.last_point));
else
@@ -683,26 +644,26 @@ int pc_calcweapontype(struct map_session_data *sd)
// dual-wield
sd->status.weapon = 0;
switch (sd->weapontype1){
- case W_DAGGER:
- switch (sd->weapontype2) {
- case W_DAGGER: sd->status.weapon = W_DOUBLE_DD; break;
- case W_1HSWORD: sd->status.weapon = W_DOUBLE_DS; break;
- case W_1HAXE: sd->status.weapon = W_DOUBLE_DA; break;
- }
- break;
- case W_1HSWORD:
- switch (sd->weapontype2) {
- case W_DAGGER: sd->status.weapon = W_DOUBLE_DS; break;
- case W_1HSWORD: sd->status.weapon = W_DOUBLE_SS; break;
- case W_1HAXE: sd->status.weapon = W_DOUBLE_SA; break;
- }
- break;
- case W_1HAXE:
- switch (sd->weapontype2) {
- case W_DAGGER: sd->status.weapon = W_DOUBLE_DA; break;
- case W_1HSWORD: sd->status.weapon = W_DOUBLE_SA; break;
- case W_1HAXE: sd->status.weapon = W_DOUBLE_AA; break;
- }
+ case W_DAGGER:
+ switch (sd->weapontype2) {
+ case W_DAGGER: sd->status.weapon = W_DOUBLE_DD; break;
+ case W_1HSWORD: sd->status.weapon = W_DOUBLE_DS; break;
+ case W_1HAXE: sd->status.weapon = W_DOUBLE_DA; break;
+ }
+ break;
+ case W_1HSWORD:
+ switch (sd->weapontype2) {
+ case W_DAGGER: sd->status.weapon = W_DOUBLE_DS; break;
+ case W_1HSWORD: sd->status.weapon = W_DOUBLE_SS; break;
+ case W_1HAXE: sd->status.weapon = W_DOUBLE_SA; break;
+ }
+ break;
+ case W_1HAXE:
+ switch (sd->weapontype2) {
+ case W_DAGGER: sd->status.weapon = W_DOUBLE_DA; break;
+ case W_1HSWORD: sd->status.weapon = W_DOUBLE_SA; break;
+ case W_1HAXE: sd->status.weapon = W_DOUBLE_AA; break;
+ }
}
// unknown, default to right hand type
if (!sd->status.weapon)
@@ -725,7 +686,7 @@ int pc_setequipindex(struct map_session_data *sd)
continue;
if(sd->status.inventory[i].equip) {
for(j=0;j<EQI_MAX;j++)
- if(sd->status.inventory[i].equip & equip_pos[j])
+ if(sd->status.inventory[i].equip & pc->equip_pos[j])
sd->equip_index[j] = i;
if(sd->status.inventory[i].equip & EQP_HAND_R)
@@ -745,7 +706,7 @@ int pc_setequipindex(struct map_session_data *sd)
}
}
}
- pc_calcweapontype(sd);
+ pc->calcweapontype(sd);
return 0;
}
@@ -1205,7 +1166,7 @@ int pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl)
return 0; //Wrong size
}
sd->hate_mob[pos] = class_;
- pc_setglobalreg(sd,sg_info[pos].hate_var,class_+1);
+ pc_setglobalreg(sd,pc->sg_info[pos].hate_var,class_+1);
clif->hate_info(sd, pos, class_, 1);
return 1;
}
@@ -1236,14 +1197,14 @@ int pc_reg_received(struct map_session_data *sd)
//SG map and mob read [Komurka]
for(i=0;i<MAX_PC_FEELHATE;i++) { //for now - someone need to make reading from txt/sql
- if ((j = pc_readglobalreg(sd,sg_info[i].feel_var))!=0) {
+ if ((j = pc_readglobalreg(sd,pc->sg_info[i].feel_var))!=0) {
sd->feel_map[i].index = j;
sd->feel_map[i].m = map->mapindex2mapid(j);
} else {
sd->feel_map[i].index = 0;
sd->feel_map[i].m = -1;
}
- sd->hate_mob[i] = pc_readglobalreg(sd,sg_info[i].hate_var)-1;
+ sd->hate_mob[i] = pc_readglobalreg(sd,pc->sg_info[i].hate_var)-1;
}
if ((i = pc->checkskill(sd,RG_PLAGIARISM)) > 0) {
@@ -1312,9 +1273,9 @@ int pc_reg_received(struct map_session_data *sd)
sd->vd.class_ = INVISIBLE_CLASS;
clif->message(sd->fd, msg_txt(11)); // Invisible: On
// decrement the number of pvp players on the map
- maplist[sd->bl.m].users_pvp--;
+ map->list[sd->bl.m].users_pvp--;
- if( maplist[sd->bl.m].flag.pvp && !maplist[sd->bl.m].flag.pvp_nocalcrank && sd->pvp_timer != INVALID_TIMER ) {// unregister the player for ranking
+ if( map->list[sd->bl.m].flag.pvp && !map->list[sd->bl.m].flag.pvp_nocalcrank && sd->pvp_timer != INVALID_TIMER ) {// unregister the player for ranking
timer->delete( sd->pvp_timer, pc->calc_pvprank_timer );
sd->pvp_timer = INVALID_TIMER;
}
@@ -1447,8 +1408,8 @@ int pc_calc_skilltree(struct map_session_data *sd)
do {
flag = 0;
- for( i = 0; i < MAX_SKILL_TREE && (id = skill_tree[c][i].id) > 0; i++ ) {
- int f, idx = skill_tree[c][i].idx;
+ for( i = 0; i < MAX_SKILL_TREE && (id = pc->skill_tree[c][i].id) > 0; i++ ) {
+ int f, idx = pc->skill_tree[c][i].idx;
if( sd->status.skill[idx].id )
continue; //Skill already known.
@@ -1457,21 +1418,21 @@ int pc_calc_skilltree(struct map_session_data *sd)
int j;
for(j = 0; j < MAX_PC_SKILL_REQUIRE; j++) {
int k;
- if((k=skill_tree[c][i].need[j].id)) {
- int idx2 = skill_tree[c][i].need[j].idx;
+ if((k=pc->skill_tree[c][i].need[j].id)) {
+ int idx2 = pc->skill_tree[c][i].need[j].idx;
if (sd->status.skill[idx2].id == 0 || sd->status.skill[idx2].flag == SKILL_FLAG_TEMPORARY || sd->status.skill[idx2].flag == SKILL_FLAG_PLAGIARIZED)
k = 0; //Not learned.
else if (sd->status.skill[idx2].flag >= SKILL_FLAG_REPLACED_LV_0) //Real lerned level
k = sd->status.skill[idx2].flag - SKILL_FLAG_REPLACED_LV_0;
else
k = pc->checkskill2(sd,idx2);
- if (k < skill_tree[c][i].need[j].lv) {
+ if (k < pc->skill_tree[c][i].need[j].lv) {
f = 0;
break;
}
}
}
- if( sd->status.job_level < skill_tree[c][i].joblv )
+ if( sd->status.job_level < pc->skill_tree[c][i].joblv )
f = 0; // job level requirement wasn't satisfied
}
if( f ) {
@@ -1505,8 +1466,8 @@ int pc_calc_skilltree(struct map_session_data *sd)
- (c > 0) to avoid grant Novice Skill Tree in case of Skill Reset (need more logic)
- (sd->status.skill_point == 0) to wait until all skill points are asigned to avoid problems with Job Change quest. */
- for( i = 0; i < MAX_SKILL_TREE && (id = skill_tree[c][i].id) > 0; i++ ) {
- int idx = skill_tree[c][i].idx;
+ for( i = 0; i < MAX_SKILL_TREE && (id = pc->skill_tree[c][i].id) > 0; i++ ) {
+ int idx = pc->skill_tree[c][i].idx;
if( (skill->db[idx].inf2&(INF2_QUEST_SKILL|INF2_WEDDING_SKILL)) )
continue; //Do not include Quest/Wedding skills.
@@ -1525,7 +1486,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
}
//Checks if you can learn a new skill after having leveled up a skill.
-static void pc_check_skilltree(struct map_session_data *sd, int skill_id)
+void pc_check_skilltree(struct map_session_data *sd, int skill_id)
{
int i,id=0,flag;
int c=0;
@@ -1542,22 +1503,22 @@ static void pc_check_skilltree(struct map_session_data *sd, int skill_id)
c = pc->class2idx(c);
do {
flag = 0;
- for( i = 0; i < MAX_SKILL_TREE && (id=skill_tree[c][i].id)>0; i++ ) {
- int j, f = 1, k, idx = skill_tree[c][i].idx;
+ for( i = 0; i < MAX_SKILL_TREE && (id=pc->skill_tree[c][i].id)>0; i++ ) {
+ int j, f = 1, k, idx = pc->skill_tree[c][i].idx;
if( sd->status.skill[idx].id ) //Already learned
continue;
for( j = 0; j < MAX_PC_SKILL_REQUIRE; j++ ) {
- if( (k = skill_tree[c][i].need[j].id) ) {
- int idx2 = skill_tree[c][i].need[j].idx;
+ if( (k = pc->skill_tree[c][i].need[j].id) ) {
+ int idx2 = pc->skill_tree[c][i].need[j].idx;
if( sd->status.skill[idx2].id == 0 || sd->status.skill[idx2].flag == SKILL_FLAG_TEMPORARY || sd->status.skill[idx2].flag == SKILL_FLAG_PLAGIARIZED )
k = 0; //Not learned.
else if( sd->status.skill[idx2].flag >= SKILL_FLAG_REPLACED_LV_0) //Real lerned level
k = sd->status.skill[idx2].flag - SKILL_FLAG_REPLACED_LV_0;
else
k = pc->checkskill2(sd,idx2);
- if( k < skill_tree[c][i].need[j].lv ) {
+ if( k < pc->skill_tree[c][i].need[j].lv ) {
f = 0;
break;
}
@@ -1565,7 +1526,7 @@ static void pc_check_skilltree(struct map_session_data *sd, int skill_id)
}
if( !f )
continue;
- if( sd->status.job_level < skill_tree[c][i].joblv )
+ if( sd->status.job_level < pc->skill_tree[c][i].joblv )
continue;
j = skill->db[idx].inf2;
@@ -1612,7 +1573,7 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd)
skill_point = pc->calc_skillpoint(sd);
- novice_skills = max_level[pc->class2idx(JOB_NOVICE)][1] - 1;
+ novice_skills = pc->max_level[pc->class2idx(JOB_NOVICE)][1] - 1;
sd->sktree.second = sd->sktree.third = 0;
@@ -1630,7 +1591,7 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd)
{
// if neither 2nd nor 3rd jobchange levels are known, we have to assume a default for 2nd
if (!sd->change_level_3rd)
- sd->change_level_2nd = max_level[pc->class2idx(pc->mapid2jobid(sd->class_&MAPID_UPPERMASK, sd->status.sex))][1];
+ sd->change_level_2nd = pc->max_level[pc->class2idx(pc->mapid2jobid(sd->class_&MAPID_UPPERMASK, sd->status.sex))][1];
else
sd->change_level_2nd = 1 + skill_point + sd->status.skill_point
- (sd->status.job_level - 1)
@@ -1759,7 +1720,7 @@ int pc_disguise(struct map_session_data *sd, int class_) {
return 1;
}
-static int pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv, short rate, short flag, short card_id)
+int pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv, short rate, short flag, short card_id)
{
int i;
@@ -1795,7 +1756,7 @@ static int pc_bonus_autospell(struct s_autospell *spell, int max, short id, shor
return 1;
}
-static int pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, short card_id)
+int pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, short card_id)
{
int i;
@@ -1821,7 +1782,7 @@ static int pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short
return 1;
}
-static int pc_bonus_addeff(struct s_addeffect* effect, int max, enum sc_type id, short rate, short arrow_rate, unsigned char flag)
+int pc_bonus_addeff(struct s_addeffect* effect, int max, enum sc_type id, short rate, short arrow_rate, unsigned char flag)
{
int i;
if (!(flag&(ATF_SHORT|ATF_LONG)))
@@ -1850,7 +1811,7 @@ static int pc_bonus_addeff(struct s_addeffect* effect, int max, enum sc_type id,
return 1;
}
-static int pc_bonus_addeff_onskill(struct s_addeffectonskill* effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target) {
+int pc_bonus_addeff_onskill(struct s_addeffectonskill* effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target) {
int i;
for( i = 0; i < max && effect[i].skill; i++ ) {
if( effect[i].id == id && effect[i].skill == skill_id && effect[i].target == target ) {
@@ -1869,7 +1830,7 @@ static int pc_bonus_addeff_onskill(struct s_addeffectonskill* effect, int max, e
return 1;
}
-static int pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, short group, int race, int rate) {
+int pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, short group, int race, int rate) {
int i;
//Apply config rate adjustment settings.
@@ -2695,7 +2656,7 @@ int pc_bonus(struct map_session_data *sd,int type,int val) {
#endif
case SP_ADD_MONSTER_DROP_CHAINITEM:
if (sd->state.lr_flag != 2)
- pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), 0, val, (1<<RC_BOSS)|(1<<RC_NONBOSS), 10000);
+ pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), 0, val, (1<<RC_BOSS)|(1<<RC_NONBOSS), 10000);
break;
default:
ShowWarning("pc_bonus: unknown type %d %d !\n",type,val);
@@ -2759,7 +2720,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
ShowWarning("pc_bonus2 (Add Effect): %d is not supported.\n", type2);
break;
}
- pc_bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), (sc_type)type2,
+ pc->bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), (sc_type)type2,
sd->state.lr_flag!=2?val:0, sd->state.lr_flag==2?val:0, 0);
break;
case SP_ADDEFF2:
@@ -2767,7 +2728,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
ShowWarning("pc_bonus2 (Add Effect2): %d is not supported.\n", type2);
break;
}
- pc_bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), (sc_type)type2,
+ pc->bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), (sc_type)type2,
sd->state.lr_flag!=2?val:0, sd->state.lr_flag==2?val:0, ATF_SELF);
break;
case SP_RESEFF:
@@ -2978,7 +2939,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
break;
}
if(sd->state.lr_flag != 2)
- pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), (sc_type)type2, val, 0, 0);
+ pc->bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), (sc_type)type2, val, 0, 0);
break;
case SP_SKILL_ATK:
if(sd->state.lr_flag == 2)
@@ -3148,7 +3109,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
break;
case SP_ADD_MONSTER_DROP_ITEM:
if (sd->state.lr_flag != 2)
- pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, (1<<RC_BOSS)|(1<<RC_NONBOSS), val);
+ pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, (1<<RC_BOSS)|(1<<RC_NONBOSS), val);
break;
case SP_SP_LOSS_RATE:
if(sd->state.lr_flag != 2) {
@@ -3292,7 +3253,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
break;
case SP_ADD_MONSTER_DROP_CHAINITEM:
if (sd->state.lr_flag != 2)
- pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), 0, val, 1<<type2, 10000);
+ pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), 0, val, 1<<type2, 10000);
break;
default:
ShowWarning("pc_bonus2: unknown type %d %d %d!\n",type,type2,val);
@@ -3308,18 +3269,18 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
switch(type){
case SP_ADD_MONSTER_DROP_ITEM:
if(sd->state.lr_flag != 2)
- pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, 1<<type3, val);
+ pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, 1<<type3, val);
break;
case SP_ADD_CLASS_DROP_ITEM:
if(sd->state.lr_flag != 2)
- pc_bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, -type3, val);
+ pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), type2, 0, -type3, val);
break;
case SP_AUTOSPELL:
if(sd->state.lr_flag != 2)
{
int target = skill->get_inf(type2); //Support or Self (non-auto-target) skills should pick self.
target = target&INF_SUPPORT_SKILL || (target&INF_SELF_SKILL && !(skill->get_inf2(type2)&INF2_NO_TARGET_SELF));
- pc_bonus_autospell(sd->autospell, ARRAYLENGTH(sd->autospell),
+ pc->bonus_autospell(sd->autospell, ARRAYLENGTH(sd->autospell),
target?-type2:type2, type3, val, 0, status->current_equip_card_id);
}
break;
@@ -3328,7 +3289,7 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
{
int target = skill->get_inf(type2); //Support or Self (non-auto-target) skills should pick self.
target = target&INF_SUPPORT_SKILL || (target&INF_SELF_SKILL && !(skill->get_inf2(type2)&INF2_NO_TARGET_SELF));
- pc_bonus_autospell(sd->autospell2, ARRAYLENGTH(sd->autospell2),
+ pc->bonus_autospell(sd->autospell2, ARRAYLENGTH(sd->autospell2),
target?-type2:type2, type3, val, BF_NORMAL|BF_SKILL, status->current_equip_card_id);
}
break;
@@ -3376,7 +3337,7 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
ShowWarning("pc_bonus3 (Add Effect): %d is not supported.\n", type2);
break;
}
- pc_bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), (sc_type)type2,
+ pc->bonus_addeff(sd->addeff, ARRAYLENGTH(sd->addeff), (sc_type)type2,
sd->state.lr_flag!=2?type3:0, sd->state.lr_flag==2?type3:0, val);
break;
@@ -3386,7 +3347,7 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
break;
}
if(sd->state.lr_flag != 2)
- pc_bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), (sc_type)type2, type3, 0, val);
+ pc->bonus_addeff(sd->addeff2, ARRAYLENGTH(sd->addeff2), (sc_type)type2, type3, 0, val);
break;
case SP_ADDEFF_ONSKILL:
@@ -3395,7 +3356,7 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
break;
}
if( sd->state.lr_flag != 2 )
- pc_bonus_addeff_onskill(sd->addeff3, ARRAYLENGTH(sd->addeff3), (sc_type)type3, val, type2, ATF_TARGET);
+ pc->bonus_addeff_onskill(sd->addeff3, ARRAYLENGTH(sd->addeff3), (sc_type)type3, val, type2, ATF_TARGET);
break;
case SP_ADDELE:
@@ -3430,12 +3391,12 @@ int pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type4
switch(type) {
case SP_AUTOSPELL:
if(sd->state.lr_flag != 2)
- pc_bonus_autospell(sd->autospell, ARRAYLENGTH(sd->autospell), (val&1?type2:-type2), (val&2?-type3:type3), type4, 0, status->current_equip_card_id);
+ pc->bonus_autospell(sd->autospell, ARRAYLENGTH(sd->autospell), (val&1?type2:-type2), (val&2?-type3:type3), type4, 0, status->current_equip_card_id);
break;
case SP_AUTOSPELL_WHENHIT:
if(sd->state.lr_flag != 2)
- pc_bonus_autospell(sd->autospell2, ARRAYLENGTH(sd->autospell2), (val&1?type2:-type2), (val&2?-type3:type3), type4, BF_NORMAL|BF_SKILL, status->current_equip_card_id);
+ pc->bonus_autospell(sd->autospell2, ARRAYLENGTH(sd->autospell2), (val&1?type2:-type2), (val&2?-type3:type3), type4, BF_NORMAL|BF_SKILL, status->current_equip_card_id);
break;
case SP_AUTOSPELL_ONSKILL:
@@ -3443,7 +3404,7 @@ int pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type4
int target = skill->get_inf(type2); //Support or Self (non-auto-target) skills should pick self.
target = target&INF_SUPPORT_SKILL || (target&INF_SELF_SKILL && !(skill->get_inf2(type2)&INF2_NO_TARGET_SELF));
- pc_bonus_autospell_onskill(sd->autospell3, ARRAYLENGTH(sd->autospell3), type2, target?-type3:type3, type4, val, status->current_equip_card_id);
+ pc->bonus_autospell_onskill(sd->autospell3, ARRAYLENGTH(sd->autospell3), type2, target?-type3:type3, type4, val, status->current_equip_card_id);
}
break;
@@ -3453,7 +3414,7 @@ int pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type4
break;
}
if( sd->state.lr_flag != 2 )
- pc_bonus_addeff_onskill(sd->addeff3, ARRAYLENGTH(sd->addeff3), (sc_type)type3, type4, type2, val);
+ pc->bonus_addeff_onskill(sd->addeff3, ARRAYLENGTH(sd->addeff3), (sc_type)type3, type4, type2, val);
break;
default:
@@ -3470,17 +3431,17 @@ int pc_bonus5(struct map_session_data *sd,int type,int type2,int type3,int type4
switch(type){
case SP_AUTOSPELL:
if(sd->state.lr_flag != 2)
- pc_bonus_autospell(sd->autospell, ARRAYLENGTH(sd->autospell), (val&1?type2:-type2), (val&2?-type3:type3), type4, type5, status->current_equip_card_id);
+ pc->bonus_autospell(sd->autospell, ARRAYLENGTH(sd->autospell), (val&1?type2:-type2), (val&2?-type3:type3), type4, type5, status->current_equip_card_id);
break;
case SP_AUTOSPELL_WHENHIT:
if(sd->state.lr_flag != 2)
- pc_bonus_autospell(sd->autospell2, ARRAYLENGTH(sd->autospell2), (val&1?type2:-type2), (val&2?-type3:type3), type4, type5, status->current_equip_card_id);
+ pc->bonus_autospell(sd->autospell2, ARRAYLENGTH(sd->autospell2), (val&1?type2:-type2), (val&2?-type3:type3), type4, type5, status->current_equip_card_id);
break;
case SP_AUTOSPELL_ONSKILL:
if(sd->state.lr_flag != 2)
- pc_bonus_autospell_onskill(sd->autospell3, ARRAYLENGTH(sd->autospell3), type2, (val&1?-type3:type3), (val&2?-type4:type4), type5, status->current_equip_card_id);
+ pc->bonus_autospell_onskill(sd->autospell3, ARRAYLENGTH(sd->autospell3), type2, (val&1?-type3:type3), (val&2?-type4:type4), type5, status->current_equip_card_id);
break;
default:
@@ -4037,7 +3998,7 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount)
)
return 0;
- if( maplist[sd->bl.m].flag.nodrop ) {
+ if( map->list[sd->bl.m].flag.nodrop ) {
clif->message (sd->fd, msg_txt(271));
return 0; //Can't drop items in nodrop mapflag maps.
}
@@ -4165,7 +4126,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
break;
case 601: // Fly Wing
case 12212: // Giant Fly Wing
- if( maplist[sd->bl.m].flag.noteleport || map_flag_gvg2(sd->bl.m) ) {
+ if( map->list[sd->bl.m].flag.noteleport || map_flag_gvg2(sd->bl.m) ) {
clif->skill_mapinfomessage(sd,0);
return 0;
}
@@ -4182,14 +4143,14 @@ int pc_isUseitem(struct map_session_data *sd,int n)
clif->message(sd->fd, msg_txt(663));
return 0;
}
- if( nameid != 601 && nameid != 12212 && maplist[sd->bl.m].flag.noreturn )
+ if( nameid != 601 && nameid != 12212 && map->list[sd->bl.m].flag.noreturn )
return 0;
break;
case 604: // Dead Branch
case 12024: // Red Pouch
case 12103: // Bloody Branch
case 12109: // Poring Box
- if( maplist[sd->bl.m].flag.nobranch || map_flag_gvg2(sd->bl.m) )
+ if( map->list[sd->bl.m].flag.nobranch || map_flag_gvg2(sd->bl.m) )
return 0;
break;
case 12210: // Bubble Gum
@@ -4230,7 +4191,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
break;
case 12213: //Neuralizer
- if( !maplist[sd->bl.m].flag.reset )
+ if( !map->list[sd->bl.m].flag.reset )
return 0;
break;
}
@@ -4332,7 +4293,7 @@ int pc_useitem(struct map_session_data *sd,int n) {
if( sd->status.inventory[n].nameid <= 0 || sd->status.inventory[n].amount <= 0 )
return 0;
- if( !pc_isUseitem(sd,n) )
+ if( !pc->isUseitem(sd,n) )
return 0;
// Store information for later use before it is lost (via pc->delitem) [Paradox924X]
@@ -4404,8 +4365,8 @@ int pc_useitem(struct map_session_data *sd,int n) {
}
/* on restricted maps the item is consumed but the effect is not used */
- for(i = 0; i < maplist[sd->bl.m].zone->disabled_items_count; i++) {
- if( maplist[sd->bl.m].zone->disabled_items[i] == nameid ) {
+ for(i = 0; i < map->list[sd->bl.m].zone->disabled_items_count; i++) {
+ if( map->list[sd->bl.m].zone->disabled_items[i] == nameid ) {
clif->msg(sd, ITEM_CANT_USE_AREA); // This item cannot be used within this area
if( battle_config.item_restricted_consumption_type ) {
clif->useitemack(sd,n,sd->status.inventory[n].amount-1,true);
@@ -4675,7 +4636,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil
md_status= status->get_status_data(bl);
if( md->master_id || md_status->mode&MD_BOSS || mob_is_treasure(md) ||
- maplist[bl->m].flag.nomobloot || // check noloot map flag [Lorky]
+ map->list[bl->m].flag.nomobloot || // check noloot map flag [Lorky]
(battle_config.skill_steal_max_tries && //Reached limit of steal attempts. [Lupus]
md->state.steal_flag++ >= battle_config.skill_steal_max_tries)
) { //Can't steal from
@@ -4714,7 +4675,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil
}
if(battle_config.show_steal_in_same_party)
- party_foreachsamemap(pc_show_steal,sd,AREA_SIZE,sd,tmp_item.nameid);
+ party->foreachsamemap(pc->show_steal,sd,AREA_SIZE,sd,tmp_item.nameid);
//Logs items, Stolen from mobs [Lupus]
logs->pick_mob(md, LOG_TYPE_STEAL, -1, &tmp_item, data);
@@ -4783,7 +4744,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
pc->setrestartvalue(sd,1);
}
- if( maplist[m].flag.src4instance ) {
+ if( map->list[m].flag.src4instance ) {
struct party_data *p;
bool stop = false;
int i = 0, j = 0;
@@ -4791,13 +4752,13 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
if( sd->instances ) {
for( i = 0; i < sd->instances; i++ ) {
if( sd->instance[i] >= 0 ) {
- ARR_FIND(0, instances[sd->instance[i]].num_map, j, maplist[instances[sd->instance[i]].map[j]].instance_src_map == m && !maplist[instances[sd->instance[i]].map[j]].custom_name);
- if( j != instances[sd->instance[i]].num_map )
+ ARR_FIND(0, instance->list[sd->instance[i]].num_map, j, map->list[instance->list[sd->instance[i]].map[j]].instance_src_map == m && !map->list[instance->list[sd->instance[i]].map[j]].custom_name);
+ if( j != instance->list[sd->instance[i]].num_map )
break;
}
}
if( i != sd->instances ) {
- m = instances[sd->instance[i]].map[j];
+ m = instance->list[sd->instance[i]].map[j];
mapindex = map_id2index(m);
stop = true;
}
@@ -4805,13 +4766,13 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
if ( !stop && sd->status.party_id && (p = party->search(sd->status.party_id)) && p->instances ) {
for( i = 0; i < p->instances; i++ ) {
if( p->instance[i] >= 0 ) {
- ARR_FIND(0, instances[p->instance[i]].num_map, j, maplist[instances[p->instance[i]].map[j]].instance_src_map == m && !maplist[instances[p->instance[i]].map[j]].custom_name);
- if( j != instances[p->instance[i]].num_map )
+ ARR_FIND(0, instance->list[p->instance[i]].num_map, j, map->list[instance->list[p->instance[i]].map[j]].instance_src_map == m && !map->list[instance->list[p->instance[i]].map[j]].custom_name);
+ if( j != instance->list[p->instance[i]].num_map )
break;
}
}
if( i != p->instances ) {
- m = instances[p->instance[i]].map[j];
+ m = instance->list[p->instance[i]].map[j];
mapindex = map_id2index(m);
stop = true;
}
@@ -4819,13 +4780,13 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
if ( !stop && sd->status.guild_id && sd->guild && sd->guild->instances ) {
for( i = 0; i < sd->guild->instances; i++ ) {
if( sd->guild->instance[i] >= 0 ) {
- ARR_FIND(0, instances[sd->guild->instance[i]].num_map, j, maplist[instances[sd->guild->instance[i]].map[j]].instance_src_map == m && !maplist[instances[sd->guild->instance[i]].map[j]].custom_name);
- if( j != instances[sd->guild->instance[i]].num_map )
+ ARR_FIND(0, instance->list[sd->guild->instance[i]].num_map, j, map->list[instance->list[sd->guild->instance[i]].map[j]].instance_src_map == m && !map->list[instance->list[sd->guild->instance[i]].map[j]].custom_name);
+ if( j != instance->list[sd->guild->instance[i]].num_map )
break;
}
}
if( i != sd->guild->instances ) {
- m = instances[sd->guild->instance[i]].map[j];
+ m = instance->list[sd->guild->instance[i]].map[j];
mapindex = map_id2index(m);
stop = true;
}
@@ -4842,13 +4803,13 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
for( i = 0; i < sd->queues_count; i++ ) {
struct hQueue *queue;
if( (queue = script->queue(sd->queues[i])) && queue->onMapChange[0] != '\0' ) {
- pc->setregstr(sd, script->add_str("QMapChangeTo"), maplist[m].name);
+ pc->setregstr(sd, script->add_str("QMapChangeTo"), map->list[m].name);
npc->event(sd, queue->onMapChange, 0);
}
}
- if( maplist[m].cell == (struct mapcell *)0xdeadbeaf )
- map->cellfromcache(&maplist[m]);
+ if( map->list[m].cell == (struct mapcell *)0xdeadbeaf )
+ map->cellfromcache(&map->list[m]);
if (sd->sc.count) { // Cancel some map related stuff.
if (sd->sc.data[SC_JAILED])
return 1; //You may not get out!
@@ -4881,13 +4842,13 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
if (sd->regen.state.gc)
sd->regen.state.gc = 0;
// make sure vending is allowed here
- if (sd->state.vending && maplist[m].flag.novending) {
+ if (sd->state.vending && map->list[m].flag.novending) {
clif->message (sd->fd, msg_txt(276)); // "You can't open a shop on this map"
vending->close(sd);
}
- if( hChSys.local && maplist[sd->bl.m].channel && idb_exists(maplist[sd->bl.m].channel->users, sd->status.char_id) ) {
- clif->chsys_left(maplist[sd->bl.m].channel,sd);
+ if( hChSys.local && map->list[sd->bl.m].channel && idb_exists(map->list[sd->bl.m].channel->users, sd->status.char_id) ) {
+ clif->chsys_left(map->list[sd->bl.m].channel,sd);
}
}
@@ -4916,15 +4877,15 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
return 0;
}
- if( x < 0 || x >= maplist[m].xs || y < 0 || y >= maplist[m].ys ) {
+ 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);
x = y = 0; // make it random
}
if( x == 0 && y == 0 ) {// pick a random walkable cell
do {
- x=rnd()%(maplist[m].xs-2)+1;
- y=rnd()%(maplist[m].ys-2)+1;
+ x=rnd()%(map->list[m].xs-2)+1;
+ y=rnd()%(map->list[m].ys-2)+1;
} while(map->getcell(m,x,y,CELL_CHKNOPASS));
}
@@ -4945,7 +4906,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
sd->bl.x = sd->ud.to_x = x;
sd->bl.y = sd->ud.to_y = y;
- if( sd->status.guild_id > 0 && maplist[m].flag.gvg_castle ) { // Increased guild castle regen [Valaris]
+ if( sd->status.guild_id > 0 && map->list[m].flag.gvg_castle ) { // Increased guild castle regen [Valaris]
struct guild_castle *gc = guild->mapindex2gc(sd->mapindex);
if(gc && gc->guild_id == sd->status.guild_id)
sd->regen.state.gc = 1;
@@ -4990,12 +4951,12 @@ int pc_randomwarp(struct map_session_data *sd, clr_type type) {
m=sd->bl.m;
- if (maplist[sd->bl.m].flag.noteleport) //Teleport forbidden
+ if (map->list[sd->bl.m].flag.noteleport) //Teleport forbidden
return 0;
do {
- x=rnd()%(maplist[m].xs-2)+1;
- y=rnd()%(maplist[m].ys-2)+1;
+ x=rnd()%(map->list[m].xs-2)+1;
+ y=rnd()%(map->list[m].ys-2)+1;
} while( map->getcell(m,x,y,CELL_CHKNOPASS) && (i++) < 1000 );
if (i < 1000)
@@ -5014,7 +4975,7 @@ int pc_memo(struct map_session_data* sd, int pos) {
nullpo_ret(sd);
// check mapflags
- if( sd->bl.m >= 0 && (maplist[sd->bl.m].flag.nomemo || maplist[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;
}
@@ -5166,7 +5127,7 @@ int pc_checkequip(struct map_session_data *sd,int pos)
nullpo_retr(-1, sd);
for(i=0;i<EQI_MAX;i++){
- if(pos & equip_pos[i])
+ if(pos & pc->equip_pos[i])
return sd->equip_index[i];
}
@@ -5207,6 +5168,7 @@ int pc_jobid2mapid(unsigned short b_class)
case JOB_STAR_GLADIATOR: return MAPID_STAR_GLADIATOR;
case JOB_KAGEROU:
case JOB_OBORO: return MAPID_KAGEROUOBORO;
+ case JOB_REBELLION: return MAPID_REBELLION;
case JOB_DEATH_KNIGHT: return MAPID_DEATH_KNIGHT;
//2-2 Jobs
case JOB_CRUSADER: return MAPID_CRUSADER;
@@ -5347,6 +5309,7 @@ int pc_mapid2jobid(unsigned short class_, int sex)
case MAPID_ASSASSIN: return JOB_ASSASSIN;
case MAPID_STAR_GLADIATOR: return JOB_STAR_GLADIATOR;
case MAPID_KAGEROUOBORO: return sex?JOB_KAGEROU:JOB_OBORO;
+ case MAPID_REBELLION: return JOB_REBELLION;
case MAPID_DEATH_KNIGHT: return JOB_DEATH_KNIGHT;
//2-2 Jobs
case MAPID_CRUSADER: return JOB_CRUSADER;
@@ -5663,6 +5626,8 @@ const char* job_name(int class_)
case JOB_KAGEROU:
case JOB_OBORO:
return msg_txt(653 - JOB_KAGEROU+class_);
+ case JOB_REBELLION:
+ return msg_txt(694);
default:
return msg_txt(655);
@@ -5703,7 +5668,7 @@ int pc_follow_timer(int tid, unsigned int tick, int id, intptr_t data) {
}
sd->followtimer = timer->add(
tick + 1000, // increase time a bit to loosen up map's load
- pc_follow_timer, sd->bl.id, 0);
+ pc->follow_timer, sd->bl.id, 0);
return 0;
}
@@ -5712,7 +5677,7 @@ int pc_stop_following (struct map_session_data *sd)
nullpo_ret(sd);
if (sd->followtimer != INVALID_TIMER) {
- timer->delete(sd->followtimer,pc_follow_timer);
+ timer->delete(sd->followtimer,pc->follow_timer);
sd->followtimer = INVALID_TIMER;
}
sd->followtarget = -1;
@@ -5731,7 +5696,7 @@ int pc_follow(struct map_session_data *sd,int target_id) {
pc->stop_following(sd);
sd->followtarget = target_id;
- pc_follow_timer(INVALID_TIMER, timer->gettick(), sd->bl.id, 0);
+ pc->follow_timer(INVALID_TIMER, timer->gettick(), sd->bl.id, 0);
return 0;
}
@@ -5833,7 +5798,7 @@ int pc_checkjoblevelup(struct map_session_data *sd)
/*==========================================
* Alters experienced based on self bonuses that do not get even shared to the party.
*------------------------------------------*/
-static void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src) {
+void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src) {
int bonus = 0;
struct status_data *st = status->get_status_data(src);
@@ -5868,13 +5833,13 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int
if(sd->bl.prev == NULL || pc_isdead(sd))
return 0;
- if(!battle_config.pvp_exp && maplist[sd->bl.m].flag.pvp) // [MouseJstr]
+ if(!battle_config.pvp_exp && map->list[sd->bl.m].flag.pvp) // [MouseJstr]
return 0; // no exp on pvp maps
if(sd->status.guild_id>0)
base_exp-=guild->payexp(sd,base_exp);
- if(src) pc_calcexp(sd, &base_exp, &job_exp, src);
+ if(src) pc->calcexp(sd, &base_exp, &job_exp, src);
nextb = pc->nextbaseexp(sd);
nextj = pc->nextjobexp(sd);
@@ -5944,12 +5909,12 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int
*------------------------------------------*/
unsigned int pc_maxbaselv(struct map_session_data *sd)
{
- return max_level[pc->class2idx(sd->status.class_)][0];
+ return pc->max_level[pc->class2idx(sd->status.class_)][0];
}
unsigned int pc_maxjoblv(struct map_session_data *sd)
{
- return max_level[pc->class2idx(sd->status.class_)][1];
+ return pc->max_level[pc->class2idx(sd->status.class_)][1];
}
/*==========================================
@@ -5964,7 +5929,7 @@ unsigned int pc_nextbaseexp(struct map_session_data *sd)
if(sd->status.base_level>=pc->maxbaselv(sd) || sd->status.base_level<=0)
return 0;
- return exp_table[pc->class2idx(sd->status.class_)][0][sd->status.base_level-1];
+ return pc->exp_table[pc->class2idx(sd->status.class_)][0][sd->status.base_level-1];
}
//Base exp needed for this level.
@@ -5973,7 +5938,7 @@ unsigned int pc_thisbaseexp(struct map_session_data *sd)
if(sd->status.base_level>pc->maxbaselv(sd) || sd->status.base_level<=1)
return 0;
- return exp_table[pc->class2idx(sd->status.class_)][0][sd->status.base_level-2];
+ return pc->exp_table[pc->class2idx(sd->status.class_)][0][sd->status.base_level-2];
}
@@ -5991,7 +5956,7 @@ unsigned int pc_nextjobexp(struct map_session_data *sd)
if(sd->status.job_level>=pc->maxjoblv(sd) || sd->status.job_level<=0)
return 0;
- return exp_table[pc->class2idx(sd->status.class_)][1][sd->status.job_level-1];
+ return pc->exp_table[pc->class2idx(sd->status.class_)][1][sd->status.job_level-1];
}
//Job exp needed for this level.
@@ -5999,41 +5964,41 @@ unsigned int pc_thisjobexp(struct map_session_data *sd)
{
if(sd->status.job_level>pc->maxjoblv(sd) || sd->status.job_level<=1)
return 0;
- return exp_table[pc->class2idx(sd->status.class_)][1][sd->status.job_level-2];
+ return pc->exp_table[pc->class2idx(sd->status.class_)][1][sd->status.job_level-2];
}
/// Returns the value of the specified stat.
-static int pc_getstat(struct map_session_data* sd, int type)
+int pc_getstat(struct map_session_data* sd, int type)
{
nullpo_retr(-1, sd);
switch( type ) {
- case SP_STR: return sd->status.str;
- case SP_AGI: return sd->status.agi;
- case SP_VIT: return sd->status.vit;
- case SP_INT: return sd->status.int_;
- case SP_DEX: return sd->status.dex;
- case SP_LUK: return sd->status.luk;
- default:
- return -1;
+ case SP_STR: return sd->status.str;
+ case SP_AGI: return sd->status.agi;
+ case SP_VIT: return sd->status.vit;
+ case SP_INT: return sd->status.int_;
+ case SP_DEX: return sd->status.dex;
+ case SP_LUK: return sd->status.luk;
+ default:
+ return -1;
}
}
/// Sets the specified stat to the specified value.
/// Returns the new value.
-static int pc_setstat(struct map_session_data* sd, int type, int val)
+int pc_setstat(struct map_session_data* sd, int type, int val)
{
nullpo_retr(-1, sd);
switch( type ) {
- case SP_STR: sd->status.str = val; break;
- case SP_AGI: sd->status.agi = val; break;
- case SP_VIT: sd->status.vit = val; break;
- case SP_INT: sd->status.int_ = val; break;
- case SP_DEX: sd->status.dex = val; break;
- case SP_LUK: sd->status.luk = val; break;
- default:
- return -1;
+ case SP_STR: sd->status.str = val; break;
+ case SP_AGI: sd->status.agi = val; break;
+ case SP_VIT: sd->status.vit = val; break;
+ case SP_INT: sd->status.int_ = val; break;
+ case SP_DEX: sd->status.dex = val; break;
+ case SP_LUK: sd->status.luk = val; break;
+ default:
+ return -1;
}
return val;
@@ -6043,7 +6008,7 @@ static int pc_setstat(struct map_session_data* sd, int type, int val)
int pc_gets_status_point(int level)
{
if (battle_config.use_statpoint_table) //Use values from "db/statpoint.txt"
- return (statp[level+1] - statp[level]);
+ return (pc->statp[level+1] - pc->statp[level]);
else //Default increase
return ((level+15) / 5);
}
@@ -6058,7 +6023,7 @@ int pc_need_status_point(struct map_session_data* sd, int type, int val)
if ( val == 0 )
return 0;
- low = pc_getstat(sd,type);
+ low = pc->getstat(sd,type);
if ( low >= pc_maxparameter(sd) && val > 0 )
return 0; // Official servers show '0' when max is reached
@@ -6099,14 +6064,14 @@ int pc_statusup(struct map_session_data* sd, int type)
// check limits
max = pc_maxparameter(sd);
- if( pc_getstat(sd,type) >= max )
+ if( pc->getstat(sd,type) >= max )
{
clif->statusupack(sd,type,0,0);
return 1;
}
// set new values
- val = pc_setstat(sd, type, pc_getstat(sd,type) + 1);
+ val = pc->setstat(sd, type, pc->getstat(sd,type) + 1);
sd->status.status_point -= need;
status_calc_pc(sd,0);
@@ -6147,7 +6112,7 @@ int pc_statusup2(struct map_session_data* sd, int type, int val)
// set new value
max = pc_maxparameter(sd);
- val = pc_setstat(sd, type, cap_value(pc_getstat(sd,type) + val, 1, max));
+ val = pc->setstat(sd, type, cap_value(pc->getstat(sd,type) + val, 1, max));
status_calc_pc(sd,0);
@@ -6196,7 +6161,7 @@ int pc_skillup(struct map_session_data *sd,uint16 skill_id) {
else if( sd->status.skill_point == 0 && (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->famerank(sd->status.char_id, MAPID_TAEKWON) )
pc->calc_skilltree(sd); // Required to grant all TK Ranger skills.
else
- pc_check_skilltree(sd, skill_id); // Check if a new skill can Lvlup
+ pc->check_skilltree(sd, skill_id); // Check if a new skill can Lvlup
clif->skillup(sd,skill_id);
clif->updatestatus(sd,SP_SKILLPOINT);
@@ -6251,8 +6216,8 @@ int pc_allskillup(struct map_session_data *sd)
}
} else {
int inf2;
- for(i=0;i < MAX_SKILL_TREE && (id=skill_tree[pc->class2idx(sd->status.class_)][i].id)>0;i++){
- int idx = skill_tree[pc->class2idx(sd->status.class_)][i].idx;
+ for(i=0;i < MAX_SKILL_TREE && (id=pc->skill_tree[pc->class2idx(sd->status.class_)][i].id)>0;i++){
+ int idx = pc->skill_tree[pc->class2idx(sd->status.class_)][i].idx;
inf2 = skill->db[idx].inf2;
if (
(inf2&INF2_QUEST_SKILL && !battle_config.quest_skill_learn) ||
@@ -6370,33 +6335,33 @@ int pc_resetstate(struct map_session_data* sd)
if (battle_config.use_statpoint_table)
{ // New statpoint table used here - Dexity
if (sd->status.base_level > MAX_LEVEL)
- { //statp[] goes out of bounds, can't reset!
+ { //pc->statp[] goes out of bounds, can't reset!
ShowError("pc_resetstate: Can't reset stats of %d:%d, the base level (%d) is greater than the max level supported (%d)\n",
sd->status.account_id, sd->status.char_id, sd->status.base_level, MAX_LEVEL);
return 0;
}
- sd->status.status_point = statp[sd->status.base_level] + ( sd->class_&JOBL_UPPER ? 52 : 0 ); // extra 52+48=100 stat points
+ sd->status.status_point = pc->statp[sd->status.base_level] + ( sd->class_&JOBL_UPPER ? 52 : 0 ); // extra 52+48=100 stat points
}
else
{
int add=0;
- add += pc->need_status_point(sd, SP_STR, 1-pc_getstat(sd, SP_STR));
- add += pc->need_status_point(sd, SP_AGI, 1-pc_getstat(sd, SP_AGI));
- add += pc->need_status_point(sd, SP_VIT, 1-pc_getstat(sd, SP_VIT));
- add += pc->need_status_point(sd, SP_INT, 1-pc_getstat(sd, SP_INT));
- add += pc->need_status_point(sd, SP_DEX, 1-pc_getstat(sd, SP_DEX));
- add += pc->need_status_point(sd, SP_LUK, 1-pc_getstat(sd, SP_LUK));
+ add += pc->need_status_point(sd, SP_STR, 1-pc->getstat(sd, SP_STR));
+ add += pc->need_status_point(sd, SP_AGI, 1-pc->getstat(sd, SP_AGI));
+ add += pc->need_status_point(sd, SP_VIT, 1-pc->getstat(sd, SP_VIT));
+ add += pc->need_status_point(sd, SP_INT, 1-pc->getstat(sd, SP_INT));
+ add += pc->need_status_point(sd, SP_DEX, 1-pc->getstat(sd, SP_DEX));
+ add += pc->need_status_point(sd, SP_LUK, 1-pc->getstat(sd, SP_LUK));
sd->status.status_point+=add;
}
- pc_setstat(sd, SP_STR, 1);
- pc_setstat(sd, SP_AGI, 1);
- pc_setstat(sd, SP_VIT, 1);
- pc_setstat(sd, SP_INT, 1);
- pc_setstat(sd, SP_DEX, 1);
- pc_setstat(sd, SP_LUK, 1);
+ pc->setstat(sd, SP_STR, 1);
+ pc->setstat(sd, SP_AGI, 1);
+ pc->setstat(sd, SP_VIT, 1);
+ pc->setstat(sd, SP_INT, 1);
+ pc->setstat(sd, SP_DEX, 1);
+ pc->setstat(sd, SP_LUK, 1);
clif->updatestatus(sd,SP_STR);
clif->updatestatus(sd,SP_AGI);
@@ -6549,7 +6514,7 @@ int pc_resetfeel(struct map_session_data* sd)
{
sd->feel_map[i].m = -1;
sd->feel_map[i].index = 0;
- pc_setglobalreg(sd,sg_info[i].feel_var,0);
+ pc_setglobalreg(sd,pc->sg_info[i].feel_var,0);
}
return 0;
@@ -6563,7 +6528,7 @@ int pc_resethate(struct map_session_data* sd)
for (i=0; i<3; i++)
{
sd->hate_mob[i] = -1;
- pc_setglobalreg(sd,sg_info[i].hate_var,0);
+ pc_setglobalreg(sd,pc->sg_info[i].hate_var,0);
}
return 0;
}
@@ -6627,7 +6592,7 @@ void pc_respawn(struct map_session_data* sd, clr_type clrtype)
clif->resurrection(&sd->bl, 1); //If warping fails, send a normal stand up packet.
}
-static int pc_respawn_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_respawn_timer(int tid, unsigned int tick, int id, intptr_t data) {
struct map_session_data *sd = map->id2sd(id);
if( sd != NULL )
{
@@ -6686,7 +6651,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
if(sd->status.pet_id > 0 && sd->pd) {
struct pet_data *pd = sd->pd;
- if( !maplist[sd->bl.m].flag.noexppenalty ) {
+ if( !map->list[sd->bl.m].flag.noexppenalty ) {
pet->set_intimate(pd, pd->pet.intimate - pd->petDB->die);
if( pd->pet.intimate < 0 )
pd->pet.intimate = 0;
@@ -6844,7 +6809,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
}
if( battle_config.bone_drop==2
- || (battle_config.bone_drop==1 && maplist[sd->bl.m].flag.pvp)
+ || (battle_config.bone_drop==1 && map->list[sd->bl.m].flag.pvp)
) {
struct item item_tmp;
memset(&item_tmp,0,sizeof(item_tmp));
@@ -6870,7 +6835,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
pc->setinvincibletimer(sd, battle_config.pc_invincible_time);
sc_start(&sd->bl,status->skill2sc(MO_STEELBODY),100,1,skill->get_time(MO_STEELBODY,1));
if(map_flag_gvg2(sd->bl.m))
- pc_respawn_timer(INVALID_TIMER, timer->gettick(), sd->bl.id, 0);
+ pc->respawn_timer(INVALID_TIMER, timer->gettick(), sd->bl.id, 0);
return 0;
}
}
@@ -6878,7 +6843,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
// changed penalty options, added death by player if pk_mode [Valaris]
if( battle_config.death_penalty_type
&& (sd->class_&MAPID_UPPERMASK) != MAPID_NOVICE // only novices will receive no penalty
- && !maplist[sd->bl.m].flag.noexppenalty && !map_flag_gvg2(sd->bl.m)
+ && !map->list[sd->bl.m].flag.noexppenalty && !map_flag_gvg2(sd->bl.m)
&& !sd->sc.data[SC_BABY] && !sd->sc.data[SC_CASH_DEATHPENALTY]
) {
unsigned int base_penalty =0;
@@ -6916,7 +6881,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
clif->updatestatus(sd,SP_JOBEXP);
}
}
- if(battle_config.zeny_penalty > 0 && !maplist[sd->bl.m].flag.nozenypenalty)
+ if(battle_config.zeny_penalty > 0 && !map->list[sd->bl.m].flag.nozenypenalty)
{
base_penalty = (unsigned int)((double)sd->status.zeny * (double)battle_config.zeny_penalty / 10000.);
if(base_penalty)
@@ -6924,12 +6889,12 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
}
}
- if(maplist[sd->bl.m].flag.pvp_nightmaredrop) {
+ if(map->list[sd->bl.m].flag.pvp_nightmaredrop) {
// Moved this outside so it works when PVP isn't enabled and during pk mode [Ancyker]
- for(j=0;j<maplist[sd->bl.m].drop_list_count;j++){
- int id = maplist[sd->bl.m].drop_list[j].drop_id;
- int type = maplist[sd->bl.m].drop_list[j].drop_type;
- int per = maplist[sd->bl.m].drop_list[j].drop_per;
+ for(j=0;j<map->list[sd->bl.m].drop_list_count;j++){
+ int id = map->list[sd->bl.m].drop_list[j].drop_id;
+ int type = map->list[sd->bl.m].drop_list[j].drop_type;
+ int per = map->list[sd->bl.m].drop_list[j].drop_per;
if(id == 0)
continue;
if(id == -1){
@@ -6975,7 +6940,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
}
// pvp
// disable certain pvp functions on pk_mode [Valaris]
- if( maplist[sd->bl.m].flag.pvp && !battle_config.pk_mode && !maplist[sd->bl.m].flag.pvp_nocalcrank ) {
+ if( map->list[sd->bl.m].flag.pvp && !battle_config.pk_mode && !map->list[sd->bl.m].flag.pvp_nocalcrank ) {
sd->pvp_point -= 5;
sd->pvp_lost++;
if( src && src->type == BL_PC )
@@ -6986,18 +6951,18 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
}
if( sd->pvp_point < 0 )
{
- timer->add(tick+1, pc_respawn_timer,sd->bl.id,0);
+ timer->add(tick+1, pc->respawn_timer,sd->bl.id,0);
return 1|8;
}
}
//GvG
if( map_flag_gvg2(sd->bl.m) ) {
- timer->add(tick+1, pc_respawn_timer, sd->bl.id, 0);
+ timer->add(tick+1, pc->respawn_timer, sd->bl.id, 0);
return 1|8;
} else if( sd->bg_id ) {
struct battleground_data *bgd = bg->team_search(sd->bg_id);
if( bgd && bgd->mapindex > 0 ) { // Respawn by BG
- timer->add(tick+1000, pc_respawn_timer, sd->bl.id, 0);
+ timer->add(tick+1000, pc->respawn_timer, sd->bl.id, 0);
return 1|8;
}
}
@@ -7450,7 +7415,7 @@ int pc_percentheal(struct map_session_data *sd,int hp,int sp)
return 0;
}
-static int jobchange_killclone(struct block_list *bl, va_list ap)
+int jobchange_killclone(struct block_list *bl, va_list ap)
{
struct mob_data *md;
int flag;
@@ -7538,7 +7503,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
if ( (b_class&MAPID_UPPERMASK) != (sd->class_&MAPID_UPPERMASK) ) { //Things to remove when changing class tree.
const int class_ = pc->class2idx(sd->status.class_);
short id;
- for(i = 0; i < MAX_SKILL_TREE && (id = skill_tree[class_][i].id) > 0; i++) {
+ for(i = 0; i < MAX_SKILL_TREE && (id = pc->skill_tree[class_][i].id) > 0; i++) {
//Remove status specific to your current tree skills.
enum sc_type sc = status->skill2sc(id);
if (sc > SC_COMMON_MAX && sd->sc.data[sc])
@@ -7596,7 +7561,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
if (sd->state.vending)
vending->close(sd);
- map->foreachinmap(jobchange_killclone, sd->bl.m, BL_MOB, sd->bl.id);
+ map->foreachinmap(pc->jobchange_killclone, sd->bl.m, BL_MOB, sd->bl.id);
//Remove peco/cart/falcon
i = sd->sc.option;
@@ -8277,7 +8242,7 @@ int pc_setregistry_str(struct map_session_data *sd,const char *reg,const char *v
/*==========================================
* Exec eventtimer for player sd (retrieved from map_session (id))
*------------------------------------------*/
-static int pc_eventtimer(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_eventtimer(int tid, unsigned int tick, int id, intptr_t data) {
struct map_session_data *sd=map->id2sd(id);
char *p = (char *)data;
int i;
@@ -8310,7 +8275,7 @@ int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name)
if( i == MAX_EVENTTIMER )
return 0;
- sd->eventtimer[i] = timer->add(timer->gettick()+tick, pc_eventtimer, sd->bl.id, (intptr_t)aStrdup(name));
+ sd->eventtimer[i] = timer->add(timer->gettick()+tick, pc->eventtimer, sd->bl.id, (intptr_t)aStrdup(name));
sd->eventcount++;
return 1;
@@ -8338,7 +8303,7 @@ int pc_deleventtimer(struct map_session_data *sd,const char *name)
if( i == MAX_EVENTTIMER )
return 0; // not found
- timer->delete(sd->eventtimer[i],pc_eventtimer);
+ timer->delete(sd->eventtimer[i],pc->eventtimer);
sd->eventtimer[i] = INVALID_TIMER;
sd->eventcount--;
aFree(p);
@@ -8380,7 +8345,7 @@ int pc_cleareventtimer(struct map_session_data *sd)
for(i=0;i<MAX_EVENTTIMER;i++)
if( sd->eventtimer[i] != INVALID_TIMER ){
char *p = (char *)(timer->get(sd->eventtimer[i])->data);
- timer->delete(sd->eventtimer[i],pc_eventtimer);
+ timer->delete(sd->eventtimer[i],pc->eventtimer);
sd->eventtimer[i] = INVALID_TIMER;
sd->eventcount--;
if (p) aFree(p);
@@ -8502,7 +8467,7 @@ int pc_removecombo(struct map_session_data *sd, struct item_data *data ) {
}
/* check if combo requirements still fit */
- if( pc_checkcombo( sd, data ) )
+ if( pc->checkcombo( sd, data ) )
continue;
/* it's empty, we can clear all the memory */
@@ -8526,7 +8491,7 @@ int pc_load_combo(struct map_session_data *sd) {
if( sd->equip_index[i] < 0 || !(id = sd->inventory_data[idx] ) )
continue;
if( id->combos_count )
- ret += pc_checkcombo(sd,id);
+ ret += pc->checkcombo(sd,id);
if(!itemdb_isspecial(sd->status.inventory[idx].card[0])) {
struct item_data *data;
int j;
@@ -8535,7 +8500,7 @@ int pc_load_combo(struct map_session_data *sd) {
continue;
if ( ( data = itemdb->exists(sd->status.inventory[idx].card[j]) ) != NULL ) {
if( data->combos_count )
- ret += pc_checkcombo(sd,data);
+ ret += pc->checkcombo(sd,data);
}
}
}
@@ -8603,7 +8568,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
}
for(i=0;i<EQI_MAX;i++) {
- if(pos & equip_pos[i]) {
+ if(pos & pc->equip_pos[i]) {
if(sd->equip_index[i] >= 0) //Slot taken, remove item from there.
pc->unequipitem(sd,sd->equip_index[i],2);
@@ -8625,7 +8590,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
sd->weapontype1 = id->look;
else
sd->weapontype1 = 0;
- pc_calcweapontype(sd);
+ pc->calcweapontype(sd);
clif->changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
}
if(pos & EQP_HAND_L) {
@@ -8642,7 +8607,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
}
else
sd->status.shield = sd->weapontype2 = 0;
- pc_calcweapontype(sd);
+ pc->calcweapontype(sd);
clif->changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
}
//Added check to prevent sending the same look on multiple slots ->
@@ -8709,7 +8674,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
/* check for combos (MUST be before status_calc_pc) */
if ( id ) {
if( id->combos_count )
- pc_checkcombo(sd,id);
+ pc->checkcombo(sd,id);
if(itemdb_isspecial(sd->status.inventory[n].card[0]))
; //No cards
else {
@@ -8719,7 +8684,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
continue;
if ( ( data = itemdb->exists(sd->status.inventory[n].card[i]) ) != NULL ) {
if( data->combos_count )
- pc_checkcombo(sd,data);
+ pc->checkcombo(sd,data);
}
}
}
@@ -8790,21 +8755,21 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
return 0;
}
for(i=0;i<EQI_MAX;i++) {
- if(sd->status.inventory[n].equip & equip_pos[i])
+ if(sd->status.inventory[n].equip & pc->equip_pos[i])
sd->equip_index[i] = -1;
}
if(sd->status.inventory[n].equip & EQP_HAND_R) {
sd->weapontype1 = 0;
sd->status.weapon = sd->weapontype2;
- pc_calcweapontype(sd);
+ pc->calcweapontype(sd);
clif->changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
if( !battle_config.dancing_weaponswitch_fix )
status_change_end(&sd->bl, SC_DANCING, INVALID_TIMER); // Unequipping => stop dancing.
}
if(sd->status.inventory[n].equip & EQP_HAND_L) {
sd->status.shield = sd->weapontype2 = 0;
- pc_calcweapontype(sd);
+ pc->calcweapontype(sd);
clif->changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
}
if(sd->status.inventory[n].equip & EQP_HEAD_LOW && pc->checkequip(sd,EQP_COSTUME_HEAD_LOW) == -1 ) {
@@ -8869,7 +8834,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
/* check for combos (MUST be before status_calc_pc) */
if ( sd->inventory_data[n] ) {
if( sd->inventory_data[n]->combos_count ) {
- if( pc_removecombo(sd,sd->inventory_data[n]) )
+ if( pc->removecombo(sd,sd->inventory_data[n]) )
status_cacl = true;
} if(itemdb_isspecial(sd->status.inventory[n].card[0]))
; //No cards
@@ -8880,7 +8845,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
continue;
if ( ( data = itemdb->exists(sd->status.inventory[n].card[i]) ) != NULL ) {
if( data->combos_count ) {
- if( pc_removecombo(sd,data) )
+ if( pc->removecombo(sd,data) )
status_cacl = true;
}
}
@@ -9027,7 +8992,7 @@ int pc_calc_pvprank_sub(struct block_list *bl,va_list ap)
int pc_calc_pvprank(struct map_session_data *sd) {
int old;
struct map_data *m;
- m=&maplist[sd->bl.m];
+ m=&map->list[sd->bl.m];
old=sd->pvp_rank;
sd->pvp_rank=1;
map->foreachinmap(pc_calc_pvprank_sub,sd->bl.m,BL_PC,sd);
@@ -9288,13 +9253,13 @@ int pc_autosave(int tid, unsigned int tick, int id, intptr_t data)
interval = map->autosave_interval/(map->usercount()+1);
if(interval < map->minsave_interval)
interval = map->minsave_interval;
- timer->add(timer->gettick()+interval,pc_autosave,0,0);
+ timer->add(timer->gettick()+interval,pc->autosave,0,0);
return 0;
}
-static int pc_daynight_timer_sub(struct map_session_data *sd,va_list ap) {
- if (sd->state.night != map->night_flag && maplist[sd->bl.m].flag.nightenabled) { //Night/day state does not match.
+int pc_daynight_timer_sub(struct map_session_data *sd,va_list ap) {
+ if (sd->state.night != map->night_flag && map->list[sd->bl.m].flag.nightenabled) { //Night/day state does not match.
clif->status_change(&sd->bl, SI_SKE, map->night_flag, 0, 0, 0, 0); //New night effect by dynamix [Skotlex]
sd->state.night = map->night_flag;
return 1;
@@ -9315,7 +9280,7 @@ int map_day_timer(int tid, unsigned int tick, int id, intptr_t data) {
return 0; //Already day.
map->night_flag = 0; // 0=day, 1=night [Yor]
- map->map_foreachpc(pc_daynight_timer_sub);
+ map->foreachpc(pc->daynight_timer_sub);
strcpy(tmp_soutput, (data == 0) ? msg_txt(502) : msg_txt(60)); // The day has arrived!
intif->broadcast(tmp_soutput, strlen(tmp_soutput) + 1, BC_DEFAULT);
return 0;
@@ -9335,7 +9300,7 @@ int map_night_timer(int tid, unsigned int tick, int id, intptr_t data) {
return 0; //Already nigth.
map->night_flag = 1; // 0=day, 1=night [Yor]
- map->map_foreachpc(pc_daynight_timer_sub);
+ map->foreachpc(pc->daynight_timer_sub);
strcpy(tmp_soutput, (data == 0) ? msg_txt(503) : msg_txt(59)); // The night has fallen...
intif->broadcast(tmp_soutput, strlen(tmp_soutput) + 1, BC_DEFAULT);
return 0;
@@ -9397,7 +9362,7 @@ bool pc_can_use_command(struct map_session_data *sd, const char *command) {
return atcommand->can_use(sd,command);
}
-static int pc_charm_timer(int tid, unsigned int tick, int id, intptr_t data) {
+int pc_charm_timer(int tid, unsigned int tick, int id, intptr_t data) {
struct map_session_data *sd;
int i, type;
@@ -9444,14 +9409,14 @@ int pc_add_charm(struct map_session_data *sd,int interval,int max,int type)
if( sd->charm[type] && sd->charm[type] >= max )
{
if(sd->charm_timer[type][0] != INVALID_TIMER)
- timer->delete(sd->charm_timer[type][0],pc_charm_timer);
+ timer->delete(sd->charm_timer[type][0],pc->charm_timer);
sd->charm[type]--;
if( sd->charm[type] != 0 )
memmove(sd->charm_timer[type]+0, sd->charm_timer[type]+1, (sd->charm[type])*sizeof(int));
sd->charm_timer[type][sd->charm[type]] = INVALID_TIMER;
}
- tid = timer->add(timer->gettick()+interval, pc_charm_timer, sd->bl.id, 0);
+ tid = timer->add(timer->gettick()+interval, pc->charm_timer, sd->bl.id, 0);
ARR_FIND(0, sd->charm[type], i, sd->charm_timer[type][i] == INVALID_TIMER || DIFF_TICK(timer->get(tid)->tick, timer->get(sd->charm_timer[type][i])->tick) < 0);
if( i != sd->charm[type] )
memmove(sd->charm_timer[type]+i+1, sd->charm_timer[type]+i, (sd->charm[type]-i)*sizeof(int));
@@ -9483,7 +9448,7 @@ int pc_del_charm(struct map_session_data *sd,int count,int type)
for(i = 0; i < count; i++) {
if(sd->charm_timer[type][i] != INVALID_TIMER) {
- timer->delete(sd->charm_timer[type][i],pc_charm_timer);
+ timer->delete(sd->charm_timer[type][i],pc->charm_timer);
sd->charm_timer[type][i] = INVALID_TIMER;
}
}
@@ -9495,13 +9460,12 @@ int pc_del_charm(struct map_session_data *sd,int count,int type)
clif->charm(sd, type);
return 0;
}
-#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
/*==========================================
* Renewal EXP/Itemdrop rate modifier base on level penalty
* 1=exp 2=itemdrop
*------------------------------------------*/
-int pc_level_penalty_mod(int diff, unsigned char race, unsigned short mode, int type)
-{
+int pc_level_penalty_mod(int diff, unsigned char race, unsigned short mode, int type) {
+#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
int rate = 100, i;
if( diff < 0 )
@@ -9517,15 +9481,17 @@ int pc_level_penalty_mod(int diff, unsigned char race, unsigned short mode, int
continue;
}
- if( (tmp=level_penalty[type][i][diff]) > 0 ){
+ if( (tmp=pc->level_penalty[type][i][diff]) > 0 ){
rate = tmp;
break;
}
}
return rate;
-}
+#else
+ return 100;
#endif
+}
int pc_split_str(char *str,char **val,int num)
{
int i;
@@ -9711,6 +9677,7 @@ void pc_read_skill_tree(void) {
{ "Expanded_Super_Baby", JOB_SUPER_BABY_E },
{ "Kagerou", JOB_KAGEROU },
{ "Oboro", JOB_OBORO },
+ { "Rebellion", JOB_REBELLION },
};
if (conf_read_file(&skill_tree_conf, config_filename)) {
@@ -9744,36 +9711,36 @@ void pc_read_skill_tree(void) {
if( ( skill_id = skill->name2id(sk_name) ) ) {
int skidx, offset = 0, h = 0, rlen = 0, rskid = 0;
- ARR_FIND( 0, MAX_SKILL_TREE, skidx, skill_tree[idx][skidx].id == 0 || skill_tree[idx][skidx].id == skill_id );
+ ARR_FIND( 0, MAX_SKILL_TREE, skidx, pc->skill_tree[idx][skidx].id == 0 || pc->skill_tree[idx][skidx].id == skill_id );
if( skidx == MAX_SKILL_TREE ) {
ShowWarning("pc_read_skill_tree: Unable to load skill %hu (%s) into '%s's tree. Maximum number of skills per class has been reached.\n", skill_id, sk_name, name);
continue;
- } else if(skill_tree[idx][skidx].id) {
+ } else if(pc->skill_tree[idx][skidx].id) {
ShowNotice("pc_read_skill_tree: Overwriting %hu for '%s' (%d)\n", skill_id, name, jnames[k].id);
}
- skill_tree[idx][skidx].id = skill_id;
- skill_tree[idx][skidx].idx = skill->get_index(skill_id);
+ pc->skill_tree[idx][skidx].id = skill_id;
+ pc->skill_tree[idx][skidx].idx = skill->get_index(skill_id);
if( config_setting_is_group(sk) ) {
int max = 0, jlevel = 0;
config_setting_lookup_int(sk, "MaxLevel", &max);
config_setting_lookup_int(sk, "MinJobLevel", &jlevel);
- skill_tree[idx][skidx].max = (unsigned char)max;
- skill_tree[idx][skidx].joblv = (unsigned char)jlevel;
+ pc->skill_tree[idx][skidx].max = (unsigned char)max;
+ pc->skill_tree[idx][skidx].joblv = (unsigned char)jlevel;
rlen = config_setting_length(sk);
offset += jlevel ? 2 : 1;
} else {
- skill_tree[idx][skidx].max = (unsigned char)config_setting_get_int(sk);
- skill_tree[idx][skidx].joblv = 0;
+ pc->skill_tree[idx][skidx].max = (unsigned char)config_setting_get_int(sk);
+ pc->skill_tree[idx][skidx].joblv = 0;
}
for( h = offset; h < rlen && h < MAX_PC_SKILL_REQUIRE; h++ ) {
config_setting_t *rsk = config_setting_get_elem(sk,h);
if( rsk && ( rskid = skill->name2id(config_setting_name(rsk)) ) ) {
- skill_tree[idx][skidx].need[h].id = rskid;
- skill_tree[idx][skidx].need[h].idx = skill->get_index(rskid);
- skill_tree[idx][skidx].need[h].lv = (unsigned char)config_setting_get_int(rsk);
+ pc->skill_tree[idx][skidx].need[h].id = rskid;
+ pc->skill_tree[idx][skidx].need[h].idx = skill->get_index(rskid);
+ pc->skill_tree[idx][skidx].need[h].lv = (unsigned char)config_setting_get_int(rsk);
} else if( rsk ) {
ShowWarning("pc_read_skill_tree: unknown requirement '%s' for '%s' in '%s'\n",config_setting_name(rsk),sk_name,name);
} else {
@@ -9816,19 +9783,19 @@ void pc_read_skill_tree(void) {
fidx = pc->class2idx(jnames[b].id);
- ARR_FIND( 0, MAX_SKILL_TREE, d, skill_tree[fidx][d].id == 0 );
+ ARR_FIND( 0, MAX_SKILL_TREE, d, pc->skill_tree[fidx][d].id == 0 );
for( f = 0; f < d; f++ ) {
- ARR_FIND( 0, MAX_SKILL_TREE, a, skill_tree[idx][a].id == 0 || skill_tree[idx][a].id == skill_tree[fidx][f].id );
+ ARR_FIND( 0, MAX_SKILL_TREE, a, pc->skill_tree[idx][a].id == 0 || pc->skill_tree[idx][a].id == pc->skill_tree[fidx][f].id );
if( a == MAX_SKILL_TREE ) {
ShowWarning("pc_read_skill_tree: '%s' can't inherit '%s', skill tree is full!\n", name,iname);
break;
- } else if ( skill_tree[idx][a].id || ( skill_tree[idx][a].id == NV_TRICKDEAD && ((pc->jobid2mapid(jnames[k].id)&MAPID_BASEMASK)!=MAPID_NOVICE) ) ) /* we skip trickdead for non-novices */
+ } else if ( pc->skill_tree[idx][a].id || ( pc->skill_tree[idx][a].id == NV_TRICKDEAD && ((pc->jobid2mapid(jnames[k].id)&MAPID_BASEMASK)!=MAPID_NOVICE) ) ) /* we skip trickdead for non-novices */
continue;/* skip */
- memcpy(&skill_tree[idx][a],&skill_tree[fidx][f],sizeof(skill_tree[fidx][f]));
+ memcpy(&pc->skill_tree[idx][a],&pc->skill_tree[fidx][f],sizeof(pc->skill_tree[fidx][f]));
}
}
@@ -9844,9 +9811,8 @@ void pc_read_skill_tree(void) {
clif->skillinfoblock(sd);
mapit->free(iter);
}
+bool pc_readdb_levelpenalty(char* fields[], int columns, int current) {
#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
-static bool pc_readdb_levelpenalty(char* fields[], int columns, int current)
-{
int type, race, diff;
type = atoi(fields[0]);
@@ -9868,11 +9834,10 @@ static bool pc_readdb_levelpenalty(char* fields[], int columns, int current)
if( diff < 0 )
diff = min(MAX_LEVEL + ( ~(diff) + 1 ), MAX_LEVEL*2);
- level_penalty[type][race][diff] = atoi(fields[3]);
-
+ pc->level_penalty[type][race][diff] = atoi(fields[3]);
+#endif
return true;
}
-#endif
/*==========================================
* pc DB reading.
@@ -9887,8 +9852,8 @@ int pc_readdb(void) {
char line[24000],*p;
//reset
- memset(exp_table,0,sizeof(exp_table));
- memset(max_level,0,sizeof(max_level));
+ memset(pc->exp_table,0,sizeof(pc->exp_table));
+ memset(pc->max_level,0,sizeof(pc->max_level));
sprintf(line, "%s/"DBPATH"exp.txt", map->db_path);
@@ -9928,23 +9893,23 @@ int pc_readdb(void) {
count++;
job = jobs[0] = pc->class2idx(job_id);
//We send one less and then one more because the last entry in the exp array should hold 0.
- max_level[job][type] = pc_split_atoui(split[3], exp_table[job][type],',',maxlv-1)+1;
+ pc->max_level[job][type] = pc_split_atoui(split[3], pc->exp_table[job][type],',',maxlv-1)+1;
//Reverse check in case the array has a bunch of trailing zeros... [Skotlex]
//The reasoning behind the -2 is this... if the max level is 5, then the array
//should look like this:
//0: x, 1: x, 2: x: 3: x 4: 0 <- last valid value is at 3.
- while ((ui = max_level[job][type]) >= 2 && exp_table[job][type][ui-2] <= 0)
- max_level[job][type]--;
- if (max_level[job][type] < maxlv) {
- ShowWarning("pc_readdb: Specified max %u for job %d, but that job's exp table only goes up to level %u.\n", maxlv, job_id, max_level[job][type]);
+ while ((ui = pc->max_level[job][type]) >= 2 && pc->exp_table[job][type][ui-2] <= 0)
+ pc->max_level[job][type]--;
+ if (pc->max_level[job][type] < maxlv) {
+ ShowWarning("pc_readdb: Specified max %u for job %d, but that job's exp table only goes up to level %u.\n", maxlv, job_id, pc->max_level[job][type]);
ShowInfo("Filling the missing values with the last exp entry.\n");
//Fill the requested values with the last entry.
- ui = (max_level[job][type] <= 2? 0: max_level[job][type]-2);
+ ui = (pc->max_level[job][type] <= 2? 0: pc->max_level[job][type]-2);
for (; ui+2 < maxlv; ui++)
- exp_table[job][type][ui] = exp_table[job][type][ui-1];
- max_level[job][type] = maxlv;
+ pc->exp_table[job][type][ui] = pc->exp_table[job][type][ui-1];
+ pc->max_level[job][type] = maxlv;
}
-// ShowDebug("%s - Class %d: %d\n", type?"Job":"Base", job_id, max_level[job][type]);
+// ShowDebug("%s - Class %d: %d\n", type?"Job":"Base", job_id, pc->max_level[job][type]);
for (i = 1; i < job_count; i++) {
job_id = jobs[i];
if (!pcdb_checkid(job_id)) {
@@ -9952,9 +9917,9 @@ int pc_readdb(void) {
continue;
}
job = pc->class2idx(job_id);
- memcpy(exp_table[job][type], exp_table[jobs[0]][type], sizeof(exp_table[0][0]));
- max_level[job][type] = maxlv;
-// ShowDebug("%s - Class %d: %u\n", type?"Job":"Base", job_id, max_level[job][type]);
+ memcpy(pc->exp_table[job][type], pc->exp_table[jobs[0]][type], sizeof(pc->exp_table[0][0]));
+ pc->max_level[job][type] = maxlv;
+// ShowDebug("%s - Class %d: %u\n", type?"Job":"Base", job_id, pc->max_level[job][type]);
}
}
fclose(fp);
@@ -9963,28 +9928,28 @@ int pc_readdb(void) {
if (i == JOB_WEDDING || i == JOB_XMAS || i == JOB_SUMMER)
continue; //Classes that do not need exp tables.
j = pc->class2idx(i);
- if (!max_level[j][0])
+ if (!pc->max_level[j][0])
ShowWarning("Class %s (%d) does not has a base exp table.\n", pc->job_name(i), i);
- if (!max_level[j][1])
+ if (!pc->max_level[j][1])
ShowWarning("Class %s (%d) does not has a job exp table.\n", pc->job_name(i), i);
}
ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s/"DBPATH"%s"CL_RESET"'.\n",count,map->db_path,"exp.txt");
count = 0;
// Reset and read skilltree
- memset(skill_tree,0,sizeof(skill_tree));
- pc_read_skill_tree();
+ memset(pc->skill_tree,0,sizeof(pc->skill_tree));
+ pc->read_skill_tree();
#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
- sv->readdb(map->db_path, "re/level_penalty.txt", ',', 4, 4, -1, &pc_readdb_levelpenalty);
+ sv->readdb(map->db_path, "re/level_penalty.txt", ',', 4, 4, -1, pc->readdb_levelpenalty);
for( k=1; k < 3; k++ ){ // fill in the blanks
for( j = 0; j < RC_MAX; j++ ){
int tmp = 0;
for( i = 0; i < MAX_LEVEL*2; i++ ){
if( i == MAX_LEVEL+1 )
- tmp = level_penalty[k][j][0];// reset
- if( level_penalty[k][j][i] > 0 )
- tmp = level_penalty[k][j][i];
+ tmp = pc->level_penalty[k][j][0];// reset
+ if( pc->level_penalty[k][j][i] > 0 )
+ tmp = pc->level_penalty[k][j][i];
else
- level_penalty[k][j][i] = tmp;
+ pc->level_penalty[k][j][i] = tmp;
}
}
}
@@ -10043,7 +10008,7 @@ int pc_readdb(void) {
ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s/"DBPATH"%s"CL_RESET"'.\n",count,map->db_path,"attr_fix.txt");
count = 0;
// reset then read statspoint
- memset(statp,0,sizeof(statp));
+ memset(pc->statp,0,sizeof(pc->statp));
i=1;
sprintf(line, "%s/"DBPATH"statpoint.txt", map->db_path);
@@ -10062,7 +10027,7 @@ int pc_readdb(void) {
if (i > MAX_LEVEL)
break;
count++;
- statp[i]=stat;
+ pc->statp[i]=stat;
i++;
}
fclose(fp);
@@ -10072,9 +10037,9 @@ int pc_readdb(void) {
// generate the remaining parts of the db if necessary
k = battle_config.use_statpoint_table; //save setting
battle_config.use_statpoint_table = 0; //temporarily disable to force pc->gets_status_point use default values
- statp[0] = 45; // seed value
+ pc->statp[0] = 45; // seed value
for (; i <= MAX_LEVEL; i++)
- statp[i] = statp[i-1] + pc->gets_status_point(i-1);
+ pc->statp[i] = pc->statp[i-1] + pc->gets_status_point(i-1);
battle_config.use_statpoint_table = k; //restore setting
return 0;
@@ -10085,7 +10050,7 @@ void pc_itemcd_do(struct map_session_data *sd, bool load) {
struct item_cd* cd = NULL;
if( load ) {
- if( !(cd = idb_get(itemcd_db, sd->status.char_id)) ) {
+ if( !(cd = idb_get(pc->itemcd_db, sd->status.char_id)) ) {
// no skill cooldown is associated with this character
return;
}
@@ -10096,12 +10061,12 @@ void pc_itemcd_do(struct map_session_data *sd, bool load) {
cursor++;
}
}
- idb_remove(itemcd_db,sd->status.char_id);
+ idb_remove(pc->itemcd_db,sd->status.char_id);
} else {
- if( !(cd = idb_get(itemcd_db,sd->status.char_id)) ) {
+ if( !(cd = idb_get(pc->itemcd_db,sd->status.char_id)) ) {
// create a new skill cooldown object for map storage
CREATE( cd, struct item_cd, 1 );
- idb_put( itemcd_db, sd->status.char_id, cd );
+ idb_put( pc->itemcd_db, sd->status.char_id, cd );
}
for(i = 0; i < MAX_ITEMDELAYS; i++) {
if( sd->item_delay[i].nameid && DIFF_TICK(timer->gettick(),sd->item_delay[i].tick) < 0 ) {
@@ -10119,31 +10084,31 @@ void pc_itemcd_do(struct map_session_data *sd, bool load) {
*------------------------------------------*/
void do_final_pc(void) {
- db_destroy(itemcd_db);
+ db_destroy(pc->itemcd_db);
do_final_pc_groups();
- ers_destroy(pc_sc_display_ers);
+ ers_destroy(pc->sc_display_ers);
return;
}
-int do_init_pc(void) {
+void do_init_pc(void) {
- itemcd_db = idb_alloc(DB_OPT_RELEASE_DATA);
+ pc->itemcd_db = idb_alloc(DB_OPT_RELEASE_DATA);
pc->readdb();
- timer->add_func_list(pc_invincible_timer, "pc_invincible_timer");
- timer->add_func_list(pc_eventtimer, "pc_eventtimer");
- timer->add_func_list(pc_inventory_rental_end, "pc_inventory_rental_end");
- timer->add_func_list(pc->calc_pvprank_timer, "pc->calc_pvprank_timer");
- timer->add_func_list(pc_autosave, "pc_autosave");
- timer->add_func_list(pc_spiritball_timer, "pc_spiritball_timer");
- timer->add_func_list(pc_follow_timer, "pc_follow_timer");
- timer->add_func_list(pc->endautobonus, "pc->endautobonus");
- timer->add_func_list(pc_charm_timer, "pc_charm_timer");
+ timer->add_func_list(pc->invincible_timer, "pc_invincible_timer");
+ timer->add_func_list(pc->eventtimer, "pc_eventtimer");
+ timer->add_func_list(pc->inventory_rental_end, "pc_inventory_rental_end");
+ timer->add_func_list(pc->calc_pvprank_timer, "pc_calc_pvprank_timer");
+ timer->add_func_list(pc->autosave, "pc_autosave");
+ timer->add_func_list(pc->spiritball_timer, "pc_spiritball_timer");
+ timer->add_func_list(pc->follow_timer, "pc_follow_timer");
+ timer->add_func_list(pc->endautobonus, "pc_endautobonus");
+ timer->add_func_list(pc->charm_timer, "pc_charm_timer");
- timer->add(timer->gettick() + map->autosave_interval, pc_autosave, 0, 0);
+ timer->add(timer->gettick() + map->autosave_interval, pc->autosave, 0, 0);
// 0=day, 1=night [Yor]
map->night_flag = battle_config.night_at_start ? 1 : 0;
@@ -10152,8 +10117,8 @@ int do_init_pc(void) {
int day_duration = battle_config.day_duration;
int night_duration = battle_config.night_duration;
// add night/day timer [Yor]
- timer->add_func_list(pc->map_day_timer, "pc->map_day_timer");
- timer->add_func_list(pc->map_night_timer, "pc->map_night_timer");
+ timer->add_func_list(pc->map_day_timer, "pc_map_day_timer");
+ timer->add_func_list(pc->map_night_timer, "pc_map_night_timer");
pc->day_timer_tid = timer->add_interval(timer->gettick() + (map->night_flag ? 0 : day_duration) + night_duration, pc->map_day_timer, 0, 0, day_duration + night_duration);
pc->night_timer_tid = timer->add_interval(timer->gettick() + day_duration + (map->night_flag ? night_duration : 0), pc->map_night_timer, 0, 0, day_duration + night_duration);
@@ -10161,9 +10126,7 @@ int do_init_pc(void) {
do_init_pc_groups();
- pc_sc_display_ers = ers_new(sizeof(struct sc_display_entry), "pc.c:pc_sc_display_ers", ERS_OPT_NONE);
-
- return 0;
+ pc->sc_display_ers = ers_new(sizeof(struct sc_display_entry), "pc.c:sc_display_ers", ERS_OPT_NONE);
}
/*=====================================
@@ -10172,15 +10135,43 @@ int do_init_pc(void) {
* created by Susu
*-------------------------------------*/
void pc_defaults(void) {
+ const struct sg_data sg_info[MAX_PC_FEELHATE] = {
+ { SG_SUN_ANGER, SG_SUN_BLESS, SG_SUN_COMFORT, "PC_FEEL_SUN", "PC_HATE_MOB_SUN", is_day_of_sun },
+ { SG_MOON_ANGER, SG_MOON_BLESS, SG_MOON_COMFORT, "PC_FEEL_MOON", "PC_HATE_MOB_MOON", is_day_of_moon },
+ { SG_STAR_ANGER, SG_STAR_BLESS, SG_STAR_COMFORT, "PC_FEEL_STAR", "PC_HATE_MOB_STAR", is_day_of_star }
+ };
+ unsigned short equip_pos[EQI_MAX]={EQP_ACC_L,EQP_ACC_R,EQP_SHOES,EQP_GARMENT,EQP_HEAD_LOW,EQP_HEAD_MID,EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_GARMENT,EQP_AMMO};
+
+
pc = &pc_s;
/* vars */
- // timer for night.day
- pc->day_timer_tid = day_timer_tid;
- pc->night_timer_tid = night_timer_tid;
-
+ pc->itemcd_db = NULL;
+ /* */
+ pc->day_timer_tid = INVALID_TIMER;
+ pc->night_timer_tid = INVALID_TIMER;
+ /* respecting order */
+ memset(pc->exp_table, 0, sizeof(pc->exp_table)
+ + sizeof(pc->max_level)
+ + sizeof(pc->statp)
+#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
+ + sizeof(pc->level_penalty)
+#endif
+ + sizeof(pc->skill_tree)
+ + sizeof(pc->smith_fame_list)
+ + sizeof(pc->chemist_fame_list)
+ + sizeof(pc->taekwon_fame_list)
+ );
+ /* */
+ memcpy(pc->equip_pos, &equip_pos, sizeof(pc->equip_pos));
+ /* */
+ memcpy(pc->sg_info, sg_info, sizeof(pc->sg_info));
+ /* */
+ pc->sc_display_ers = NULL;
/* funcs */
-
+ pc->init = do_init_pc;
+ pc->final = do_final_pc;
+
pc->get_dummy_sd = pc_get_dummy_sd;
pc->class2idx = pc_class2idx;
pc->get_group_level = pc_get_group_level;
@@ -10358,8 +10349,6 @@ void pc_defaults(void) {
pc->set_hate_mob = pc_set_hate_mob;
pc->readdb = pc_readdb;
- pc->do_init_pc = do_init_pc;
- pc->do_final_pc = do_final_pc;
pc->map_day_timer = map_day_timer; // by [yor]
pc->map_night_timer = map_night_timer; // by [yor]
// Rental System
@@ -10382,9 +10371,35 @@ void pc_defaults(void) {
pc->del_charm = pc_del_charm;
pc->baselevelchanged = pc_baselevelchanged;
-#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
pc->level_penalty_mod = pc_level_penalty_mod;
-#endif
pc->calc_skillpoint = pc_calc_skillpoint;
+
+ pc->invincible_timer = pc_invincible_timer;
+ pc->spiritball_timer = pc_spiritball_timer;
+ pc->check_banding = pc_check_banding;
+ pc->inventory_rental_end = pc_inventory_rental_end;
+ pc->check_skilltree = pc_check_skilltree;
+ pc->bonus_autospell = pc_bonus_autospell;
+ pc->bonus_autospell_onskill = pc_bonus_autospell_onskill;
+ pc->bonus_addeff = pc_bonus_addeff;
+ pc->bonus_addeff_onskill = pc_bonus_addeff_onskill;
+ pc->bonus_item_drop = pc_bonus_item_drop;
+ pc->calcexp = pc_calcexp;
+ pc->respawn_timer = pc_respawn_timer;
+ pc->jobchange_killclone = jobchange_killclone;
+ pc->getstat = pc_getstat;
+ pc->setstat = pc_setstat;
+ pc->eventtimer = pc_eventtimer;
+ pc->daynight_timer_sub = pc_daynight_timer_sub;
+ pc->charm_timer = pc_charm_timer;
+ pc->readdb_levelpenalty = pc_readdb_levelpenalty;
+ pc->autosave = pc_autosave;
+ pc->follow_timer = pc_follow_timer;
+ pc->read_skill_tree = pc_read_skill_tree;
+ pc->isUseitem = pc_isUseitem;
+ pc->show_steal = pc_show_steal;
+ pc->checkcombo = pc_checkcombo;
+ pc->calcweapontype = pc_calcweapontype;
+ pc->removecombo = pc_removecombo;
}
diff --git a/src/map/pc.h b/src/map/pc.h
index d384e0145..fadb922b5 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -22,10 +22,13 @@
#include "unit.h" // unit_stop_attack(), unit_stop_walking()
#include "vending.h" // struct s_vending
-
+/**
+ * Defines
+ **/
#define MAX_PC_BONUS 10
#define MAX_PC_SKILL_REQUIRE 5
#define MAX_PC_FEELHATE 3
+#define PVP_CALCRANK_INTERVAL 1000 // PVP calculation interval
//Equip indexes constants. (eg: sd->equip_index[EQI_AMMO] returns the index
//where the arrows are equipped)
@@ -521,58 +524,6 @@ struct map_session_data {
};
-struct eri *pc_sc_display_ers;
-
-//Total number of classes (for data storage)
-#define CLASS_COUNT (JOB_MAX - JOB_NOVICE_HIGH + JOB_MAX_BASIC)
-
-enum weapon_type {
- W_FIST, //Bare hands
- W_DAGGER, //1
- W_1HSWORD, //2
- W_2HSWORD, //3
- W_1HSPEAR, //4
- W_2HSPEAR, //5
- W_1HAXE, //6
- W_2HAXE, //7
- W_MACE, //8
- W_2HMACE, //9 (unused)
- W_STAFF, //10
- W_BOW, //11
- W_KNUCKLE, //12
- W_MUSICAL, //13
- W_WHIP, //14
- W_BOOK, //15
- W_KATAR, //16
- W_REVOLVER, //17
- W_RIFLE, //18
- W_GATLING, //19
- W_SHOTGUN, //20
- W_GRENADE, //21
- W_HUUMA, //22
- W_2HSTAFF, //23
- MAX_WEAPON_TYPE,
- // dual-wield constants
- W_DOUBLE_DD, // 2 daggers
- W_DOUBLE_SS, // 2 swords
- W_DOUBLE_AA, // 2 axes
- W_DOUBLE_DS, // dagger + sword
- W_DOUBLE_DA, // dagger + axe
- W_DOUBLE_SA, // sword + axe
-};
-
-enum ammo_type {
- A_ARROW = 1,
- A_DAGGER, //2
- A_BULLET, //3
- A_SHELL, //4
- A_GRENADE, //5
- A_SHURIKEN, //6
- A_KUNAI, //7
- A_CANNONBALL, //8
- A_THROWWEAPON //9
-};
-
//Equip position constants
enum equip_pos {
EQP_HEAD_LOW = 0x0001,
@@ -634,7 +585,7 @@ enum equip_pos {
#define pc_isinvisible(sd) ( (sd)->sc.option&OPTION_INVISIBLE )
#define pc_is50overweight(sd) ( (sd)->weight*100 >= (sd)->max_weight*battle_config.natural_heal_weight_rate )
#define pc_is90overweight(sd) ( (sd)->weight*10 >= (sd)->max_weight*9 )
-#define pc_maxparameter(sd) ( ((((sd)->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO) || (sd)->class_&JOBL_THIRD ? ((sd)->class_&JOBL_BABY ? battle_config.max_baby_third_parameter : battle_config.max_third_parameter) : ((sd)->class_&JOBL_BABY ? battle_config.max_baby_parameter : battle_config.max_parameter)) )
+#define pc_maxparameter(sd) ( ((((sd)->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO) || (((sd)->class_&MAPID_UPPERMASK) == MAPID_REBELLION) || (sd)->class_&JOBL_THIRD ? ((sd)->class_&JOBL_BABY ? battle_config.max_baby_third_parameter : battle_config.max_third_parameter) : ((sd)->class_&JOBL_BABY ? battle_config.max_baby_parameter : battle_config.max_parameter)) )
/**
* Ranger
**/
@@ -660,7 +611,8 @@ enum equip_pos {
|| ( (class_) >= JOB_RUNE_KNIGHT && (class_) <= JOB_MECHANIC_T2 ) \
|| ( (class_) >= JOB_BABY_RUNE && (class_) <= JOB_BABY_MECHANIC2 ) \
|| ( (class_) >= JOB_SUPER_NOVICE_E && (class_) <= JOB_SUPER_BABY_E ) \
-|| ( (class_) >= JOB_KAGEROU && (class_) < JOB_MAX ) \
+|| ( (class_) >= JOB_KAGEROU && (class_) <= JOB_OBORO ) \
+|| ( (class_) >= JOB_REBELLION && (class_) < JOB_MAX ) \
)
#define pcdb_checkid(class_) pcdb_checkid_sub((unsigned int)class_)
@@ -725,8 +677,6 @@ struct skill_tree_entry {
} need[MAX_PC_SKILL_REQUIRE];
}; // Celest
-extern struct skill_tree_entry skill_tree[CLASS_COUNT][MAX_SKILL_TREE];
-
struct sg_data {
short anger_id;
short bless_id;
@@ -736,16 +686,19 @@ struct sg_data {
int (*day_func)(void);
};
-extern const struct sg_data sg_info[MAX_PC_FEELHATE];
-
-extern struct fame_list smith_fame_list[MAX_FAME_LIST];
-extern struct fame_list chemist_fame_list[MAX_FAME_LIST];
-extern struct fame_list taekwon_fame_list[MAX_FAME_LIST];
+enum { ADDITEM_EXIST , ADDITEM_NEW , ADDITEM_OVERAMOUNT };
-enum {ADDITEM_EXIST,ADDITEM_NEW,ADDITEM_OVERAMOUNT};
+/**
+ * Item Cool Down Delay Saving
+ * Struct item_cd is not a member of struct map_session_data
+ * to keep cooldowns in memory between player log-ins.
+ * All cooldowns are reset when server is restarted.
+ **/
+struct item_cd {
+ unsigned int tick[MAX_ITEMDELAYS];//tick
+ short nameid[MAX_ITEMDELAYS];//skill id
+};
-#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
-#endif
/*=====================================
* Interface : pc.h
* Generated by HerculesInterfaceMaker
@@ -753,12 +706,30 @@ enum {ADDITEM_EXIST,ADDITEM_NEW,ADDITEM_OVERAMOUNT};
*-------------------------------------*/
struct pc_interface {
- /* vars */
- // timer for night.day
+ /* */
+ DBMap* itemcd_db;
+ /* */
int day_timer_tid;
int night_timer_tid;
-
+ /* */
+ unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL];
+ unsigned int max_level[CLASS_COUNT][2];
+ unsigned int statp[MAX_LEVEL+1];
+#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
+ unsigned int level_penalty[3][RC_MAX][MAX_LEVEL*2+1];
+#endif
+ unsigned short equip_pos[EQI_MAX];
+ /* */
+ struct skill_tree_entry skill_tree[CLASS_COUNT][MAX_SKILL_TREE];
+ struct fame_list smith_fame_list[MAX_FAME_LIST];
+ struct fame_list chemist_fame_list[MAX_FAME_LIST];
+ struct fame_list taekwon_fame_list[MAX_FAME_LIST];
+ struct sg_data sg_info[MAX_PC_FEELHATE];
+ /* */
+ struct eri *sc_display_ers;
/* funcs */
+ void (*init) (void);
+ void (*final) (void);
struct map_session_data* (*get_dummy_sd) (void);
int (*class2idx) (int class_);
@@ -772,11 +743,11 @@ struct pc_interface {
bool (*should_log_commands) (struct map_session_data *sd);
int (*setrestartvalue) (struct map_session_data *sd,int type);
- int (*makesavestatus) (struct map_session_data *);
+ int (*makesavestatus) (struct map_session_data *sd);
void (*respawn) (struct map_session_data* sd, clr_type clrtype);
- int (*setnewpc) (struct map_session_data*,int,int,int,unsigned int,int,int);
+ int (*setnewpc) (struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd);
bool (*authok) (struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers);
- void (*authfail) (struct map_session_data *);
+ void (*authfail) (struct map_session_data *sd);
int (*reg_received) (struct map_session_data *sd);
int (*isequip) (struct map_session_data *sd,int n);
@@ -793,17 +764,17 @@ struct pc_interface {
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*,short,int,int);
+ int (*setsavepoint) (struct map_session_data *sd, short mapindex,int x,int y);
int (*randomwarp) (struct map_session_data *sd,clr_type type);
int (*memo) (struct map_session_data* sd, int pos);
- int (*checkadditem) (struct map_session_data*,int,int);
- int (*inventoryblank) (struct map_session_data*);
+ int (*checkadditem) (struct map_session_data *sd,int nameid,int amount);
+ int (*inventoryblank) (struct map_session_data *sd);
int (*search_inventory) (struct map_session_data *sd,int item_id);
- int (*payzeny) (struct map_session_data*,int, enum e_log_pick_type type, struct map_session_data*);
- int (*additem) (struct map_session_data*,struct item*,int,e_log_pick_type);
- int (*getzeny) (struct map_session_data*,int, enum e_log_pick_type, struct map_session_data*);
- int (*delitem) (struct map_session_data*,int,int,int,short,e_log_pick_type);
+ int (*payzeny) (struct map_session_data *sd,int zeny, enum e_log_pick_type type, struct map_session_data *tsd);
+ int (*additem) (struct map_session_data *sd,struct item *item_data,int amount,e_log_pick_type log_type);
+ int (*getzeny) (struct map_session_data *sd,int zeny, enum e_log_pick_type type, struct map_session_data *tsd);
+ int (*delitem) (struct map_session_data *sd,int n,int amount,int type, short reason, e_log_pick_type log_type);
// Special Shop System
int (*paycash) (struct map_session_data *sd, int price, int points);
int (*getcash) (struct map_session_data *sd, int cash, int points);
@@ -814,8 +785,8 @@ struct pc_interface {
int (*getitemfromcart) (struct map_session_data *sd,int idx,int amount);
int (*cartitem_amount) (struct map_session_data *sd,int idx,int amount);
- int (*takeitem) (struct map_session_data*,struct flooritem_data*);
- int (*dropitem) (struct map_session_data*,int,int);
+ int (*takeitem) (struct map_session_data *sd,struct flooritem_data *fitem);
+ int (*dropitem) (struct map_session_data *sd,int n,int amount);
bool (*isequipped) (struct map_session_data *sd, int nameid);
bool (*can_Adopt) (struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd);
@@ -828,48 +799,48 @@ struct pc_interface {
int (*endautobonus) (int tid, unsigned int tick, int id, intptr_t data);
int (*delautobonus) (struct map_session_data* sd,struct s_autobonus *bonus,char max,bool restore);
- int (*bonus) (struct map_session_data*,int,int);
- int (*bonus2) (struct map_session_data *sd,int,int,int);
- int (*bonus3) (struct map_session_data *sd,int,int,int,int);
- int (*bonus4) (struct map_session_data *sd,int,int,int,int,int);
- int (*bonus5) (struct map_session_data *sd,int,int,int,int,int,int);
- int (*skill) (struct map_session_data* sd, int id, int level, int flag);
+ int (*bonus) (struct map_session_data *sd,int type,int val);
+ int (*bonus2) (struct map_session_data *sd,int type,int type2,int val);
+ int (*bonus3) (struct map_session_data *sd,int type,int type2,int type3,int val);
+ int (*bonus4) (struct map_session_data *sd,int type,int type2,int type3,int type4,int val);
+ int (*bonus5) (struct map_session_data *sd,int type,int type2,int type3,int type4,int type5,int val);
+ int (*skill) (struct map_session_data *sd, int id, int level, int flag);
int (*insert_card) (struct map_session_data *sd,int idx_card,int idx_equip);
int (*steal_item) (struct map_session_data *sd,struct block_list *bl, uint16 skill_lv);
int (*steal_coin) (struct map_session_data *sd,struct block_list *bl);
- int (*modifybuyvalue) (struct map_session_data*,int);
- int (*modifysellvalue) (struct map_session_data*,int);
+ int (*modifybuyvalue) (struct map_session_data *sd,int orig_value);
+ int (*modifysellvalue) (struct map_session_data *sd,int orig_value);
- int (*follow) (struct map_session_data*, int); // [MouseJstr]
- int (*stop_following) (struct map_session_data*);
+ int (*follow) (struct map_session_data *sd, int target_id); // [MouseJstr]
+ int (*stop_following) (struct map_session_data *sd);
unsigned int (*maxbaselv) (struct map_session_data *sd);
unsigned int (*maxjoblv) (struct map_session_data *sd);
int (*checkbaselevelup) (struct map_session_data *sd);
int (*checkjoblevelup) (struct map_session_data *sd);
int (*gainexp) (struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest);
- unsigned int (*nextbaseexp) (struct map_session_data *);
- unsigned int (*thisbaseexp) (struct map_session_data *);
- unsigned int (*nextjobexp) (struct map_session_data *);
- unsigned int (*thisjobexp) (struct map_session_data *);
- int (*gets_status_point) (int);
- int (*need_status_point) (struct map_session_data *,int,int);
- int (*statusup) (struct map_session_data*,int);
- int (*statusup2) (struct map_session_data*,int,int);
- int (*skillup) (struct map_session_data*,uint16 skill_id);
- int (*allskillup) (struct map_session_data*);
- int (*resetlvl) (struct map_session_data*,int type);
- int (*resetstate) (struct map_session_data*);
- int (*resetskill) (struct map_session_data*, int);
- int (*resetfeel) (struct map_session_data*);
- int (*resethate) (struct map_session_data*);
- int (*equipitem) (struct map_session_data*,int,int);
- int (*unequipitem) (struct map_session_data*,int,int);
- int (*checkitem) (struct map_session_data*);
- int (*useitem) (struct map_session_data*,int);
+ unsigned int (*nextbaseexp) (struct map_session_data *sd);
+ unsigned int (*thisbaseexp) (struct map_session_data *sd);
+ unsigned int (*nextjobexp) (struct map_session_data *sd);
+ unsigned int (*thisjobexp) (struct map_session_data *sd);
+ int (*gets_status_point) (int level);
+ int (*need_status_point) (struct map_session_data *sd,int type,int val);
+ int (*statusup) (struct map_session_data *sd,int type);
+ int (*statusup2) (struct map_session_data *sd,int type,int val);
+ int (*skillup) (struct map_session_data *sd,uint16 skill_id);
+ int (*allskillup) (struct map_session_data *sd);
+ int (*resetlvl) (struct map_session_data *sd,int type);
+ int (*resetstate) (struct map_session_data *sd);
+ int (*resetskill) (struct map_session_data *sd, int flag);
+ int (*resetfeel) (struct map_session_data *sd);
+ int (*resethate) (struct map_session_data *sd);
+ int (*equipitem) (struct map_session_data *sd,int n,int req_pos);
+ int (*unequipitem) (struct map_session_data *sd,int n,int flag);
+ int (*checkitem) (struct map_session_data *sd);
+ int (*useitem) (struct map_session_data *sd,int n);
int (*skillatk_bonus) (struct map_session_data *sd, uint16 skill_id);
int (*skillheal_bonus) (struct map_session_data *sd, uint16 skill_id);
@@ -880,26 +851,26 @@ struct pc_interface {
void (*revive) (struct map_session_data *sd,unsigned int hp, unsigned int sp);
void (*heal) (struct map_session_data *sd,unsigned int hp,unsigned int sp, int type);
int (*itemheal) (struct map_session_data *sd,int itemid, int hp,int sp);
- int (*percentheal) (struct map_session_data *sd,int,int);
- int (*jobchange) (struct map_session_data *,int, int);
- int (*setoption) (struct map_session_data *,int);
+ int (*percentheal) (struct map_session_data *sd,int hp,int sp);
+ int (*jobchange) (struct map_session_data *sd,int job, int upper);
+ int (*setoption) (struct map_session_data *sd,int type);
int (*setcart) (struct map_session_data* sd, int type);
int (*setfalcon) (struct map_session_data* sd, int flag);
int (*setriding) (struct map_session_data* sd, int flag);
int (*setmadogear) (struct map_session_data* sd, int flag);
- int (*changelook) (struct map_session_data *,int,int);
+ int (*changelook) (struct map_session_data *sd,int type,int val);
int (*equiplookall) (struct map_session_data *sd);
- int (*readparam) (struct map_session_data*,int);
- int (*setparam) (struct map_session_data*,int,int);
- int (*readreg) (struct map_session_data*,int);
- int (*setreg) (struct map_session_data*,int,int);
+ int (*readparam) (struct map_session_data *sd,int type);
+ int (*setparam) (struct map_session_data *sd,int type,int val);
+ int (*readreg) (struct map_session_data *sd,int reg);
+ int (*setreg) (struct map_session_data *sd,int reg,int val);
char * (*readregstr) (struct map_session_data *sd,int reg);
int (*setregstr) (struct map_session_data *sd,int reg,const char *str);
- int (*readregistry) (struct map_session_data*,const char*,int);
- int (*setregistry) (struct map_session_data*,const char*,int,int);
- char * (*readregistry_str) (struct map_session_data*,const char*,int);
- int (*setregistry_str) (struct map_session_data*,const char*,const char*,int);
+ int (*readregistry) (struct map_session_data *sd,const char *reg,int type);
+ int (*setregistry) (struct map_session_data *sd,const char *reg,int val,int type);
+ char * (*readregistry_str) (struct map_session_data *sd,const char *reg,int type);
+ int (*setregistry_str) (struct map_session_data *sd,const char *reg,const char *val,int type);
int (*addeventtimer) (struct map_session_data *sd,int tick,const char *name);
int (*deleventtimer) (struct map_session_data *sd,const char *name);
@@ -931,15 +902,13 @@ struct pc_interface {
void (*setinvincibletimer) (struct map_session_data* sd, int val);
void (*delinvincibletimer) (struct map_session_data* sd);
- int (*addspiritball) (struct map_session_data *sd,int,int);
- int (*delspiritball) (struct map_session_data *sd,int,int);
+ int (*addspiritball) (struct map_session_data *sd,int interval,int max);
+ int (*delspiritball) (struct map_session_data *sd,int count,int type);
void (*addfame) (struct map_session_data *sd,int count);
unsigned char (*famerank) (int char_id, int job);
int (*set_hate_mob) (struct map_session_data *sd, int pos, struct block_list *bl);
int (*readdb) (void);
- int (*do_init_pc) (void);
- void (*do_final_pc) (void);
int (*map_day_timer) (int tid, unsigned int tick, int id, intptr_t data); // by [yor]
int (*map_night_timer) (int tid, unsigned int tick, int id, intptr_t data); // by [yor]
// Rental System
@@ -962,10 +931,36 @@ struct pc_interface {
int (*del_charm) (struct map_session_data *sd,int count,int type);
void (*baselevelchanged) (struct map_session_data *sd);
-#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
int (*level_penalty_mod) (int diff, unsigned char race, unsigned short mode, int type);
-#endif
int (*calc_skillpoint) (struct map_session_data* sd);
+
+ int (*invincible_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*spiritball_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*check_banding) ( struct block_list *bl, va_list ap );
+ int (*inventory_rental_end) (int tid, unsigned int tick, int id, intptr_t data);
+ void (*check_skilltree) (struct map_session_data *sd, int skill_id);
+ int (*bonus_autospell) (struct s_autospell *spell, int max, short id, short lv, short rate, short flag, short card_id);
+ int (*bonus_autospell_onskill) (struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, short card_id);
+ int (*bonus_addeff) (struct s_addeffect* effect, int max, enum sc_type id, short rate, short arrow_rate, unsigned char flag);
+ int (*bonus_addeff_onskill) (struct s_addeffectonskill* effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target);
+ int (*bonus_item_drop) (struct s_add_drop *drop, const short max, short id, short group, int race, int rate);
+ void (*calcexp) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src);
+ int (*respawn_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*jobchange_killclone) (struct block_list *bl, va_list ap);
+ int (*getstat) (struct map_session_data* sd, int type);
+ int (*setstat) (struct map_session_data* sd, int type, int val);
+ int (*eventtimer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*daynight_timer_sub) (struct map_session_data *sd,va_list ap);
+ int (*charm_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ bool (*readdb_levelpenalty) (char* fields[], int columns, int current);
+ int (*autosave) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*follow_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ void (*read_skill_tree) (void);
+ int (*isUseitem) (struct map_session_data *sd,int n);
+ int (*show_steal) (struct block_list *bl,va_list ap);
+ int (*checkcombo) (struct map_session_data *sd, struct item_data *data );
+ int (*calcweapontype) (struct map_session_data *sd);
+ int (*removecombo) (struct map_session_data *sd, struct item_data *data );
};
struct pc_interface *pc;
diff --git a/src/map/pet.c b/src/map/pet.c
index 811ac9f09..023059a6b 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -934,7 +934,7 @@ int pet_ai_sub_foreachclient(struct map_session_data *sd,va_list ap)
}
int pet_ai_hard(int tid, unsigned int tick, int id, intptr_t data) {
- map->map_foreachpc(pet->ai_sub_foreachclient,tick);
+ map->foreachpc(pet->ai_sub_foreachclient,tick);
return 0;
}
diff --git a/src/map/script.c b/src/map/script.c
index 06c97bbe6..5fa248f4e 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -2,12 +2,6 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-//#define DEBUG_DISP
-//#define DEBUG_DISASM
-//#define DEBUG_RUN
-//#define DEBUG_HASH
-//#define DEBUG_DUMP_STACK
-
#include "../common/cbasetypes.h"
#include "../common/malloc.h"
#include "../common/md5calc.h"
@@ -60,165 +54,18 @@
#include <sys/time.h>
#endif
#include <time.h>
-#include <setjmp.h>
-#include <errno.h>
-
-
-#define FETCH(n, t) \
- if( script_hasdata(st,n) ) \
- (t)=script_getnum(st,n);
-
-/// Maximum amount of elements in script arrays
-#define SCRIPT_MAX_ARRAYSIZE 128
-
-#define SCRIPT_BLOCK_SIZE 512
-enum { LABEL_NEXTLINE=1,LABEL_START };
-/// temporary buffer for passing around compiled bytecode
-/// @see add_scriptb, set_label, parse_script
-static unsigned char* script_buf = NULL;
-static int script_pos = 0, script_size = 0;
-
-static inline int GETVALUE(const unsigned char* buf, int i)
-{
+static inline int GETVALUE(const unsigned char* buf, int i) {
return (int)MakeDWord(MakeWord(buf[i], buf[i+1]), MakeWord(buf[i+2], 0));
}
-static inline void SETVALUE(unsigned char* buf, int i, int n)
-{
+static inline void SETVALUE(unsigned char* buf, int i, int n) {
buf[i] = GetByte(n, 0);
buf[i+1] = GetByte(n, 1);
buf[i+2] = GetByte(n, 2);
}
-// Using a prime number for SCRIPT_HASH_SIZE should give better distributions
-#define SCRIPT_HASH_SIZE 1021
-int str_hash[SCRIPT_HASH_SIZE];
-// Specifies which string hashing method to use
-//#define SCRIPT_HASH_DJB2
-//#define SCRIPT_HASH_SDBM
-#define SCRIPT_HASH_ELF
-
-static int parse_options=0;
-
-// important buildin function references for usage in scripts
-static int buildin_set_ref = 0;
-static int buildin_callsub_ref = 0;
-static int buildin_callfunc_ref = 0;
-static int buildin_getelementofarray_ref = 0;
-
-static jmp_buf error_jump;
-static char* error_msg;
-static const char* error_pos;
-static int error_report; // if the error should produce output
-// Used by disp_warning_message
-static const char* parser_current_src;
-static const char* parser_current_file;
-static int parser_current_line;
-
-// for advanced scripting support ( nested if, switch, while, for, do-while, function, etc )
-// [Eoe / jA 1080, 1081, 1094, 1164]
-enum curly_type {
- TYPE_NULL = 0,
- TYPE_IF,
- TYPE_SWITCH,
- TYPE_WHILE,
- TYPE_FOR,
- TYPE_DO,
- TYPE_USERFUNC,
- TYPE_ARGLIST // function argument list
-};
-
-enum e_arglist
-{
- ARGLIST_UNDEFINED = 0,
- ARGLIST_NO_PAREN = 1,
- ARGLIST_PAREN = 2,
-};
-
-static struct {
- struct {
- enum curly_type type;
- int index;
- int count;
- int flag;
- struct linkdb_node *case_label;
- } curly[256]; // Information right parenthesis
- int curly_count; // The number of right brackets
- int index; // Number of the syntax used in the script
-} syntax;
-
-const char* parse_curly_close(const char* p);
-const char* parse_syntax_close(const char* p);
-const char* parse_syntax_close_sub(const char* p,int* flag);
-const char* parse_syntax(const char* p);
-static int parse_syntax_for_flag = 0;
-
-extern int status_current_equip_item_index; //for New CARDS Scripts. It contains Inventory Index of the EQUIP_SCRIPT caller item. [Lupus]
-
struct script_interface script_s;
-c_op get_com(unsigned char *scriptbuf,int *pos);
-int get_num(unsigned char *scriptbuf,int *pos);
-
-/*==========================================
- * (Only those needed) local declaration prototype
- *------------------------------------------*/
-
-enum {
- MF_NOMEMO, //0
- MF_NOTELEPORT,
- MF_NOSAVE,
- MF_NOBRANCH,
- MF_NOPENALTY,
- MF_NOZENYPENALTY,
- MF_PVP,
- MF_PVP_NOPARTY,
- MF_PVP_NOGUILD,
- MF_GVG,
- MF_GVG_NOPARTY, //10
- MF_NOTRADE,
- MF_NOSKILL,
- MF_NOWARP,
- MF_PARTYLOCK,
- MF_NOICEWALL,
- MF_SNOW,
- MF_FOG,
- MF_SAKURA,
- MF_LEAVES,
- /* 21 - 22 free */
- MF_CLOUDS = 23,
- MF_CLOUDS2,
- MF_FIREWORKS,
- MF_GVG_CASTLE,
- MF_GVG_DUNGEON,
- MF_NIGHTENABLED,
- MF_NOBASEEXP,
- MF_NOJOBEXP, //30
- MF_NOMOBLOOT,
- MF_NOMVPLOOT,
- MF_NORETURN,
- MF_NOWARPTO,
- MF_NIGHTMAREDROP,
- MF_ZONE,
- MF_NOCOMMAND,
- MF_NODROP,
- MF_JEXP,
- MF_BEXP, //40
- MF_NOVENDING,
- MF_LOADEVENT,
- MF_NOCHAT,
- MF_NOEXPPENALTY,
- MF_GUILDLOCK,
- MF_TOWN,
- MF_AUTOTRADE,
- MF_ALLOWKS,
- MF_MONSTER_NOTELEPORT,
- MF_PVP_NOCALCRANK, //50
- MF_BATTLEGROUND,
- MF_RESET,
- MF_NOTOMB
-};
-
const char* script_op2name(int op)
{
#define RETURN_OP_NAME(type) case type: return #type
@@ -269,7 +116,7 @@ const char* script_op2name(int op)
#undef RETURN_OP_NAME
}
-#ifdef DEBUG_DUMP_STACK
+#ifdef SCRIPT_DEBUG_DUMP_STACK
static void script_dump_stack(struct script_state* st)
{
int i;
@@ -312,7 +159,7 @@ static void script_dump_stack(struct script_state* st)
#endif
/// Reports on the console the src of a script error.
-static void script_reportsrc(struct script_state *st) {
+void script_reportsrc(struct script_state *st) {
struct block_list* bl;
if( st->oid == 0 )
@@ -325,13 +172,13 @@ static void script_reportsrc(struct script_state *st) {
switch( bl->type ) {
case BL_NPC:
if( bl->m >= 0 )
- ShowDebug("Source (NPC): %s at %s (%d,%d)\n", ((struct npc_data *)bl)->name, maplist[bl->m].name, bl->x, bl->y);
+ ShowDebug("Source (NPC): %s at %s (%d,%d)\n", ((struct npc_data *)bl)->name, map->list[bl->m].name, bl->x, bl->y);
else
ShowDebug("Source (NPC): %s (invisible/not on a map)\n", ((struct npc_data *)bl)->name);
break;
default:
if( bl->m >= 0 )
- ShowDebug("Source (Non-NPC type %d): name %s at %s (%d,%d)\n", bl->type, status->get_name(bl), maplist[bl->m].name, bl->x, bl->y);
+ ShowDebug("Source (Non-NPC type %d): name %s at %s (%d,%d)\n", bl->type, status->get_name(bl), map->list[bl->m].name, bl->x, bl->y);
else
ShowDebug("Source (Non-NPC type %d): name %s (invisible/not on a map)\n", bl->type, status->get_name(bl));
break;
@@ -339,7 +186,7 @@ static void script_reportsrc(struct script_state *st) {
}
/// Reports on the console information about the script data.
-static void script_reportdata(struct script_data* data)
+void script_reportdata(struct script_data* data)
{
if( data == NULL )
return;
@@ -370,22 +217,22 @@ static void script_reportdata(struct script_data* data)
} else if( reference_toparam(data) ) {// param
ShowDebug("Data: param name='%s' type=%d\n", reference_getname(data), reference_getparamtype(data));
} else {// ???
- ShowDebug("Data: reference name='%s' type=%s\n", reference_getname(data), script_op2name(data->type));
- ShowDebug("Please report this!!! - script->str_data.type=%s\n", script_op2name(script->str_data[reference_getid(data)].type));
+ ShowDebug("Data: reference name='%s' type=%s\n", reference_getname(data), script->op2name(data->type));
+ ShowDebug("Please report this!!! - script->str_data.type=%s\n", script->op2name(script->str_data[reference_getid(data)].type));
}
break;
case C_POS:// label
ShowDebug("Data: label pos=%d\n", data->u.num);
break;
default:
- ShowDebug("Data: %s\n", script_op2name(data->type));
+ ShowDebug("Data: %s\n", script->op2name(data->type));
break;
}
}
/// Reports on the console information about the current built-in function.
-static void script_reportfunc(struct script_state* st)
+void script_reportfunc(struct script_state* st)
{
int i, params, id;
struct script_data* data;
@@ -411,7 +258,7 @@ static void script_reportfunc(struct script_state* st)
for( i = 2; i <= script_lastdata(st); i++ )
{
- script_reportdata(script_getdata(st,i));
+ script->reportdata(script_getdata(st,i));
}
}
else
@@ -424,33 +271,33 @@ static void script_reportfunc(struct script_state* st)
/*==========================================
* Output error message
*------------------------------------------*/
-static void disp_error_message2(const char *mes,const char *pos,int report)
+void disp_error_message2(const char *mes,const char *pos,int report)
{
- error_msg = aStrdup(mes);
- error_pos = pos;
- error_report = report;
- longjmp( error_jump, 1 );
+ script->error_msg = aStrdup(mes);
+ script->error_pos = pos;
+ script->error_report = report;
+ longjmp( script->error_jump, 1 );
}
-#define disp_error_message(mes,pos) disp_error_message2(mes,pos,1)
+#define disp_error_message(mes,pos) script->disp_error_message2(mes,pos,1)
-static void disp_warning_message(const char *mes, const char *pos) {
- script->warning(parser_current_src,parser_current_file,parser_current_line,mes,pos);
+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);
}
/// Checks event parameter validity
-static void check_event(struct script_state *st, const char *evt)
+void check_event(struct script_state *st, const char *evt)
{
if( evt && evt[0] && !stristr(evt, "::On") )
{
ShowWarning("NPC event parameter deprecated! Please use 'NPCNAME::OnEVENT' instead of '%s'.\n", evt);
- script_reportsrc(st);
+ script->reportsrc(st);
}
}
/*==========================================
* Hashes the input string
*------------------------------------------*/
-static unsigned int calc_hash(const char* p)
+unsigned int calc_hash(const char* p)
{
unsigned int h;
@@ -500,7 +347,7 @@ int script_search_str(const char* p)
{
int i;
- for( i = str_hash[calc_hash(p)]; i != 0; i = script->str_data[i].next )
+ 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 )
return i;
@@ -514,12 +361,12 @@ int script_add_str(const char* p)
int i, h;
int len;
- h = calc_hash(p);
+ h = script->calc_hash(p);
- if( str_hash[h] == 0 ) {// empty bucket, add new node here
- str_hash[h] = script->str_num;
+ 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 = str_hash[h]; ; i = script->str_data[i].next ) {
+ for( i = script->str_hash[h]; ; i = script->str_data[i].next ) {
if( strcasecmp(script->get_str(i),p) == 0 )
return i; // string already in list
if( script->str_data[i].next == 0 )
@@ -561,43 +408,43 @@ int script_add_str(const char* p)
/// Appends 1 byte to the script buffer.
-static void add_scriptb(int a)
+void add_scriptb(int a)
{
- if( script_pos+1 >= script_size )
+ if( script->pos+1 >= script->size )
{
- script_size += SCRIPT_BLOCK_SIZE;
- RECREATE(script_buf,unsigned char,script_size);
+ script->size += SCRIPT_BLOCK_SIZE;
+ RECREATE(script->buf,unsigned char,script->size);
}
- script_buf[script_pos++] = (uint8)(a);
+ script->buf[script->pos++] = (uint8)(a);
}
/// Appends a c_op value to the script buffer.
/// The value is variable-length encoded into 8-bit blocks.
/// The encoding scheme is ( 01?????? )* 00??????, LSB first.
/// All blocks but the last hold 7 bits of data, topmost bit is always 1 (carries).
-static void add_scriptc(int a)
+void add_scriptc(int a)
{
while( a >= 0x40 )
{
- add_scriptb((a&0x3f)|0x40);
+ script->addb((a&0x3f)|0x40);
a = (a - 0x40) >> 6;
}
- add_scriptb(a);
+ script->addb(a);
}
/// Appends an integer value to the script buffer.
/// The value is variable-length encoded into 8-bit blocks.
/// The encoding scheme is ( 11?????? )* 10??????, LSB first.
/// All blocks but the last hold 7 bits of data, topmost bit is always 1 (carries).
-static void add_scripti(int a)
+void add_scripti(int a)
{
while( a >= 0x40 )
{
- add_scriptb((a&0x3f)|0xc0);
+ script->addb((a&0x3f)|0xc0);
a = (a - 0x40) >> 6;
}
- add_scriptb(a|0x80);
+ script->addb(a|0x80);
}
/// Appends a script->str_data object (label/function/variable/integer) to the script buffer.
@@ -605,37 +452,37 @@ static void add_scripti(int a)
///
/// @param l The id of the script->str_data entry
// Maximum up to 16M
-static void add_scriptl(int l)
+void add_scriptl(int l)
{
int backpatch = script->str_data[l].backpatch;
switch(script->str_data[l].type){
case C_POS:
case C_USERFUNC_POS:
- add_scriptc(C_POS);
- add_scriptb(script->str_data[l].label);
- add_scriptb(script->str_data[l].label>>8);
- add_scriptb(script->str_data[l].label>>16);
+ script->addc(C_POS);
+ script->addb(script->str_data[l].label);
+ script->addb(script->str_data[l].label>>8);
+ script->addb(script->str_data[l].label>>16);
break;
case C_NOP:
case C_USERFUNC:
// Embedded data backpatch there is a possibility of label
- add_scriptc(C_NAME);
- script->str_data[l].backpatch = script_pos;
- add_scriptb(backpatch);
- add_scriptb(backpatch>>8);
- add_scriptb(backpatch>>16);
+ script->addc(C_NAME);
+ script->str_data[l].backpatch = script->pos;
+ script->addb(backpatch);
+ script->addb(backpatch>>8);
+ script->addb(backpatch>>16);
break;
case C_INT:
- add_scripti(abs(script->str_data[l].val));
+ script->addi(abs(script->str_data[l].val));
if( script->str_data[l].val < 0 ) //Notice that this is negative, from jA (Rayce)
- add_scriptc(C_NEG);
+ script->addc(C_NEG);
break;
default: // assume C_NAME
- add_scriptc(C_NAME);
- add_scriptb(l);
- add_scriptb(l>>8);
- add_scriptb(l>>16);
+ script->addc(C_NAME);
+ script->addb(l);
+ script->addb(l>>8);
+ script->addb(l>>16);
break;
}
}
@@ -659,9 +506,9 @@ void set_label(int l,int pos, const char* script_pos)
script->str_data[l].type=(script->str_data[l].type == C_USERFUNC ? C_USERFUNC_POS : C_POS);
script->str_data[l].label=pos;
for(i=script->str_data[l].backpatch;i>=0 && i!=0x00ffffff;){
- next=GETVALUE(script_buf,i);
- script_buf[i-1]=(script->str_data[l].type == C_USERFUNC ? C_USERFUNC_POS : C_POS);
- SETVALUE(script_buf,i,pos);
+ next=GETVALUE(script->buf,i);
+ script->buf[i-1]=(script->str_data[l].type == C_USERFUNC ? C_USERFUNC_POS : C_POS);
+ SETVALUE(script->buf,i,pos);
i=next;
}
}
@@ -686,7 +533,7 @@ const char* script_skip_space(const char* p)
for(;;)
{
if( *p == '\0' ) {
- disp_warning_message("script:script->skip_space: end of file while parsing block comment. expected "CL_BOLD"*/"CL_NORM, p);
+ script->disp_warning_message("script:script->skip_space: end of file while parsing block comment. expected "CL_BOLD"*/"CL_NORM, p);
return p;
}
if( *p == '*' && p[1] == '/' )
@@ -706,7 +553,7 @@ const char* script_skip_space(const char* p)
/// Skips a word.
/// A word consists of undercores and/or alphanumeric characters,
/// and valid variable prefixes/postfixes.
-static const char* skip_word(const char* p) {
+const char* skip_word(const char* p) {
// prefix
switch( *p ) {
case '@':// temporary char variable
@@ -733,12 +580,12 @@ static const char* skip_word(const char* p) {
/// Adds a word to script->str_data.
/// @see skip_word
/// @see script->add_str
-static int add_word(const char* p) {
+int add_word(const char* p) {
int len;
int i;
// Check for a word
- len = skip_word(p) - p;
+ len = script->skip_word(p) - p;
if( len == 0 )
disp_error_message("script:add_word: invalid word. A word consists of undercores and/or alphanumeric characters, and valid variable prefixes/postfixes.", p);
@@ -765,20 +612,20 @@ const char* parse_callfunc(const char* p, int require_paren, int is_custom)
char *arg = NULL;
int func;
- func = add_word(p);
+ func = script->add_word(p);
if( script->str_data[func].type == C_FUNC ){
char argT = 0;
// buildin function
- add_scriptl(func);
- add_scriptc(C_ARG);
+ script->addl(func);
+ script->addc(C_ARG);
arg = script->buildin[script->str_data[func].val];
if( !arg ) arg = &argT;
} else if( script->str_data[func].type == C_USERFUNC || script->str_data[func].type == C_USERFUNC_POS ){
// script defined function
- add_scriptl(buildin_callsub_ref);
- add_scriptc(C_ARG);
- add_scriptl(func);
- arg = script->buildin[script->str_data[buildin_callsub_ref].val];
+ script->addl(script->buildin_callsub_ref);
+ script->addc(C_ARG);
+ script->addl(func);
+ arg = script->buildin[script->str_data[script->buildin_callsub_ref].val];
if( *arg == 0 )
disp_error_message("parse_callfunc: callsub has no arguments, please review its definition",p);
if( *arg != '*' )
@@ -791,45 +638,45 @@ const char* parse_callfunc(const char* p, int require_paren, int is_custom)
disp_error_message("parse_line: expect command, missing function name or calling undeclared function",p);
#ifdef SCRIPT_CALLFUNC_CHECK
} else {;
- add_scriptl(buildin_callfunc_ref);
- add_scriptc(C_ARG);
- add_scriptc(C_STR);
- while( *name ) add_scriptb(*name ++);
- add_scriptb(0);
- arg = script->buildin[script->str_data[buildin_callfunc_ref].val];
+ script->addl(script->buildin_callfunc_ref);
+ script->addc(C_ARG);
+ script->addc(C_STR);
+ while( *name ) script->addb(*name ++);
+ script->addb(0);
+ arg = script->buildin[script->str_data[script->buildin_callfunc_ref].val];
if( *arg != '*' ) ++ arg;
}
#endif
}
- p = skip_word(p);
+ p = script->skip_word(p);
p = script->skip_space(p);
- syntax.curly[syntax.curly_count].type = TYPE_ARGLIST;
- syntax.curly[syntax.curly_count].count = 0;
+ script->syntax.curly[script->syntax.curly_count].type = TYPE_ARGLIST;
+ script->syntax.curly[script->syntax.curly_count].count = 0;
if( *p == ';' )
{// <func name> ';'
- syntax.curly[syntax.curly_count].flag = ARGLIST_NO_PAREN;
+ script->syntax.curly[script->syntax.curly_count].flag = ARGLIST_NO_PAREN;
} else if( *p == '(' && *(p2=script->skip_space(p+1)) == ')' )
{// <func name> '(' ')'
- syntax.curly[syntax.curly_count].flag = ARGLIST_PAREN;
+ script->syntax.curly[script->syntax.curly_count].flag = ARGLIST_PAREN;
p = p2;
/*
} else if( 0 && require_paren && *p != '(' )
{// <func name>
- syntax.curly[syntax.curly_count].flag = ARGLIST_NO_PAREN;
+ script->syntax.curly[script->syntax.curly_count].flag = ARGLIST_NO_PAREN;
*/
} else {// <func name> <arg list>
if( require_paren ){
if( *p != '(' )
disp_error_message("need '('",p);
++p; // skip '('
- syntax.curly[syntax.curly_count].flag = ARGLIST_PAREN;
+ script->syntax.curly[script->syntax.curly_count].flag = ARGLIST_PAREN;
} else if( *p == '(' ){
- syntax.curly[syntax.curly_count].flag = ARGLIST_UNDEFINED;
+ script->syntax.curly[script->syntax.curly_count].flag = ARGLIST_UNDEFINED;
} else {
- syntax.curly[syntax.curly_count].flag = ARGLIST_NO_PAREN;
+ script->syntax.curly[script->syntax.curly_count].flag = ARGLIST_NO_PAREN;
}
- ++syntax.curly_count;
+ ++script->syntax.curly_count;
while( *arg ) {
p2=script->parse_subexpr(p,-1);
if( p == p2 )
@@ -842,30 +689,30 @@ const char* parse_callfunc(const char* p, int require_paren, int is_custom)
break; // no more arguments
++p; // skip comma
}
- --syntax.curly_count;
+ --script->syntax.curly_count;
}
if( arg && *arg && *arg != '?' && *arg != '*' )
disp_error_message2("parse_callfunc: not enough arguments, expected ','", p, script->config.warn_func_mismatch_paramnum);
- if( syntax.curly[syntax.curly_count].type != TYPE_ARGLIST )
+ if( script->syntax.curly[script->syntax.curly_count].type != TYPE_ARGLIST )
disp_error_message("parse_callfunc: DEBUG last curly is not an argument list",p);
- if( syntax.curly[syntax.curly_count].flag == ARGLIST_PAREN ){
+ if( script->syntax.curly[script->syntax.curly_count].flag == ARGLIST_PAREN ){
if( *p != ')' )
disp_error_message("parse_callfunc: expected ')' to close argument list",p);
++p;
}
- add_scriptc(C_FUNC);
+ script->addc(C_FUNC);
return p;
}
/// Processes end of logical script line.
/// @param first When true, only fix up scheduling data is initialized
/// @param p Script position for error reporting in set_label
-static void parse_nextline(bool first, const char* p)
+void parse_nextline(bool first, const char* p)
{
if( !first )
{
- add_scriptc(C_EOL); // mark end of line for stack cleanup
- set_label(LABEL_NEXTLINE, script_pos, p); // fix up '-' labels
+ script->addc(C_EOL); // mark end of line for stack cleanup
+ script->set_label(LABEL_NEXTLINE, script->pos, p); // fix up '-' labels
}
// initialize data for new '-' label fix up scheduling
@@ -884,7 +731,7 @@ const char* parse_variable(const char* p) {
const char *var = p;
// skip the variable where applicable
- p = skip_word(p);
+ p = script->skip_word(p);
p = script->skip_space(p);
if( p == NULL ) {// end of the line or invalid buffer
@@ -944,19 +791,19 @@ const char* parse_variable(const char* p) {
}
// push the set function onto the stack
- add_scriptl(buildin_set_ref);
- add_scriptc(C_ARG);
+ script->addl(script->buildin_set_ref);
+ script->addc(C_ARG);
// always append parenthesis to avoid errors
- syntax.curly[syntax.curly_count].type = TYPE_ARGLIST;
- syntax.curly[syntax.curly_count].count = 0;
- syntax.curly[syntax.curly_count].flag = ARGLIST_PAREN;
+ script->syntax.curly[script->syntax.curly_count].type = TYPE_ARGLIST;
+ script->syntax.curly[script->syntax.curly_count].count = 0;
+ script->syntax.curly[script->syntax.curly_count].flag = ARGLIST_PAREN;
// increment the total curly count for the position in the script
- ++ syntax.curly_count;
+ ++ script->syntax.curly_count;
// parse the variable currently being modified
- word = add_word(var);
+ word = script->add_word(var);
if( script->str_data[word].type == C_FUNC || script->str_data[word].type == C_USERFUNC || script->str_data[word].type == C_USERFUNC_POS )
{// cannot assign a variable which exists as a function or label
@@ -967,9 +814,9 @@ const char* parse_variable(const char* p) {
const char* p3 = NULL;
// push the getelementofarray method into the stack
- add_scriptl(buildin_getelementofarray_ref);
- add_scriptc(C_ARG);
- add_scriptl(word);
+ script->addl(script->buildin_getelementofarray_ref);
+ script->addc(C_ARG);
+ script->addl(word);
// process the sub-expression for this assignment
p3 = script->parse_subexpr(p2 + 1, 1);
@@ -980,32 +827,32 @@ const char* parse_variable(const char* p) {
}
// push the closing function stack operator onto the stack
- add_scriptc(C_FUNC);
+ script->addc(C_FUNC);
p3 ++;
} else {// simply push the variable or value onto the stack
- add_scriptl(word);
+ script->addl(word);
}
if( type != C_EQ )
- add_scriptc(C_REF);
+ script->addc(C_REF);
if( type == C_ADD_PP || type == C_SUB_PP ) {// incremental operator for the method
- add_scripti(1);
- add_scriptc(type == C_ADD_PP ? C_ADD : C_SUB);
+ script->addi(1);
+ script->addc(type == C_ADD_PP ? C_ADD : C_SUB);
} else {// process the value as an expression
p = script->parse_subexpr(p, -1);
if( type != C_EQ )
{// push the type of modifier onto the stack
- add_scriptc(type);
+ script->addc(type);
}
}
// decrement the curly count for the position within the script
- -- syntax.curly_count;
+ -- script->syntax.curly_count;
// close the script by appending the function operator
- add_scriptc(C_FUNC);
+ script->addc(C_FUNC);
// push the buffer from the method
return p;
@@ -1022,18 +869,18 @@ const char* parse_simpleexpr(const char *p)
if(*p==';' || *p==',')
disp_error_message("parse_simpleexpr: unexpected end of expression",p);
if(*p=='('){
- if( (i=syntax.curly_count-1) >= 0 && syntax.curly[i].type == TYPE_ARGLIST )
- ++syntax.curly[i].count;
+ if( (i=script->syntax.curly_count-1) >= 0 && script->syntax.curly[i].type == TYPE_ARGLIST )
+ ++script->syntax.curly[i].count;
p=script->parse_subexpr(p+1,-1);
p=script->skip_space(p);
- if( (i=syntax.curly_count-1) >= 0 && syntax.curly[i].type == TYPE_ARGLIST &&
- syntax.curly[i].flag == ARGLIST_UNDEFINED && --syntax.curly[i].count == 0
+ if( (i=script->syntax.curly_count-1) >= 0 && script->syntax.curly[i].type == TYPE_ARGLIST &&
+ script->syntax.curly[i].flag == ARGLIST_UNDEFINED && --script->syntax.curly[i].count == 0
){
if( *p == ',' ){
- syntax.curly[i].flag = ARGLIST_PAREN;
+ script->syntax.curly[i].flag = ARGLIST_PAREN;
return p;
} else
- syntax.curly[i].flag = ARGLIST_NO_PAREN;
+ script->syntax.curly[i].flag = ARGLIST_NO_PAREN;
}
if( *p != ')' )
disp_error_message("parse_simpleexpr: unmatched ')'",p);
@@ -1044,15 +891,15 @@ const char* parse_simpleexpr(const char *p)
i=strtoll(p,&np,0);
if( i < INT_MIN ) {
i = INT_MIN;
- disp_warning_message("parse_simpleexpr: underflow detected, capping value to INT_MIN",p);
+ script->disp_warning_message("parse_simpleexpr: underflow detected, capping value to INT_MIN",p);
} else if( i > INT_MAX ) {
i = INT_MAX;
- disp_warning_message("parse_simpleexpr: overflow detected, capping value to INT_MAX",p);
+ script->disp_warning_message("parse_simpleexpr: overflow detected, capping value to INT_MAX",p);
}
- add_scripti((int)i);
+ script->addi((int)i);
p=np;
} else if(*p=='"'){
- add_scriptc(C_STR);
+ script->addc(C_STR);
p++;
while( *p && *p != '"' ){
if( (unsigned char)p[-1] <= 0x7e && *p == '\\' ) {
@@ -1062,56 +909,56 @@ const char* parse_simpleexpr(const char *p)
if( n != 1 )
ShowDebug("parse_simpleexpr: unexpected length %d after unescape (\"%.*s\" -> %.*s)\n", (int)n, (int)len, p, (int)n, buf);
p += len;
- add_scriptb(*buf);
+ script->addb(*buf);
continue;
} else if( *p == '\n' )
disp_error_message("parse_simpleexpr: unexpected newline @ string",p);
- add_scriptb(*p++);
+ script->addb(*p++);
}
if(!*p)
disp_error_message("parse_simpleexpr: unexpected end of file @ string",p);
- add_scriptb(0);
+ script->addb(0);
p++; //'"'
} else {
int l;
const char* pv;
// label , register , function etc
- if(skip_word(p)==p)
+ if(script->skip_word(p)==p)
disp_error_message("parse_simpleexpr: unexpected character",p);
- l=add_word(p);
+ l=script->add_word(p);
if( script->str_data[l].type == C_FUNC || script->str_data[l].type == C_USERFUNC || script->str_data[l].type == C_USERFUNC_POS)
- return parse_callfunc(p,1,0);
+ return script->parse_callfunc(p,1,0);
#ifdef SCRIPT_CALLFUNC_CHECK
else {
const char* name = script->get_str(l);
if( strdb_get(script->userfunc_db,name) != NULL ) {
- return parse_callfunc(p,1,1);
+ return script->parse_callfunc(p,1,1);
}
}
#endif
- if( (pv = parse_variable(p)) )
+ if( (pv = script->parse_variable(p)) )
{// successfully processed a variable assignment
return pv;
}
- p=skip_word(p);
+ p=script->skip_word(p);
if( *p == '[' ){
// array(name[i] => getelementofarray(name,i) )
- add_scriptl(buildin_getelementofarray_ref);
- add_scriptc(C_ARG);
- add_scriptl(l);
+ script->addl(script->buildin_getelementofarray_ref);
+ script->addc(C_ARG);
+ script->addl(l);
p=script->parse_subexpr(p+1,-1);
p=script->skip_space(p);
if( *p != ']' )
disp_error_message("parse_simpleexpr: unmatched ']'",p);
++p;
- add_scriptc(C_FUNC);
+ script->addc(C_FUNC);
}else
- add_scriptl(l);
+ script->addl(l);
}
@@ -1131,7 +978,7 @@ const char* script_parse_subexpr(const char* p,int limit)
if( *p == '-' ){
tmpp = script->skip_space(p+1);
if( *tmpp == ';' || *tmpp == ',' ){
- add_scriptl(LABEL_NEXTLINE);
+ script->addl(LABEL_NEXTLINE);
p++;
return p;
}
@@ -1139,9 +986,9 @@ const char* script_parse_subexpr(const char* p,int limit)
if((op=C_NEG,*p=='-') || (op=C_LNOT,*p=='!') || (op=C_NOT,*p=='~')){
p=script->parse_subexpr(p+1,10);
- add_scriptc(op);
+ script->addc(op);
} else
- p=parse_simpleexpr(p);
+ p=script->parse_simpleexpr(p);
p=script->skip_space(p);
while((
(op=C_OP3,opl=0,len=1,*p=='?') ||
@@ -1173,7 +1020,7 @@ const char* script_parse_subexpr(const char* p,int limit)
} else {
p=script->parse_subexpr(p,opl);
}
- add_scriptc(op);
+ script->addc(op);
p=script->skip_space(p);
}
@@ -1204,40 +1051,40 @@ const char* parse_line(const char* p)
p=script->skip_space(p);
if(*p==';') {
//Close decision for if(); for(); while();
- p = parse_syntax_close(p + 1);
+ p = script->parse_syntax_close(p + 1);
return p;
}
- if(*p==')' && parse_syntax_for_flag)
+ if(*p==')' && script->parse_syntax_for_flag)
return p+1;
p = script->skip_space(p);
if(p[0] == '{') {
- syntax.curly[syntax.curly_count].type = TYPE_NULL;
- syntax.curly[syntax.curly_count].count = -1;
- syntax.curly[syntax.curly_count].index = -1;
- syntax.curly_count++;
+ script->syntax.curly[script->syntax.curly_count].type = TYPE_NULL;
+ script->syntax.curly[script->syntax.curly_count].count = -1;
+ script->syntax.curly[script->syntax.curly_count].index = -1;
+ script->syntax.curly_count++;
return p + 1;
} else if(p[0] == '}') {
- return parse_curly_close(p);
+ return script->parse_curly_close(p);
}
// Syntax-related processing
- p2 = parse_syntax(p);
+ p2 = script->parse_syntax(p);
if(p2 != NULL)
return p2;
// attempt to process a variable assignment
- p2 = parse_variable(p);
+ p2 = script->parse_variable(p);
if( p2 != NULL )
{// variable assignment processed so leave the method
- return parse_syntax_close(p2 + 1);
+ return script->parse_syntax_close(p2 + 1);
}
- p = parse_callfunc(p,0,0);
+ p = script->parse_callfunc(p,0,0);
p = script->skip_space(p);
- if(parse_syntax_for_flag) {
+ if(script->parse_syntax_for_flag) {
if( *p != ')' )
disp_error_message("parse_line: need ')'",p);
} else {
@@ -1246,7 +1093,7 @@ const char* parse_line(const char* p)
}
//Binding decision for if(), for(), while()
- p = parse_syntax_close(p+1);
+ p = script->parse_syntax_close(p+1);
return p;
}
@@ -1254,52 +1101,52 @@ const char* parse_line(const char* p)
// { ... } Closing process
const char* parse_curly_close(const char* p)
{
- if(syntax.curly_count <= 0) {
+ if(script->syntax.curly_count <= 0) {
disp_error_message("parse_curly_close: unexpected string",p);
return p + 1;
- } else if(syntax.curly[syntax.curly_count-1].type == TYPE_NULL) {
- syntax.curly_count--;
+ } else if(script->syntax.curly[script->syntax.curly_count-1].type == TYPE_NULL) {
+ script->syntax.curly_count--;
//Close decision if, for , while
- p = parse_syntax_close(p + 1);
+ p = script->parse_syntax_close(p + 1);
return p;
- } else if(syntax.curly[syntax.curly_count-1].type == TYPE_SWITCH) {
+ } else if(script->syntax.curly[script->syntax.curly_count-1].type == TYPE_SWITCH) {
//Closing switch()
- int pos = syntax.curly_count-1;
+ int pos = script->syntax.curly_count-1;
char label[256];
int l;
// Remove temporary variables
- sprintf(label,"set $@__SW%x_VAL,0;",syntax.curly[pos].index);
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
+ sprintf(label,"set $@__SW%x_VAL,0;",script->syntax.curly[pos].index);
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ script->parse_line(label);
+ script->syntax.curly_count--;
// Go to the end pointer unconditionally
- sprintf(label,"goto __SW%x_FIN;",syntax.curly[pos].index);
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
+ sprintf(label,"goto __SW%x_FIN;",script->syntax.curly[pos].index);
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ script->parse_line(label);
+ script->syntax.curly_count--;
// You are here labeled
- sprintf(label,"__SW%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
+ sprintf(label,"__SW%x_%x",script->syntax.curly[pos].index,script->syntax.curly[pos].count);
l=script->add_str(label);
- set_label(l,script_pos, p);
+ script->set_label(l,script->pos, p);
- if(syntax.curly[pos].flag) {
+ if(script->syntax.curly[pos].flag) {
//Exists default
- sprintf(label,"goto __SW%x_DEF;",syntax.curly[pos].index);
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
+ sprintf(label,"goto __SW%x_DEF;",script->syntax.curly[pos].index);
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ script->parse_line(label);
+ script->syntax.curly_count--;
}
// Label end
- sprintf(label,"__SW%x_FIN",syntax.curly[pos].index);
+ sprintf(label,"__SW%x_FIN",script->syntax.curly[pos].index);
l=script->add_str(label);
- set_label(l,script_pos, p);
- linkdb_final(&syntax.curly[pos].case_label); // free the list of case label
- syntax.curly_count--;
+ script->set_label(l,script->pos, p);
+ linkdb_final(&script->syntax.curly[pos].case_label); // free the list of case label
+ script->syntax.curly_count--;
//Closing decision if, for , while
- p = parse_syntax_close(p + 1);
+ p = script->parse_syntax_close(p + 1);
return p;
} else {
disp_error_message("parse_curly_close: unexpected string",p);
@@ -1312,7 +1159,7 @@ const char* parse_curly_close(const char* p)
// if, switch, while ? will handle this internally.
const char* parse_syntax(const char* p)
{
- const char *p2 = skip_word(p);
+ const char *p2 = script->skip_word(p);
switch(*p) {
case 'B':
@@ -1320,19 +1167,19 @@ const char* parse_syntax(const char* p)
if(p2 - p == 5 && !strncasecmp(p,"break",5)) {
// break Processing
char label[256];
- int pos = syntax.curly_count - 1;
+ int pos = script->syntax.curly_count - 1;
while(pos >= 0) {
- if(syntax.curly[pos].type == TYPE_DO) {
- sprintf(label,"goto __DO%x_FIN;",syntax.curly[pos].index);
+ if(script->syntax.curly[pos].type == TYPE_DO) {
+ sprintf(label,"goto __DO%x_FIN;",script->syntax.curly[pos].index);
break;
- } else if(syntax.curly[pos].type == TYPE_FOR) {
- sprintf(label,"goto __FR%x_FIN;",syntax.curly[pos].index);
+ } else if(script->syntax.curly[pos].type == TYPE_FOR) {
+ sprintf(label,"goto __FR%x_FIN;",script->syntax.curly[pos].index);
break;
- } else if(syntax.curly[pos].type == TYPE_WHILE) {
- sprintf(label,"goto __WL%x_FIN;",syntax.curly[pos].index);
+ } else if(script->syntax.curly[pos].type == TYPE_WHILE) {
+ sprintf(label,"goto __WL%x_FIN;",script->syntax.curly[pos].index);
break;
- } else if(syntax.curly[pos].type == TYPE_SWITCH) {
- sprintf(label,"goto __SW%x_FIN;",syntax.curly[pos].index);
+ } else if(script->syntax.curly[pos].type == TYPE_SWITCH) {
+ sprintf(label,"goto __SW%x_FIN;",script->syntax.curly[pos].index);
break;
}
pos--;
@@ -1340,15 +1187,15 @@ const char* parse_syntax(const char* p)
if(pos < 0) {
disp_error_message("parse_syntax: unexpected 'break'",p);
} else {
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ script->parse_line(label);
+ script->syntax.curly_count--;
}
p = script->skip_space(p2);
if(*p != ';')
disp_error_message("parse_syntax: need ';'",p);
// Closing decision if, for , while
- p = parse_syntax_close(p + 1);
+ p = script->parse_syntax_close(p + 1);
return p;
}
break;
@@ -1356,25 +1203,25 @@ const char* parse_syntax(const char* p)
case 'C':
if(p2 - p == 4 && !strncasecmp(p,"case",4)) {
//Processing case
- int pos = syntax.curly_count-1;
- if(pos < 0 || syntax.curly[pos].type != TYPE_SWITCH) {
+ int pos = script->syntax.curly_count-1;
+ if(pos < 0 || script->syntax.curly[pos].type != TYPE_SWITCH) {
disp_error_message("parse_syntax: unexpected 'case' ",p);
return p+1;
} else {
char label[256];
int l,v;
char *np;
- if(syntax.curly[pos].count != 1) {
+ if(script->syntax.curly[pos].count != 1) {
//Jump for FALLTHRU
- sprintf(label,"goto __SW%x_%xJ;",syntax.curly[pos].index,syntax.curly[pos].count);
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
+ sprintf(label,"goto __SW%x_%xJ;",script->syntax.curly[pos].index,script->syntax.curly[pos].count);
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ script->parse_line(label);
+ script->syntax.curly_count--;
// You are here labeled
- sprintf(label,"__SW%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
+ sprintf(label,"__SW%x_%x",script->syntax.curly[pos].index,script->syntax.curly[pos].count);
l=script->add_str(label);
- set_label(l,script_pos, p);
+ script->set_label(l,script->pos, p);
}
//Decision statement switch
p = script->skip_space(p2);
@@ -1384,17 +1231,17 @@ const char* parse_syntax(const char* p)
// check whether case label is integer or not
v = strtol(p,&np,0);
if(np == p) { //Check for constants
- p2 = skip_word(p);
+ p2 = script->skip_word(p);
v = p2-p; // length of word at p2
memcpy(label,p,v);
label[v]='\0';
if( !script->get_constant(label, &v) )
disp_error_message("parse_syntax: 'case' label is not an integer",p);
- p = skip_word(p);
+ p = script->skip_word(p);
} else { //Numeric value
if((*p == '-' || *p == '+') && ISDIGIT(p[1])) // pre-skip because '-' can not skip_word
p++;
- p = skip_word(p);
+ p = script->skip_word(p);
if(np != p)
disp_error_message("parse_syntax: 'case' label is not an integer",np);
}
@@ -1402,45 +1249,45 @@ const char* parse_syntax(const char* p)
if(*p != ':')
disp_error_message("parse_syntax: expect ':'",p);
sprintf(label,"if(%d != $@__SW%x_VAL) goto __SW%x_%x;",
- v,syntax.curly[pos].index,syntax.curly[pos].index,syntax.curly[pos].count+1);
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ v,script->syntax.curly[pos].index,script->syntax.curly[pos].index,script->syntax.curly[pos].count+1);
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
// Bad I do not parse twice
- p2 = parse_line(label);
- parse_line(p2);
- syntax.curly_count--;
- if(syntax.curly[pos].count != 1) {
+ p2 = script->parse_line(label);
+ script->parse_line(p2);
+ script->syntax.curly_count--;
+ if(script->syntax.curly[pos].count != 1) {
// Label after the completion of FALLTHRU
- sprintf(label,"__SW%x_%xJ",syntax.curly[pos].index,syntax.curly[pos].count);
+ sprintf(label,"__SW%x_%xJ",script->syntax.curly[pos].index,script->syntax.curly[pos].count);
l=script->add_str(label);
- set_label(l,script_pos,p);
+ script->set_label(l,script->pos,p);
}
// check duplication of case label [Rayce]
- if(linkdb_search(&syntax.curly[pos].case_label, (void*)__64BPTRSIZE(v)) != NULL)
+ if(linkdb_search(&script->syntax.curly[pos].case_label, (void*)__64BPTRSIZE(v)) != NULL)
disp_error_message("parse_syntax: dup 'case'",p);
- linkdb_insert(&syntax.curly[pos].case_label, (void*)__64BPTRSIZE(v), (void*)1);
+ linkdb_insert(&script->syntax.curly[pos].case_label, (void*)__64BPTRSIZE(v), (void*)1);
- sprintf(label,"set $@__SW%x_VAL,0;",syntax.curly[pos].index);
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
+ sprintf(label,"set $@__SW%x_VAL,0;",script->syntax.curly[pos].index);
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
- syntax.curly[pos].count++;
+ script->parse_line(label);
+ script->syntax.curly_count--;
+ script->syntax.curly[pos].count++;
}
return p + 1;
} else if(p2 - p == 8 && !strncasecmp(p,"continue",8)) {
// Processing continue
char label[256];
- int pos = syntax.curly_count - 1;
+ int pos = script->syntax.curly_count - 1;
while(pos >= 0) {
- if(syntax.curly[pos].type == TYPE_DO) {
- sprintf(label,"goto __DO%x_NXT;",syntax.curly[pos].index);
- syntax.curly[pos].flag = 1; //Flag put the link for continue
+ if(script->syntax.curly[pos].type == TYPE_DO) {
+ sprintf(label,"goto __DO%x_NXT;",script->syntax.curly[pos].index);
+ script->syntax.curly[pos].flag = 1; //Flag put the link for continue
break;
- } else if(syntax.curly[pos].type == TYPE_FOR) {
- sprintf(label,"goto __FR%x_NXT;",syntax.curly[pos].index);
+ } else if(script->syntax.curly[pos].type == TYPE_FOR) {
+ sprintf(label,"goto __FR%x_NXT;",script->syntax.curly[pos].index);
break;
- } else if(syntax.curly[pos].type == TYPE_WHILE) {
- sprintf(label,"goto __WL%x_NXT;",syntax.curly[pos].index);
+ } else if(script->syntax.curly[pos].type == TYPE_WHILE) {
+ sprintf(label,"goto __WL%x_NXT;",script->syntax.curly[pos].index);
break;
}
pos--;
@@ -1448,15 +1295,15 @@ const char* parse_syntax(const char* p)
if(pos < 0) {
disp_error_message("parse_syntax: unexpected 'continue'",p);
} else {
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ script->parse_line(label);
+ script->syntax.curly_count--;
}
p = script->skip_space(p2);
if(*p != ';')
disp_error_message("parse_syntax: need ';'",p);
//Closing decision if, for , while
- p = parse_syntax_close(p + 1);
+ p = script->parse_syntax_close(p + 1);
return p;
}
break;
@@ -1464,10 +1311,10 @@ const char* parse_syntax(const char* p)
case 'D':
if(p2 - p == 7 && !strncasecmp(p,"default",7)) {
// Switch - default processing
- int pos = syntax.curly_count-1;
- if(pos < 0 || syntax.curly[pos].type != TYPE_SWITCH) {
+ int pos = script->syntax.curly_count-1;
+ if(pos < 0 || script->syntax.curly[pos].type != TYPE_SWITCH) {
disp_error_message("parse_syntax: unexpected 'default'",p);
- } else if(syntax.curly[pos].flag) {
+ } else if(script->syntax.curly[pos].flag) {
disp_error_message("parse_syntax: dup 'default'",p);
} else {
char label[256];
@@ -1477,23 +1324,23 @@ const char* parse_syntax(const char* p)
if(*p != ':') {
disp_error_message("parse_syntax: need ':'",p);
}
- sprintf(label,"__SW%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
+ sprintf(label,"__SW%x_%x",script->syntax.curly[pos].index,script->syntax.curly[pos].count);
l=script->add_str(label);
- set_label(l,script_pos,p);
+ script->set_label(l,script->pos,p);
// Skip to the next link w/o condition
- sprintf(label,"goto __SW%x_%x;",syntax.curly[pos].index,syntax.curly[pos].count+1);
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
+ sprintf(label,"goto __SW%x_%x;",script->syntax.curly[pos].index,script->syntax.curly[pos].count+1);
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ script->parse_line(label);
+ script->syntax.curly_count--;
// The default label
- sprintf(label,"__SW%x_DEF",syntax.curly[pos].index);
+ sprintf(label,"__SW%x_DEF",script->syntax.curly[pos].index);
l=script->add_str(label);
- set_label(l,script_pos,p);
+ script->set_label(l,script->pos,p);
- syntax.curly[syntax.curly_count - 1].flag = 1;
- syntax.curly[pos].count++;
+ script->syntax.curly[script->syntax.curly_count - 1].flag = 1;
+ script->syntax.curly[pos].count++;
}
return p + 1;
} else if(p2 - p == 2 && !strncasecmp(p,"do",2)) {
@@ -1501,15 +1348,15 @@ const char* parse_syntax(const char* p)
char label[256];
p=script->skip_space(p2);
- syntax.curly[syntax.curly_count].type = TYPE_DO;
- syntax.curly[syntax.curly_count].count = 1;
- syntax.curly[syntax.curly_count].index = syntax.index++;
- syntax.curly[syntax.curly_count].flag = 0;
+ script->syntax.curly[script->syntax.curly_count].type = TYPE_DO;
+ script->syntax.curly[script->syntax.curly_count].count = 1;
+ script->syntax.curly[script->syntax.curly_count].index = script->syntax.index++;
+ script->syntax.curly[script->syntax.curly_count].flag = 0;
// Label of the (do) form here
- sprintf(label,"__DO%x_BGN",syntax.curly[syntax.curly_count].index);
+ sprintf(label,"__DO%x_BGN",script->syntax.curly[script->syntax.curly_count].index);
l=script->add_str(label);
- set_label(l,script_pos,p);
- syntax.curly_count++;
+ script->set_label(l,script->pos,p);
+ script->syntax.curly_count++;
return p;
}
break;
@@ -1518,12 +1365,12 @@ const char* parse_syntax(const char* p)
if(p2 - p == 3 && !strncasecmp(p,"for",3)) {
int l;
char label[256];
- int pos = syntax.curly_count;
- syntax.curly[syntax.curly_count].type = TYPE_FOR;
- syntax.curly[syntax.curly_count].count = 1;
- syntax.curly[syntax.curly_count].index = syntax.index++;
- syntax.curly[syntax.curly_count].flag = 0;
- syntax.curly_count++;
+ int pos = script->syntax.curly_count;
+ 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++;
+ script->syntax.curly[script->syntax.curly_count].flag = 0;
+ script->syntax.curly_count++;
p=script->skip_space(p2);
@@ -1532,14 +1379,14 @@ const char* parse_syntax(const char* p)
p++;
// Execute the initialization statement
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- p=parse_line(p);
- syntax.curly_count--;
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ p=script->parse_line(p);
+ script->syntax.curly_count--;
// Form the start of label decision
- sprintf(label,"__FR%x_J",syntax.curly[pos].index);
+ sprintf(label,"__FR%x_J",script->syntax.curly[pos].index);
l=script->add_str(label);
- set_label(l,script_pos,p);
+ script->set_label(l,script->pos,p);
p=script->skip_space(p);
if(*p == ';') {
@@ -1547,47 +1394,47 @@ const char* parse_syntax(const char* p)
;
} else {
// Skip to the end point if the condition is false
- sprintf(label,"__FR%x_FIN",syntax.curly[pos].index);
- add_scriptl(script->add_str("jump_zero"));
- add_scriptc(C_ARG);
- p=parse_expr(p);
+ sprintf(label,"__FR%x_FIN",script->syntax.curly[pos].index);
+ script->addl(script->add_str("jump_zero"));
+ script->addc(C_ARG);
+ p=script->parse_expr(p);
p=script->skip_space(p);
- add_scriptl(script->add_str(label));
- add_scriptc(C_FUNC);
+ script->addl(script->add_str(label));
+ script->addc(C_FUNC);
}
if(*p != ';')
disp_error_message("parse_syntax: need ';'",p);
p++;
// Skip to the beginning of the loop
- sprintf(label,"goto __FR%x_BGN;",syntax.curly[pos].index);
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
+ sprintf(label,"goto __FR%x_BGN;",script->syntax.curly[pos].index);
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ script->parse_line(label);
+ script->syntax.curly_count--;
// Labels to form the next loop
- sprintf(label,"__FR%x_NXT",syntax.curly[pos].index);
+ sprintf(label,"__FR%x_NXT",script->syntax.curly[pos].index);
l=script->add_str(label);
- set_label(l,script_pos,p);
+ script->set_label(l,script->pos,p);
// Process the next time you enter the loop
// A ')' last for; flag to be treated as'
- parse_syntax_for_flag = 1;
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- p=parse_line(p);
- syntax.curly_count--;
- parse_syntax_for_flag = 0;
+ script->parse_syntax_for_flag = 1;
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ p=script->parse_line(p);
+ script->syntax.curly_count--;
+ script->parse_syntax_for_flag = 0;
// Skip to the determination process conditions
- sprintf(label,"goto __FR%x_J;",syntax.curly[pos].index);
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
+ sprintf(label,"goto __FR%x_J;",script->syntax.curly[pos].index);
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ script->parse_line(label);
+ script->syntax.curly_count--;
// Loop start labeling
- sprintf(label,"__FR%x_BGN",syntax.curly[pos].index);
+ sprintf(label,"__FR%x_BGN",script->syntax.curly[pos].index);
l=script->add_str(label);
- set_label(l,script_pos,p);
+ script->set_label(l,script->pos,p);
return p;
}
else if( p2 - p == 8 && strncasecmp(p,"function",8) == 0 )
@@ -1595,7 +1442,7 @@ const char* parse_syntax(const char* p)
const char *func_name;
func_name = script->skip_space(p2);
- p = skip_word(func_name);
+ p = script->skip_word(func_name);
if( p == func_name )
disp_error_message("parse_syntax:function: function name is missing or invalid", p);
p2 = script->skip_space(p);
@@ -1603,7 +1450,7 @@ const char* parse_syntax(const char* p)
{// function <name> ;
// function declaration - just register the name
int l;
- l = add_word(func_name);
+ l = script->add_word(func_name);
if( script->str_data[l].type == C_NOP )// register only, if the name was not used by something else
script->str_data[l].type = C_USERFUNC;
else if( script->str_data[l].type == C_USERFUNC )
@@ -1612,7 +1459,7 @@ const char* parse_syntax(const char* p)
disp_error_message("parse_syntax:function: function name is invalid", func_name);
// Close condition of if, for, while
- p = parse_syntax_close(p2 + 1);
+ p = script->parse_syntax_close(p2 + 1);
return p;
}
else if(*p2 == '{')
@@ -1620,27 +1467,27 @@ const char* parse_syntax(const char* p)
char label[256];
int l;
- syntax.curly[syntax.curly_count].type = TYPE_USERFUNC;
- syntax.curly[syntax.curly_count].count = 1;
- syntax.curly[syntax.curly_count].index = syntax.index++;
- syntax.curly[syntax.curly_count].flag = 0;
- ++syntax.curly_count;
+ script->syntax.curly[script->syntax.curly_count].type = TYPE_USERFUNC;
+ script->syntax.curly[script->syntax.curly_count].count = 1;
+ script->syntax.curly[script->syntax.curly_count].index = script->syntax.index++;
+ script->syntax.curly[script->syntax.curly_count].flag = 0;
+ ++script->syntax.curly_count;
// Jump over the function code
- sprintf(label, "goto __FN%x_FIN;", syntax.curly[syntax.curly_count-1].index);
- syntax.curly[syntax.curly_count].type = TYPE_NULL;
- ++syntax.curly_count;
- parse_line(label);
- --syntax.curly_count;
+ sprintf(label, "goto __FN%x_FIN;", script->syntax.curly[script->syntax.curly_count-1].index);
+ script->syntax.curly[script->syntax.curly_count].type = TYPE_NULL;
+ ++script->syntax.curly_count;
+ script->parse_line(label);
+ --script->syntax.curly_count;
// Set the position of the function (label)
- l=add_word(func_name);
+ l=script->add_word(func_name);
if( script->str_data[l].type == C_NOP || script->str_data[l].type == C_USERFUNC )// register only, if the name was not used by something else
{
script->str_data[l].type = C_USERFUNC;
- set_label(l, script_pos, p);
- if( parse_options&SCRIPT_USE_LABEL_DB )
- script->label_add(l,script_pos);
+ script->set_label(l, script->pos, p);
+ if( script->parse_options&SCRIPT_USE_LABEL_DB )
+ script->label_add(l,script->pos);
}
else
disp_error_message("parse_syntax:function: function name is invalid", func_name);
@@ -1659,21 +1506,21 @@ const char* parse_syntax(const char* p)
// If process
char label[256];
p=script->skip_space(p2);
- if(*p != '(') { //Prevent if this {} non-c syntax. from Rayce (jA)
+ if(*p != '(') { //Prevent if this {} non-c script->syntax. from Rayce (jA)
disp_error_message("need '('",p);
}
- syntax.curly[syntax.curly_count].type = TYPE_IF;
- syntax.curly[syntax.curly_count].count = 1;
- syntax.curly[syntax.curly_count].index = syntax.index++;
- syntax.curly[syntax.curly_count].flag = 0;
- sprintf(label,"__IF%x_%x",syntax.curly[syntax.curly_count].index,syntax.curly[syntax.curly_count].count);
- syntax.curly_count++;
- add_scriptl(script->add_str("jump_zero"));
- add_scriptc(C_ARG);
- p=parse_expr(p);
+ script->syntax.curly[script->syntax.curly_count].type = TYPE_IF;
+ script->syntax.curly[script->syntax.curly_count].count = 1;
+ script->syntax.curly[script->syntax.curly_count].index = script->syntax.index++;
+ script->syntax.curly[script->syntax.curly_count].flag = 0;
+ sprintf(label,"__IF%x_%x",script->syntax.curly[script->syntax.curly_count].index,script->syntax.curly[script->syntax.curly_count].count);
+ script->syntax.curly_count++;
+ script->addl(script->add_str("jump_zero"));
+ script->addc(C_ARG);
+ p=script->parse_expr(p);
p=script->skip_space(p);
- add_scriptl(script->add_str(label));
- add_scriptc(C_FUNC);
+ script->addl(script->add_str(label));
+ script->addc(C_FUNC);
return p;
}
break;
@@ -1686,21 +1533,21 @@ const char* parse_syntax(const char* p)
if(*p != '(') {
disp_error_message("need '('",p);
}
- syntax.curly[syntax.curly_count].type = TYPE_SWITCH;
- syntax.curly[syntax.curly_count].count = 1;
- syntax.curly[syntax.curly_count].index = syntax.index++;
- syntax.curly[syntax.curly_count].flag = 0;
- sprintf(label,"$@__SW%x_VAL",syntax.curly[syntax.curly_count].index);
- syntax.curly_count++;
- add_scriptl(script->add_str("set"));
- add_scriptc(C_ARG);
- add_scriptl(script->add_str(label));
- p=parse_expr(p);
+ script->syntax.curly[script->syntax.curly_count].type = TYPE_SWITCH;
+ script->syntax.curly[script->syntax.curly_count].count = 1;
+ script->syntax.curly[script->syntax.curly_count].index = script->syntax.index++;
+ script->syntax.curly[script->syntax.curly_count].flag = 0;
+ sprintf(label,"$@__SW%x_VAL",script->syntax.curly[script->syntax.curly_count].index);
+ script->syntax.curly_count++;
+ script->addl(script->add_str("set"));
+ script->addc(C_ARG);
+ script->addl(script->add_str(label));
+ p=script->parse_expr(p);
p=script->skip_space(p);
if(*p != '{') {
disp_error_message("parse_syntax: need '{'",p);
}
- add_scriptc(C_FUNC);
+ script->addc(C_FUNC);
return p + 1;
}
break;
@@ -1713,24 +1560,24 @@ const char* parse_syntax(const char* p)
if(*p != '(') {
disp_error_message("need '('",p);
}
- syntax.curly[syntax.curly_count].type = TYPE_WHILE;
- syntax.curly[syntax.curly_count].count = 1;
- syntax.curly[syntax.curly_count].index = syntax.index++;
- syntax.curly[syntax.curly_count].flag = 0;
+ script->syntax.curly[script->syntax.curly_count].type = TYPE_WHILE;
+ script->syntax.curly[script->syntax.curly_count].count = 1;
+ script->syntax.curly[script->syntax.curly_count].index = script->syntax.index++;
+ script->syntax.curly[script->syntax.curly_count].flag = 0;
// Form the start of label decision
- sprintf(label,"__WL%x_NXT",syntax.curly[syntax.curly_count].index);
+ sprintf(label,"__WL%x_NXT",script->syntax.curly[script->syntax.curly_count].index);
l=script->add_str(label);
- set_label(l,script_pos,p);
+ script->set_label(l,script->pos,p);
// Skip to the end point if the condition is false
- sprintf(label,"__WL%x_FIN",syntax.curly[syntax.curly_count].index);
- syntax.curly_count++;
- add_scriptl(script->add_str("jump_zero"));
- add_scriptc(C_ARG);
- p=parse_expr(p);
+ sprintf(label,"__WL%x_FIN",script->syntax.curly[script->syntax.curly_count].index);
+ script->syntax.curly_count++;
+ script->addl(script->add_str("jump_zero"));
+ script->addc(C_ARG);
+ p=script->parse_expr(p);
p=script->skip_space(p);
- add_scriptl(script->add_str(label));
- add_scriptc(C_FUNC);
+ script->addl(script->add_str(label));
+ script->addc(C_FUNC);
return p;
}
break;
@@ -1743,7 +1590,7 @@ const char* parse_syntax_close(const char *p) {
int flag;
do {
- p = parse_syntax_close_sub(p,&flag);
+ p = script->parse_syntax_close_sub(p,&flag);
} while(flag);
return p;
}
@@ -1754,88 +1601,88 @@ const char* parse_syntax_close(const char *p) {
const char* parse_syntax_close_sub(const char* p,int* flag)
{
char label[256];
- int pos = syntax.curly_count - 1;
+ int pos = script->syntax.curly_count - 1;
int l;
*flag = 1;
- if(syntax.curly_count <= 0) {
+ if(script->syntax.curly_count <= 0) {
*flag = 0;
return p;
- } else if(syntax.curly[pos].type == TYPE_IF) {
+ } else if(script->syntax.curly[pos].type == TYPE_IF) {
const char *bp = p;
const char *p2;
// if-block and else-block end is a new line
- parse_nextline(false, p);
+ script->parse_nextline(false, p);
// Skip to the last location if
- sprintf(label,"goto __IF%x_FIN;",syntax.curly[pos].index);
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
+ sprintf(label,"goto __IF%x_FIN;",script->syntax.curly[pos].index);
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ script->parse_line(label);
+ script->syntax.curly_count--;
// Put the label of the location
- sprintf(label,"__IF%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
+ sprintf(label,"__IF%x_%x",script->syntax.curly[pos].index,script->syntax.curly[pos].count);
l=script->add_str(label);
- set_label(l,script_pos,p);
+ script->set_label(l,script->pos,p);
- syntax.curly[pos].count++;
+ script->syntax.curly[pos].count++;
p = script->skip_space(p);
- p2 = skip_word(p);
- if(!syntax.curly[pos].flag && p2 - p == 4 && !strncasecmp(p,"else",4)) {
+ p2 = script->skip_word(p);
+ if(!script->syntax.curly[pos].flag && p2 - p == 4 && !strncasecmp(p,"else",4)) {
// else or else - if
p = script->skip_space(p2);
- p2 = skip_word(p);
+ p2 = script->skip_word(p);
if(p2 - p == 2 && !strncasecmp(p,"if",2)) {
// else - if
p=script->skip_space(p2);
if(*p != '(') {
disp_error_message("need '('",p);
}
- sprintf(label,"__IF%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
- add_scriptl(script->add_str("jump_zero"));
- add_scriptc(C_ARG);
- p=parse_expr(p);
+ sprintf(label,"__IF%x_%x",script->syntax.curly[pos].index,script->syntax.curly[pos].count);
+ script->addl(script->add_str("jump_zero"));
+ script->addc(C_ARG);
+ p=script->parse_expr(p);
p=script->skip_space(p);
- add_scriptl(script->add_str(label));
- add_scriptc(C_FUNC);
+ script->addl(script->add_str(label));
+ script->addc(C_FUNC);
*flag = 0;
return p;
} else {
// else
- if(!syntax.curly[pos].flag) {
- syntax.curly[pos].flag = 1;
+ if(!script->syntax.curly[pos].flag) {
+ script->syntax.curly[pos].flag = 1;
*flag = 0;
return p;
}
}
}
// Close if
- syntax.curly_count--;
+ script->syntax.curly_count--;
// Put the label of the final location
- sprintf(label,"__IF%x_FIN",syntax.curly[pos].index);
+ sprintf(label,"__IF%x_FIN",script->syntax.curly[pos].index);
l=script->add_str(label);
- set_label(l,script_pos,p);
- if(syntax.curly[pos].flag == 1) {
+ script->set_label(l,script->pos,p);
+ if(script->syntax.curly[pos].flag == 1) {
// Because the position of the pointer is the same if not else for this
return bp;
}
return p;
- } else if(syntax.curly[pos].type == TYPE_DO) {
+ } else if(script->syntax.curly[pos].type == TYPE_DO) {
int l;
char label[256];
const char *p2;
- if(syntax.curly[pos].flag) {
+ if(script->syntax.curly[pos].flag) {
// (Come here continue) to form the label here
- sprintf(label,"__DO%x_NXT",syntax.curly[pos].index);
+ sprintf(label,"__DO%x_NXT",script->syntax.curly[pos].index);
l=script->add_str(label);
- set_label(l,script_pos,p);
+ script->set_label(l,script->pos,p);
}
// Skip to the end point if the condition is false
p = script->skip_space(p);
- p2 = skip_word(p);
+ p2 = script->skip_word(p);
if(p2 - p != 5 || strncasecmp(p,"while",5))
disp_error_message("parse_syntax: need 'while'",p);
@@ -1845,81 +1692,81 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
}
// do-block end is a new line
- parse_nextline(false, p);
+ script->parse_nextline(false, p);
- sprintf(label,"__DO%x_FIN",syntax.curly[pos].index);
- add_scriptl(script->add_str("jump_zero"));
- add_scriptc(C_ARG);
- p=parse_expr(p);
+ sprintf(label,"__DO%x_FIN",script->syntax.curly[pos].index);
+ script->addl(script->add_str("jump_zero"));
+ script->addc(C_ARG);
+ p=script->parse_expr(p);
p=script->skip_space(p);
- add_scriptl(script->add_str(label));
- add_scriptc(C_FUNC);
+ script->addl(script->add_str(label));
+ script->addc(C_FUNC);
// Skip to the starting point
- sprintf(label,"goto __DO%x_BGN;",syntax.curly[pos].index);
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
+ sprintf(label,"goto __DO%x_BGN;",script->syntax.curly[pos].index);
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ script->parse_line(label);
+ script->syntax.curly_count--;
// Form label of the end point conditions
- sprintf(label,"__DO%x_FIN",syntax.curly[pos].index);
+ sprintf(label,"__DO%x_FIN",script->syntax.curly[pos].index);
l=script->add_str(label);
- set_label(l,script_pos,p);
+ script->set_label(l,script->pos,p);
p = script->skip_space(p);
if(*p != ';') {
disp_error_message("parse_syntax: need ';'",p);
return p+1;
}
p++;
- syntax.curly_count--;
+ script->syntax.curly_count--;
return p;
- } else if(syntax.curly[pos].type == TYPE_FOR) {
+ } else if(script->syntax.curly[pos].type == TYPE_FOR) {
// for-block end is a new line
- parse_nextline(false, p);
+ script->parse_nextline(false, p);
// Skip to the next loop
- sprintf(label,"goto __FR%x_NXT;",syntax.curly[pos].index);
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
+ sprintf(label,"goto __FR%x_NXT;",script->syntax.curly[pos].index);
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ script->parse_line(label);
+ script->syntax.curly_count--;
// End for labeling
- sprintf(label,"__FR%x_FIN",syntax.curly[pos].index);
+ sprintf(label,"__FR%x_FIN",script->syntax.curly[pos].index);
l=script->add_str(label);
- set_label(l,script_pos,p);
- syntax.curly_count--;
+ script->set_label(l,script->pos,p);
+ script->syntax.curly_count--;
return p;
- } else if(syntax.curly[pos].type == TYPE_WHILE) {
+ } else if(script->syntax.curly[pos].type == TYPE_WHILE) {
// while-block end is a new line
- parse_nextline(false, p);
+ script->parse_nextline(false, p);
// Skip to the decision while
- sprintf(label,"goto __WL%x_NXT;",syntax.curly[pos].index);
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
+ sprintf(label,"goto __WL%x_NXT;",script->syntax.curly[pos].index);
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ script->parse_line(label);
+ script->syntax.curly_count--;
// End while labeling
- sprintf(label,"__WL%x_FIN",syntax.curly[pos].index);
+ sprintf(label,"__WL%x_FIN",script->syntax.curly[pos].index);
l=script->add_str(label);
- set_label(l,script_pos,p);
- syntax.curly_count--;
+ script->set_label(l,script->pos,p);
+ script->syntax.curly_count--;
return p;
- } else if(syntax.curly[syntax.curly_count-1].type == TYPE_USERFUNC) {
- int pos = syntax.curly_count-1;
+ } 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;
// Back
sprintf(label,"return;");
- syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- parse_line(label);
- syntax.curly_count--;
+ script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
+ script->parse_line(label);
+ script->syntax.curly_count--;
// Put the label of the location
- sprintf(label,"__FN%x_FIN",syntax.curly[pos].index);
+ sprintf(label,"__FN%x_FIN",script->syntax.curly[pos].index);
l=script->add_str(label);
- set_label(l,script_pos,p);
- syntax.curly_count--;
+ script->set_label(l,script->pos,p);
+ script->syntax.curly_count--;
return p;
} else {
*flag = 0;
@@ -1951,7 +1798,7 @@ void script_set_constant(const char* name, int value, bool isparameter) {
} else if( script->str_data[n].type == C_PARAM || script->str_data[n].type == C_INT ) {// existing parameter or constant
ShowError("script_set_constant: Attempted to overwrite existing %s '%s' (old value=%d, new value=%d).\n", ( script->str_data[n].type == C_PARAM ) ? "parameter" : "constant", name, script->str_data[n].val, value);
} else {// existing name
- ShowError("script_set_constant: Invalid name for %s '%s' (already defined as %s).\n", isparameter ? "parameter" : "constant", name, script_op2name(script->str_data[n].type));
+ ShowError("script_set_constant: Invalid name for %s '%s' (already defined as %s).\n", isparameter ? "parameter" : "constant", name, script->op2name(script->str_data[n].type));
}
}
/* adds data to a existent constant in the database, inserted normally via parse */
@@ -1992,7 +1839,7 @@ void script_set_constant_force(const char *name, int value, bool isparameter) {
* Reading constant databases
* const.txt
*------------------------------------------*/
-static void read_constdb(void) {
+void read_constdb(void) {
FILE *fp;
char line[1024],name[1024],val[1024];
int type;
@@ -2010,7 +1857,7 @@ static void read_constdb(void) {
type=0;
if(sscanf(line,"%[A-Za-z0-9_],%[-0-9xXA-Fa-f],%d",name,val,&type)>=2 ||
sscanf(line,"%[A-Za-z0-9_] %[-0-9xXA-Fa-f] %d",name,val,&type)>=2){
- script_set_constant(name, (int)strtol(val, NULL, 0), (bool)type);
+ script->set_constant(name, (int)strtol(val, NULL, 0), (bool)type);
}
}
fclose(fp);
@@ -2019,7 +1866,7 @@ static void read_constdb(void) {
/*==========================================
* Display emplacement line of script
*------------------------------------------*/
-static const char* script_print_line(StringBuf* buf, const char* p, const char* mark, int line)
+const char* script_print_line(StringBuf* buf, const char* p, const char* mark, int line)
{
int i;
if( p == NULL || !p[0] ) return NULL;
@@ -2063,11 +1910,11 @@ void script_errorwarning_sub(StringBuf *buf, const char* src, const char* file,
StrBuf->Printf(buf, " %s\n", error_msg);
for(j = 0; j < 5; j++ ) {
- script_print_line(buf, linestart[j], NULL, line + j - 5);
+ script->print_line(buf, linestart[j], NULL, line + j - 5);
}
- p = script_print_line(buf, p, error_pos, -line);
+ p = script->print_line(buf, p, error_pos, -line);
for(j = 0; j < 5; j++) {
- p = script_print_line(buf, p, NULL, line + j + 1 );
+ p = script->print_line(buf, p, NULL, line + j + 1 );
}
}
@@ -2077,7 +1924,7 @@ void script_error(const char* src, const char* file, int start_line, const char*
StrBuf->Init(&buf);
StrBuf->AppendStr(&buf, "\a\n");
- script_errorwarning_sub(&buf, src, file, start_line, error_msg, error_pos);
+ script->errorwarning_sub(&buf, src, file, start_line, error_msg, error_pos);
ShowError("%s", StrBuf->Value(&buf));
StrBuf->Destroy(&buf);
@@ -2088,7 +1935,7 @@ void script_warning(const char* src, const char* file, int start_line, const cha
StrBuf->Init(&buf);
- script_errorwarning_sub(&buf, src, file, start_line, error_msg, error_pos);
+ script->errorwarning_sub(&buf, src, file, start_line, error_msg, error_pos);
ShowWarning("%s", StrBuf->Value(&buf));
StrBuf->Destroy(&buf);
@@ -2104,54 +1951,55 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
struct script_code* code = NULL;
char end;
bool unresolved_names = false;
- parser_current_src = src;
- parser_current_file = file;
- parser_current_line = line;
+
+ script->parser_current_src = src;
+ script->parser_current_file = file;
+ script->parser_current_line = line;
if( src == NULL )
return NULL;// empty script
- memset(&syntax,0,sizeof(syntax));
+ memset(&script->syntax,0,sizeof(script->syntax));
- script_buf=(unsigned char *)aMalloc(SCRIPT_BLOCK_SIZE*sizeof(unsigned char));
- script_pos=0;
- script_size=SCRIPT_BLOCK_SIZE;
- parse_nextline(true, NULL);
+ script->buf=(unsigned char *)aMalloc(SCRIPT_BLOCK_SIZE*sizeof(unsigned char));
+ script->pos=0;
+ script->size=SCRIPT_BLOCK_SIZE;
+ script->parse_nextline(true, NULL);
// who called parse_script is responsible for clearing the database after using it, but just in case... lets clear it here
if( options&SCRIPT_USE_LABEL_DB )
script->label_count = 0;
- parse_options = options;
+ script->parse_options = options;
- if( setjmp( error_jump ) != 0 ) {
+ if( setjmp( script->error_jump ) != 0 ) {
//Restore program state when script has problems. [from jA]
int i;
- const int size = ARRAYLENGTH(syntax.curly);
- if( error_report )
- script->error(src,file,line,error_msg,error_pos);
- aFree( error_msg );
- aFree( script_buf );
- script_pos = 0;
- script_size = 0;
- script_buf = NULL;
+ const int size = ARRAYLENGTH(script->syntax.curly);
+ if( script->error_report )
+ script->error(src,file,line,script->error_msg,script->error_pos);
+ aFree( script->error_msg );
+ aFree( script->buf );
+ script->pos = 0;
+ script->size = 0;
+ script->buf = NULL;
for(i=LABEL_START;i<script->str_num;i++)
if(script->str_data[i].type == C_NOP) script->str_data[i].type = C_NAME;
for(i=0; i<size; i++)
- linkdb_final(&syntax.curly[i].case_label);
+ linkdb_final(&script->syntax.curly[i].case_label);
return NULL;
}
- parse_syntax_for_flag=0;
+ script->parse_syntax_for_flag=0;
p=src;
p=script->skip_space(p);
if( options&SCRIPT_IGNORE_EXTERNAL_BRACKETS )
{// does not require brackets around the script
if( *p == '\0' && !(options&SCRIPT_RETURN_EMPTY_SCRIPT) )
{// empty script and can return NULL
- aFree( script_buf );
- script_pos = 0;
- script_size = 0;
- script_buf = NULL;
+ aFree( script->buf );
+ script->pos = 0;
+ script->size = 0;
+ script->buf = NULL;
return NULL;
}
end = '\0';
@@ -2163,10 +2011,10 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
p = script->skip_space(p+1);
if( *p == '}' && !(options&SCRIPT_RETURN_EMPTY_SCRIPT) )
{// empty script and can return NULL
- aFree( script_buf );
- script_pos = 0;
- script_size = 0;
- script_buf = NULL;
+ aFree( script->buf );
+ script->pos = 0;
+ script->size = 0;
+ script->buf = NULL;
return NULL;
}
end = '}';
@@ -2184,34 +2032,34 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
}
}
- while( syntax.curly_count != 0 || *p != end )
+ while( script->syntax.curly_count != 0 || *p != end )
{
if( *p == '\0' )
disp_error_message("unexpected end of script",p);
// Special handling only label
- tmpp=script->skip_space(skip_word(p));
+ tmpp=script->skip_space(script->skip_word(p));
if(*tmpp==':' && !(!strncasecmp(p,"default:",8) && p + 7 == tmpp)){
- i=add_word(p);
- set_label(i,script_pos,p);
- if( parse_options&SCRIPT_USE_LABEL_DB )
- script->label_add(i,script_pos);
+ i=script->add_word(p);
+ script->set_label(i,script->pos,p);
+ if( script->parse_options&SCRIPT_USE_LABEL_DB )
+ script->label_add(i,script->pos);
p=tmpp+1;
p=script->skip_space(p);
continue;
}
// All other lumped
- p=parse_line(p);
+ p=script->parse_line(p);
p=script->skip_space(p);
- parse_nextline(false, p);
+ script->parse_nextline(false, p);
}
- add_scriptc(C_NOP);
+ script->addc(C_NOP);
// trim code to size
- script_size = script_pos;
- RECREATE(script_buf,unsigned char,script_pos);
+ script->size = script->pos;
+ RECREATE(script->buf,unsigned char,script->pos);
// default unknown references to variables
for(i=LABEL_START;i<script->str_num;i++){
@@ -2220,8 +2068,8 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
script->str_data[i].type=C_NAME;
script->str_data[i].label=i;
for(j=script->str_data[i].backpatch;j>=0 && j!=0x00ffffff;){
- next=GETVALUE(script_buf,j);
- SETVALUE(script_buf,j,i);
+ next=GETVALUE(script->buf,j);
+ SETVALUE(script->buf,j,i);
j=next;
}
}
@@ -2237,38 +2085,38 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
disp_error_message("parse_script: unresolved function references", p);
}
-#ifdef DEBUG_DISP
- for(i=0;i<script_pos;i++){
+#ifdef SCRIPT_DEBUG_DISP
+ for(i=0;i<script->pos;i++){
if((i&15)==0) ShowMessage("%04x : ",i);
- ShowMessage("%02x ",script_buf[i]);
+ ShowMessage("%02x ",script->buf[i]);
if((i&15)==15) ShowMessage("\n");
}
ShowMessage("\n");
#endif
-#ifdef DEBUG_DISASM
+#ifdef SCRIPT_DEBUG_DISASM
{
int i = 0,j;
- while(i < script_pos) {
- c_op op = get_com(script_buf,&i);
+ while(i < script->pos) {
+ c_op op = script->get_com(script->buf,&i);
- ShowMessage("%06x %s", i, script_op2name(op));
+ ShowMessage("%06x %s", i, script->op2name(op));
j = i;
switch(op) {
case C_INT:
- ShowMessage(" %d", get_num(script_buf,&i));
+ ShowMessage(" %d", script->get_num(script->buf,&i));
break;
case C_POS:
- ShowMessage(" 0x%06x", *(int*)(script_buf+i)&0xffffff);
+ ShowMessage(" 0x%06x", *(int*)(script->buf+i)&0xffffff);
i += 3;
break;
case C_NAME:
- j = (*(int*)(script_buf+i)&0xffffff);
+ j = (*(int*)(script->buf+i)&0xffffff);
ShowMessage(" %s", ( j == 0xffffff ) ? "?? unknown ??" : script->get_str(j));
i += 3;
break;
case C_STR:
- j = strlen(script_buf + i);
- ShowMessage(" %s", script_buf + i);
+ j = strlen(script->buf + i);
+ ShowMessage(" %s", script->buf + i);
i += j+1;
break;
}
@@ -2278,8 +2126,8 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
#endif
CREATE(code,struct script_code,1);
- code->script_buf = script_buf;
- code->script_size = script_size;
+ code->script_buf = script->buf;
+ code->script_size = script->size;
code->script_vars = NULL;
return code;
}
@@ -2290,8 +2138,8 @@ TBL_PC *script_rid2sd(struct script_state *st) {
TBL_PC *sd;
if( !( sd = map->id2sd(st->rid) ) ){
ShowError("script_rid2sd: fatal error ! player not attached!\n");
- script_reportfunc(st);
- script_reportsrc(st);
+ script->reportfunc(st);
+ script->reportsrc(st);
st->state = END;
}
return sd;
@@ -2317,7 +2165,7 @@ void get_val(struct script_state* st, struct script_data* data)
//##TODO use reference_tovariable(data) when it's confirmed that it works [FlavioJS]
if( !reference_toconstant(data) && not_server_variable(prefix) ) {
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL ) {// needs player attached
if( postfix == '$' ) {// string variable
ShowWarning("script_get_val: cannot access player variable '%s', defaulting to \"\"\n", name);
@@ -2361,7 +2209,7 @@ void get_val(struct script_state* st, struct script_data* data)
break;
case '\'':
if ( st->instance_id >= 0 ) {
- data->u.str = (char*)idb_get(instances[st->instance_id].vars,reference_getuid(data));
+ data->u.str = (char*)idb_get(instance->list[st->instance_id].vars,reference_getuid(data));
} else {
ShowWarning("script_get_val: cannot access instance variable '%s', defaulting to \"\"\n", name);
data->u.str = NULL;
@@ -2416,7 +2264,7 @@ void get_val(struct script_state* st, struct script_data* data)
break;
case '\'':
if( st->instance_id >= 0 )
- data->u.num = (int)idb_iget(instances[st->instance_id].vars,reference_getuid(data));
+ data->u.num = (int)idb_iget(instance->list[st->instance_id].vars,reference_getuid(data));
else {
ShowWarning("script_get_val: cannot access instance variable '%s', defaulting to 0\n", name);
data->u.num = 0;
@@ -2446,7 +2294,7 @@ void* get_val2(struct script_state* st, int uid, struct DBMap** ref) {
* Stores the value of a script variable
* Return value is 0 on fail, 1 on success.
*------------------------------------------*/
-static int set_reg(struct script_state* st, TBL_PC* sd, int num, const char* name, const void* value, struct DBMap** ref)
+int set_reg(struct script_state* st, TBL_PC* sd, int num, const char* name, const void* value, struct DBMap** ref)
{
char prefix = name[0];
@@ -2474,8 +2322,8 @@ static int set_reg(struct script_state* st, TBL_PC* sd, int num, const char* nam
return 1;
case '\'':
if( st->instance_id >= 0 ) {
- idb_remove(instances[st->instance_id].vars, num);
- if( str[0] ) idb_put(instances[st->instance_id].vars, num, aStrdup(str));
+ idb_remove(instance->list[st->instance_id].vars, num);
+ if( str[0] ) idb_put(instance->list[st->instance_id].vars, num, aStrdup(str));
}
return 1;
default:
@@ -2492,7 +2340,7 @@ static int set_reg(struct script_state* st, TBL_PC* sd, int num, const char* nam
if( st != NULL )
{
ShowError("script:set_reg: failed to set param '%s' to %d.\n", name, val);
- script_reportsrc(st);
+ script->reportsrc(st);
st->state = END;
}
return 0;
@@ -2522,9 +2370,9 @@ static int set_reg(struct script_state* st, TBL_PC* sd, int num, const char* nam
return 1;
case '\'':
if( st->instance_id >= 0 ) {
- idb_remove(instances[st->instance_id].vars, num);
+ idb_remove(instance->list[st->instance_id].vars, num);
if( val != 0 )
- idb_iput(instances[st->instance_id].vars, num, val);
+ idb_iput(instance->list[st->instance_id].vars, num, val);
}
return 1;
default:
@@ -2535,12 +2383,12 @@ static int set_reg(struct script_state* st, TBL_PC* sd, int num, const char* nam
int set_var(TBL_PC* sd, char* name, void* val)
{
- return set_reg(NULL, sd, reference_uid(script->add_str(name),0), name, val, NULL);
+ return script->set_reg(NULL, sd, reference_uid(script->add_str(name),0), name, val, NULL);
}
void setd_sub(struct script_state *st, TBL_PC *sd, const char *varname, int elem, void *value, struct DBMap **ref)
{
- set_reg(st, sd, reference_uid(script->add_str(varname),elem), varname, value, ref);
+ script->set_reg(st, sd, reference_uid(script->add_str(varname),elem), varname, value, ref);
}
/// Converts the data to a string
@@ -2569,8 +2417,8 @@ const char* conv_str(struct script_state* st, struct script_data* data)
else
{// unsupported data type
ShowError("script:conv_str: cannot convert to string, defaulting to \"\"\n");
- script_reportdata(data);
- script_reportsrc(st);
+ script->reportdata(data);
+ script->reportsrc(st);
data->type = C_CONSTSTR;
data->u.str = "";
}
@@ -2609,8 +2457,8 @@ int conv_num(struct script_state* st, struct script_data* data) {
num = INT_MAX;
ShowError("script:conv_num: overflow detected, capping to %ld\n", num);
}
- script_reportdata(data);
- script_reportsrc(st);
+ script->reportdata(data);
+ script->reportsrc(st);
}
if( data->type == C_STR )
aFree(p);
@@ -2623,8 +2471,8 @@ int conv_num(struct script_state* st, struct script_data* data) {
else
{// unsupported data type
ShowError("script:conv_num: cannot convert to number, defaulting to 0\n");
- script_reportdata(data);
- script_reportsrc(st);
+ script->reportdata(data);
+ script->reportsrc(st);
data->type = C_INT;
data->u.num = 0;
}
@@ -2648,7 +2496,7 @@ void stack_expand(struct script_stack* stack) {
/// Pushes a value into the stack (with reference)
struct script_data* push_val(struct script_stack* stack, enum c_op type, int val, struct DBMap** ref) {
if( stack->sp >= stack->sp_max )
- stack_expand(stack);
+ script->stack_expand(stack);
stack->stack_data[stack->sp].type = type;
stack->stack_data[stack->sp].u.num = val;
stack->stack_data[stack->sp].ref = ref;
@@ -2660,7 +2508,7 @@ struct script_data* push_val(struct script_stack* stack, enum c_op type, int val
struct script_data* push_str(struct script_stack* stack, enum c_op type, char* str)
{
if( stack->sp >= stack->sp_max )
- stack_expand(stack);
+ script->stack_expand(stack);
stack->stack_data[stack->sp].type = type;
stack->stack_data[stack->sp].u.str = str;
stack->stack_data[stack->sp].ref = NULL;
@@ -2672,7 +2520,7 @@ struct script_data* push_str(struct script_stack* stack, enum c_op type, char* s
struct script_data* push_retinfo(struct script_stack* stack, struct script_retinfo* ri, DBMap **ref)
{
if( stack->sp >= stack->sp_max )
- stack_expand(stack);
+ script->stack_expand(stack);
stack->stack_data[stack->sp].type = C_RETINFO;
stack->stack_data[stack->sp].u.ri = ri;
stack->stack_data[stack->sp].ref = ref;
@@ -2905,8 +2753,8 @@ void op_3(struct script_state* st, int op)
else
{
ShowError("script:op_3: invalid data for the ternary operator test\n");
- script_reportdata(data);
- script_reportsrc(st);
+ script->reportdata(data);
+ script->reportsrc(st);
script_removetop(st, -3, 0);
script_pushnil(st);
return;
@@ -2946,8 +2794,8 @@ void op_2str(struct script_state* st, int op, const char* s1, const char* s2)
return;
}
default:
- ShowError("script:op2_str: unexpected string operator %s\n", script_op2name(op));
- script_reportsrc(st);
+ ShowError("script:op2_str: unexpected string operator %s\n", script->op2name(op));
+ script->reportsrc(st);
script_pushnil(st);
st->state = END;
return;
@@ -2982,8 +2830,8 @@ void op_2num(struct script_state* st, int op, int i1, int i2)
case C_MOD:
if( i2 == 0 )
{
- ShowError("script:op_2num: division by zero detected op=%s i1=%d i2=%d\n", script_op2name(op), i1, i2);
- script_reportsrc(st);
+ ShowError("script:op_2num: division by zero detected op=%s i1=%d i2=%d\n", script->op2name(op), i1, i2);
+ script->reportsrc(st);
script_pushnil(st);
st->state = END;
return;
@@ -3000,21 +2848,21 @@ void op_2num(struct script_state* st, int op, int i1, int i2)
case C_SUB: ret = i1 - i2; ret_double = (double)i1 - (double)i2; break;
case C_MUL: ret = i1 * i2; ret_double = (double)i1 * (double)i2; break;
default:
- ShowError("script:op_2num: unexpected number operator %s i1=%d i2=%d\n", script_op2name(op), i1, i2);
- script_reportsrc(st);
+ ShowError("script:op_2num: unexpected number operator %s i1=%d i2=%d\n", script->op2name(op), i1, i2);
+ script->reportsrc(st);
script_pushnil(st);
return;
}
if( ret_double < (double)INT_MIN )
{
- ShowWarning("script:op_2num: underflow detected op=%s i1=%d i2=%d\n", script_op2name(op), i1, i2);
- script_reportsrc(st);
+ ShowWarning("script:op_2num: underflow detected op=%s i1=%d i2=%d\n", script->op2name(op), i1, i2);
+ script->reportsrc(st);
ret = INT_MIN;
}
else if( ret_double > (double)INT_MAX )
{
- ShowWarning("script:op_2num: overflow detected op=%s i1=%d i2=%d\n", script_op2name(op), i1, i2);
- script_reportsrc(st);
+ ShowWarning("script:op_2num: overflow detected op=%s i1=%d i2=%d\n", script->op2name(op), i1, i2);
+ script->reportsrc(st);
ret = INT_MAX;
}
}
@@ -3060,7 +2908,7 @@ void op_2(struct script_state *st, int op)
if( data_isstring(left) && data_isstring(right) )
{// ss => op_2str
- op_2str(st, op, left->u.str, right->u.str);
+ script->op_2str(st, op, left->u.str, right->u.str);
script_removetop(st, leftref.type == C_NOP ? -3 : -2, -1);// pop the two values before the top one
if (leftref.type != C_NOP)
@@ -3076,17 +2924,17 @@ void op_2(struct script_state *st, int op)
int i2 = right->u.num;
script_removetop(st, leftref.type == C_NOP ? -2 : -1, 0);
- op_2num(st, op, i1, i2);
+ script->op_2num(st, op, i1, i2);
if (leftref.type != C_NOP)
*left = leftref;
}
else
{// invalid argument
- ShowError("script:op_2: invalid data for operator %s\n", script_op2name(op));
- script_reportdata(left);
- script_reportdata(right);
- script_reportsrc(st);
+ ShowError("script:op_2: invalid data for operator %s\n", script->op2name(op));
+ script->reportdata(left);
+ script->reportdata(right);
+ script->reportsrc(st);
script_removetop(st, -2, 0);
script_pushnil(st);
st->state = END;
@@ -3107,9 +2955,9 @@ void op_1(struct script_state* st, int op)
if( !data_isint(data) )
{// not a number
- ShowError("script:op_1: argument is not a number (op=%s)\n", script_op2name(op));
- script_reportdata(data);
- script_reportsrc(st);
+ ShowError("script:op_1: argument is not a number (op=%s)\n", script->op2name(op));
+ script->reportdata(data);
+ script->reportsrc(st);
script_pushnil(st);
st->state = END;
return;
@@ -3123,8 +2971,8 @@ void op_1(struct script_state* st, int op)
case C_NOT: i1 = ~i1; break;
case C_LNOT: i1 = !i1; break;
default:
- ShowError("script:op_1: unexpected operator %s i1=%d\n", script_op2name(op), i1);
- script_reportsrc(st);
+ ShowError("script:op_1: unexpected operator %s i1=%d\n", script->op2name(op), i1);
+ script->reportsrc(st);
script_pushnil(st);
st->state = END;
return;
@@ -3137,7 +2985,7 @@ void op_1(struct script_state* st, int op)
///
/// @param st Script state whose stack arguments should be inspected.
/// @param func Built-in function for which the arguments are intended.
-static void script_check_buildin_argtype(struct script_state* st, int func)
+void script_check_buildin_argtype(struct script_state* st, int func)
{
char type;
int idx, invalid = 0;
@@ -3151,7 +2999,7 @@ static void script_check_buildin_argtype(struct script_state* st, int func)
if( type == '?' || type == '*' ) {// optional argument or unknown number of optional parameters ( no types are after this )
break;
} else if( type == 0 ) {// more arguments than necessary ( should not happen, as it is checked before )
- ShowWarning("Found more arguments than necessary. unexpected arg type %s\n",script_op2name(data->type));
+ ShowWarning("Found more arguments than necessary. unexpected arg type %s\n",script->op2name(data->type));
invalid++;
break;
} else {
@@ -3167,7 +3015,7 @@ static void script_check_buildin_argtype(struct script_state* st, int func)
if( !data_isstring(data) && !data_isint(data) && !data_isreference(data) )
{// variant
ShowWarning("Unexpected type for argument %d. Expected string, number or variable.\n", idx-1);
- script_reportdata(data);
+ script->reportdata(data);
invalid++;
}
break;
@@ -3175,7 +3023,7 @@ static void script_check_buildin_argtype(struct script_state* st, int func)
if( !data_isstring(data) && !( data_isreference(data) && is_string_variable(name) ) )
{// string
ShowWarning("Unexpected type for argument %d. Expected string.\n", idx-1);
- script_reportdata(data);
+ script->reportdata(data);
invalid++;
}
break;
@@ -3183,23 +3031,23 @@ static void script_check_buildin_argtype(struct script_state* st, int func)
if( !data_isint(data) && !( data_isreference(data) && ( reference_toparam(data) || reference_toconstant(data) || !is_string_variable(name) ) ) )
{// int ( params and constants are always int )
ShowWarning("Unexpected type for argument %d. Expected number.\n", idx-1);
- script_reportdata(data);
+ script->reportdata(data);
invalid++;
}
break;
case 'r':
if( !data_isreference(data) )
{// variables
- ShowWarning("Unexpected type for argument %d. Expected variable, got %s.\n", idx-1,script_op2name(data->type));
- script_reportdata(data);
+ ShowWarning("Unexpected type for argument %d. Expected variable, got %s.\n", idx-1,script->op2name(data->type));
+ script->reportdata(data);
invalid++;
}
break;
case 'l':
if( !data_islabel(data) && !data_isfunclabel(data) )
{// label
- ShowWarning("Unexpected type for argument %d. Expected label, got %s\n", idx-1,script_op2name(data->type));
- script_reportdata(data);
+ ShowWarning("Unexpected type for argument %d. Expected label, got %s\n", idx-1,script->op2name(data->type));
+ script->reportdata(data);
invalid++;
}
break;
@@ -3209,7 +3057,7 @@ static void script_check_buildin_argtype(struct script_state* st, int func)
if(invalid) {
ShowDebug("Function: %s\n", script->get_str(func));
- script_reportsrc(st);
+ script->reportsrc(st);
}
}
@@ -3229,7 +3077,7 @@ int run_func(struct script_state *st)
{
ShowError("script:run_func: C_ARG not found. please report this!!!\n");
st->state = END;
- script_reportsrc(st);
+ script->reportsrc(st);
return 1;
}
start_sp = i-1;// C_NAME of the command
@@ -3242,22 +3090,22 @@ int run_func(struct script_state *st)
else
{
ShowError("script:run_func: not a buildin command.\n");
- script_reportdata(data);
- script_reportsrc(st);
+ script->reportdata(data);
+ script->reportsrc(st);
st->state = END;
return 1;
}
if( script->config.warn_func_mismatch_argtypes ) {
- script_check_buildin_argtype(st, func);
+ script->check_buildin_argtype(st, func);
}
if(script->str_data[func].func){
if (!(script->str_data[func].func(st))) //Report error
- script_reportsrc(st);
+ script->reportsrc(st);
} else {
- ShowError("script:run_func: '%s' (id=%d type=%s) has no C function. please report this!!!\n", script->get_str(func), func, script_op2name(script->str_data[func].type));
- script_reportsrc(st);
+ ShowError("script:run_func: '%s' (id=%d type=%s) has no C function. please report this!!!\n", script->get_str(func), func, script->op2name(script->str_data[func].type));
+ script->reportsrc(st);
st->state = END;
}
@@ -3276,7 +3124,7 @@ int run_func(struct script_state *st)
if( st->stack->defsp < 1 || st->stack->stack_data[st->stack->defsp-1].type != C_RETINFO )
{
ShowWarning("script:run_func: return without callfunc or callsub!\n");
- script_reportsrc(st);
+ script->reportsrc(st);
st->state = END;
return 1;
}
@@ -3357,7 +3205,7 @@ int run_script_timer(int tid, unsigned int tick, int id, intptr_t data) {
///
/// @param st Script state to detach.
/// @param dequeue_event Whether to schedule any queued events, when there was no previous script.
-static void script_detach_state(struct script_state* st, bool dequeue_event) {
+void script_detach_state(struct script_state* st, bool dequeue_event) {
struct map_session_data* sd;
if(st->rid && (sd = map->id2sd(st->rid))!=NULL) {
@@ -3385,7 +3233,7 @@ static void script_detach_state(struct script_state* st, bool dequeue_event) {
}
} else if(st->bk_st) { // rid was set to 0, before detaching the script state
ShowError("script_detach_state: Found previous script state without attached player (rid=%d, oid=%d, state=%d, bk_npcid=%d)\n", st->bk_st->rid, st->bk_st->oid, st->bk_st->state, st->bk_npcid);
- script_reportsrc(st->bk_st);
+ script->reportsrc(st->bk_st);
script->free_state(st->bk_st);
st->bk_st = NULL;
@@ -3437,19 +3285,19 @@ void run_script_main(struct script_state *st) {
nd = map->id2nd(st->oid);
if( nd && nd->bl.m >= 0 )
- st->instance_id = maplist[nd->bl.m].instance_id;
+ st->instance_id = map->list[nd->bl.m].instance_id;
else
st->instance_id = -1;
if(st->state == RERUNLINE) {
- run_func(st);
+ script->run_func(st);
if(st->state == GOTO)
st->state = RUN;
} else if(st->state != END)
st->state = RUN;
while( st->state == RUN ){
- enum c_op c = get_com(st->script->script_buf,&st->pos);
+ enum c_op c = script->get_com(st->script->script_buf,&st->pos);
switch(c){
case C_EOL:
if( stack->defsp > stack->sp )
@@ -3458,7 +3306,7 @@ void run_script_main(struct script_state *st) {
script->pop_stack(st, stack->defsp, stack->sp);// pop unused stack data. (unused return value)
break;
case C_INT:
- script->push_val(stack,C_INT,get_num(st->script->script_buf,&st->pos),NULL);
+ script->push_val(stack,C_INT,script->get_num(st->script->script_buf,&st->pos),NULL);
break;
case C_POS:
case C_NAME:
@@ -3473,12 +3321,12 @@ void run_script_main(struct script_state *st) {
while(st->script->script_buf[st->pos++]);
break;
case C_FUNC:
- run_func(st);
+ script->run_func(st);
if(st->state==GOTO){
st->state = RUN;
if( !st->freeloop && gotocount>0 && (--gotocount)<=0 ){
ShowError("run_script: infinity loop !\n");
- script_reportsrc(st);
+ script->reportsrc(st);
st->state=END;
}
}
@@ -3491,7 +3339,7 @@ void run_script_main(struct script_state *st) {
case C_NEG:
case C_NOT:
case C_LNOT:
- op_1(st ,c);
+ script->op_1(st ,c);
break;
case C_ADD:
@@ -3512,11 +3360,11 @@ void run_script_main(struct script_state *st) {
case C_LOR:
case C_R_SHIFT:
case C_L_SHIFT:
- op_2(st, c);
+ script->op_2(st, c);
break;
case C_OP3:
- op_3(st, c);
+ script->op_3(st, c);
break;
case C_NOP:
@@ -3530,14 +3378,14 @@ void run_script_main(struct script_state *st) {
}
if( !st->freeloop && cmdcount>0 && (--cmdcount)<=0 ){
ShowError("run_script: infinity loop !\n");
- script_reportsrc(st);
+ script->reportsrc(st);
st->state=END;
}
}
if(st->sleep.tick > 0) {
//Restore previous script
- script_detach_state(st, false);
+ script->detach_state(st, false);
//Delay execution
sd = map->id2sd(st->rid); // Get sd since script might have attached someone while running. [Inkfish]
st->sleep.charid = sd?sd->status.char_id:0;
@@ -3549,9 +3397,9 @@ void run_script_main(struct script_state *st) {
ShowWarning("Unable to restore stack! Double continuation!\n");
//Report BOTH scripts to see if that can help somehow.
ShowDebug("Previous script (lost):\n");
- script_reportsrc(st->bk_st);
+ script->reportsrc(st->bk_st);
ShowDebug("Current script:\n");
- script_reportsrc(st);
+ script->reportsrc(st);
script->free_state(st->bk_st);
st->bk_st = NULL;
@@ -3564,7 +3412,7 @@ void run_script_main(struct script_state *st) {
sd->state.using_fake_npc = 0;
}
//Restore previous script if any.
- script_detach_state(st, true);
+ script->detach_state(st, true);
if (sd->state.reg_dirty&2)
intif->saveregistry(sd,2);
if (sd->state.reg_dirty&1)
@@ -3625,7 +3473,7 @@ int script_config_read(char *cfgName) {
/**
* @see DBApply
*/
-static int db_script_free_code_sub(DBKey key, DBData *data, va_list ap)
+int db_script_free_code_sub(DBKey key, DBData *data, va_list ap)
{
struct script_code *code = DB->data2ptr(data);
if (code)
@@ -3727,7 +3575,7 @@ void do_final_script(void) {
DBIterator *iter;
struct script_state *st;
-#ifdef DEBUG_HASH
+#ifdef SCRIPT_DEBUG_HASH
if (battle_config.etc_log)
{
FILE *fp = fopen("hash_dump.txt","wt");
@@ -3744,7 +3592,7 @@ void do_final_script(void) {
fprintf(fp,"num : hash : data_name\n");
fprintf(fp,"---------------------------------------------------------------\n");
for(i=LABEL_START; i<script->str_num; i++) {
- unsigned int h = calc_hash(script->get_str(i));
+ unsigned int h = script->calc_hash(script->get_str(i));
fprintf(fp,"%04d : %4u : %s\n",i,h, script->get_str(i));
++count[h];
}
@@ -3792,8 +3640,8 @@ void do_final_script(void) {
mapreg->final();
- script->userfunc_db->destroy(script->userfunc_db, db_script_free_code_sub);
- script->autobonus_db->destroy(script->autobonus_db, db_script_free_code_sub);
+ script->userfunc_db->destroy(script->userfunc_db, script->db_free_code_sub);
+ script->autobonus_db->destroy(script->autobonus_db, script->db_free_code_sub);
if (script->str_data)
aFree(script->str_data);
@@ -3858,7 +3706,7 @@ void do_init_script(void) {
ers_chunk_size(script->stack_ers, 10);
script->parse_builtin();
- read_constdb();
+ script->read_constdb();
mapreg->init();
}
@@ -3875,7 +3723,7 @@ int script_reload(void) {
dbi_destroy(iter);
- script->userfunc_db->clear(script->userfunc_db, db_script_free_code_sub);
+ script->userfunc_db->clear(script->userfunc_db, script->db_free_code_sub);
script->label_count = 0;
for( i = 0; i < atcommand->binding_count; i++ ) {
@@ -3912,7 +3760,7 @@ int script_reload(void) {
///
/// mes "<message>";
BUILDIN(mes) {
- TBL_PC* sd = script_rid2sd(st);
+ TBL_PC* sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -3938,7 +3786,7 @@ BUILDIN(next)
{
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
#ifdef SECURE_NPCTIMEOUT
@@ -3956,7 +3804,7 @@ BUILDIN(next)
BUILDIN(close) {
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -3972,7 +3820,7 @@ BUILDIN(close) {
BUILDIN(close2) {
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -3980,7 +3828,7 @@ BUILDIN(close2) {
st->state = STOP;
else {
ShowWarning("misuse of 'close2'! trying to use it without prior dialog! skipping...\n");
- script_reportsrc(st);
+ script->reportsrc(st);
}
clif->scriptclose(sd, st->oid);
@@ -3990,7 +3838,7 @@ BUILDIN(close2) {
/// Counts the number of valid and total number of options in 'str'
/// If max_count > 0 the counting stops when that valid option is reached
/// total is incremented for each option (NULL is supported)
-static int menu_countoptions(const char* str, int max_count, int* total)
+int menu_countoptions(const char* str, int max_count, int* total)
{
int count = 0;
int bogus_total;
@@ -4045,7 +3893,7 @@ BUILDIN(menu)
const char* text;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -4079,7 +3927,7 @@ BUILDIN(menu)
{// not a label
StrBuf->Destroy(&buf);
ShowError("script:menu: argument #%d (from 1) is not a label or label not found.\n", i);
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;
}
@@ -4090,7 +3938,7 @@ BUILDIN(menu)
if( sd->npc_menu > 0 )
StrBuf->AppendStr(&buf, ":");
StrBuf->AppendStr(&buf, text);
- sd->npc_menu += menu_countoptions(text, 0, NULL);
+ sd->npc_menu += script->menu_countoptions(text, 0, NULL);
}
st->state = RERUNLINE;
sd->state.menu_or_input = 1;
@@ -4114,7 +3962,7 @@ BUILDIN(menu)
if( sd->npc_menu >= 0xff )
{// client supports only up to 254 entries; 0 is not used and 255 is reserved for cancel; excess entries are displayed but cause 'uint8' overflow
ShowWarning("buildin_menu: Too many options specified (current=%d, max=254).\n", sd->npc_menu);
- script_reportsrc(st);
+ script->reportsrc(st);
}
}
else if( sd->npc_menu == 0xff )
@@ -4138,7 +3986,7 @@ BUILDIN(menu)
for( i = 2; i < script_lastdata(st); i += 2 )
{
text = script_getstr(st, i);
- sd->npc_menu -= menu_countoptions(text, sd->npc_menu, &menu);
+ sd->npc_menu -= script->menu_countoptions(text, sd->npc_menu, &menu);
if( sd->npc_menu <= 0 )
break;// entry found
}
@@ -4151,7 +3999,7 @@ BUILDIN(menu)
if( !data_islabel(script_getdata(st, i + 1)) )
{// TODO remove this temporary crash-prevention code (fallback for multiple scripts requesting user input)
ShowError("script:menu: unexpected data in label argument\n");
- script_reportdata(script_getdata(st, i + 1));
+ script->reportdata(script_getdata(st, i + 1));
st->state = END;
return false;
}
@@ -4174,7 +4022,7 @@ BUILDIN(select)
const char* text;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -4194,7 +4042,7 @@ BUILDIN(select)
StrBuf->AppendStr(&buf, ":");
StrBuf->AppendStr(&buf, text);
- sd->npc_menu += menu_countoptions(text, 0, NULL);
+ sd->npc_menu += script->menu_countoptions(text, 0, NULL);
}
st->state = RERUNLINE;
@@ -4217,7 +4065,7 @@ BUILDIN(select)
if( sd->npc_menu >= 0xff ) {
ShowWarning("buildin_select: Too many options specified (current=%d, max=254).\n", sd->npc_menu);
- script_reportsrc(st);
+ script->reportsrc(st);
}
} else if( sd->npc_menu == 0xff ) {// Cancel was pressed
sd->state.menu_or_input = 0;
@@ -4228,7 +4076,7 @@ BUILDIN(select)
sd->state.menu_or_input = 0;
for( i = 2; i <= script_lastdata(st); ++i ) {
text = script_getstr(st, i);
- sd->npc_menu -= menu_countoptions(text, sd->npc_menu, &menu);
+ sd->npc_menu -= script->menu_countoptions(text, sd->npc_menu, &menu);
if( sd->npc_menu <= 0 )
break;// entry found
}
@@ -4253,7 +4101,7 @@ BUILDIN(prompt)
const char *text;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -4273,7 +4121,7 @@ BUILDIN(prompt)
if( sd->npc_menu > 0 )
StrBuf->AppendStr(&buf, ":");
StrBuf->AppendStr(&buf, text);
- sd->npc_menu += menu_countoptions(text, 0, NULL);
+ sd->npc_menu += script->menu_countoptions(text, 0, NULL);
}
st->state = RERUNLINE;
@@ -4297,7 +4145,7 @@ BUILDIN(prompt)
if( sd->npc_menu >= 0xff )
{
ShowWarning("buildin_prompt: Too many options specified (current=%d, max=254).\n", sd->npc_menu);
- script_reportsrc(st);
+ script->reportsrc(st);
}
}
else if( sd->npc_menu == 0xff )
@@ -4315,7 +4163,7 @@ BUILDIN(prompt)
for( i = 2; i <= script_lastdata(st); ++i )
{
text = script_getstr(st, i);
- sd->npc_menu -= menu_countoptions(text, sd->npc_menu, &menu);
+ sd->npc_menu -= script->menu_countoptions(text, sd->npc_menu, &menu);
if( sd->npc_menu <= 0 )
break;// entry found
}
@@ -4338,7 +4186,7 @@ BUILDIN(goto)
if( !data_islabel(script_getdata(st,2)) )
{
ShowError("script:goto: not a label\n");
- script_reportdata(script_getdata(st,2));
+ script->reportdata(script_getdata(st,2));
st->state = END;
return false;
}
@@ -4389,7 +4237,7 @@ BUILDIN(callfunc)
ri->pos = st->pos;// script location
ri->nargs = j;// argument count
ri->defsp = st->stack->defsp;// default stack pointer
- push_retinfo(st->stack, ri, ref);
+ script->push_retinfo(st->stack, ri, ref);
st->pos = 0;
st->script = scr;
@@ -4412,7 +4260,7 @@ BUILDIN(callsub)
if( !data_islabel(script_getdata(st,2)) && !data_isfunclabel(script_getdata(st,2)) )
{
ShowError("script:callsub: argument is not a label\n");
- script_reportdata(script_getdata(st,2));
+ script->reportdata(script_getdata(st,2));
st->state = END;
return false;
}
@@ -4439,7 +4287,7 @@ BUILDIN(callsub)
ri->pos = st->pos;// script location
ri->nargs = j;// argument count
ri->defsp = st->stack->defsp;// default stack pointer
- push_retinfo(st->stack, ri, ref);
+ script->push_retinfo(st->stack, ri, ref);
st->pos = pos;
st->stack->defsp = st->stack->sp;
@@ -4558,7 +4406,7 @@ BUILDIN(warp)
const char* str;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -4575,7 +4423,7 @@ BUILDIN(warp)
if( ret ) {
ShowError("buildin_warp: moving player '%s' to \"%s\",%d,%d failed.\n", sd->status.name, str, x, y);
- script_reportsrc(st);
+ script->reportsrc(st);
}
return true;
@@ -4583,7 +4431,7 @@ BUILDIN(warp)
/*==========================================
* Warp a specified area
*------------------------------------------*/
-static int buildin_areawarp_sub(struct block_list *bl,va_list ap)
+int buildin_areawarp_sub(struct block_list *bl,va_list ap)
{
int x2,y2,x3,y3;
unsigned int index;
@@ -4651,14 +4499,14 @@ BUILDIN(areawarp)
else if( !(index=mapindex_name2id(str)) )
return true;
- map->foreachinarea(buildin_areawarp_sub, m,x0,y0,x1,y1, BL_PC, index,x2,y2,x3,y3);
+ map->foreachinarea(script->buildin_areawarp_sub, m,x0,y0,x1,y1, BL_PC, index,x2,y2,x3,y3);
return true;
}
/*==========================================
* areapercentheal <map>,<x1>,<y1>,<x2>,<y2>,<hp>,<sp>
*------------------------------------------*/
-static int buildin_areapercentheal_sub(struct block_list *bl,va_list ap)
+int buildin_areapercentheal_sub(struct block_list *bl,va_list ap)
{
int hp, sp;
hp = va_arg(ap, int);
@@ -4682,7 +4530,7 @@ BUILDIN(areapercentheal) {
if( (m=map->mapname2mapid(mapname))< 0)
return true;
- map->foreachinarea(buildin_areapercentheal_sub,m,x0,y0,x1,y1,BL_PC,hp,sp);
+ map->foreachinarea(script->buildin_areapercentheal_sub,m,x0,y0,x1,y1,BL_PC,hp,sp);
return true;
}
@@ -4764,7 +4612,7 @@ BUILDIN(warpparty)
break;
case 2:
//"SavePoint" uses save point of the currently attached player
- if (( sd = script_rid2sd(st) ) == NULL )
+ if (( sd = script->rid2sd(st) ) == NULL )
return true;
default:
mapindex = 0;
@@ -4775,7 +4623,7 @@ BUILDIN(warpparty)
if( !(pl_sd = p->data[i].sd) || pl_sd->status.party_id != p_id )
continue;
- if( str2 && strcmp(str2, maplist[pl_sd->bl.m].name) != 0 )
+ if( str2 && strcmp(str2, map->list[pl_sd->bl.m].name) != 0 )
continue;
if( pc_isdead(pl_sd) )
@@ -4784,20 +4632,20 @@ BUILDIN(warpparty)
switch( type )
{
case 0: // Random
- if(!maplist[pl_sd->bl.m].flag.nowarp)
+ if(!map->list[pl_sd->bl.m].flag.nowarp)
pc->randomwarp(pl_sd,CLR_TELEPORT);
break;
case 1: // SavePointAll
- if(!maplist[pl_sd->bl.m].flag.noreturn)
+ if(!map->list[pl_sd->bl.m].flag.noreturn)
pc->setpos(pl_sd,pl_sd->status.save_point.map,pl_sd->status.save_point.x,pl_sd->status.save_point.y,CLR_TELEPORT);
break;
case 2: // SavePoint
- if(!maplist[pl_sd->bl.m].flag.noreturn)
+ if(!map->list[pl_sd->bl.m].flag.noreturn)
pc->setpos(pl_sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT);
break;
case 3: // Leader
case 4: // m,x,y
- if(!maplist[pl_sd->bl.m].flag.noreturn && !maplist[pl_sd->bl.m].flag.nowarp)
+ 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);
break;
}
@@ -4831,7 +4679,7 @@ BUILDIN(warpguild)
: ( strcmp(str,"SavePoint")==0 ) ? 2
: 3;
- if( type == 2 && ( sd = script_rid2sd(st) ) == NULL )
+ if( type == 2 && ( sd = script->rid2sd(st) ) == NULL )
{// "SavePoint" uses save point of the currently attached player
return true;
}
@@ -4845,19 +4693,19 @@ BUILDIN(warpguild)
switch( type )
{
case 0: // Random
- if(!maplist[pl_sd->bl.m].flag.nowarp)
+ if(!map->list[pl_sd->bl.m].flag.nowarp)
pc->randomwarp(pl_sd,CLR_TELEPORT);
break;
case 1: // SavePointAll
- if(!maplist[pl_sd->bl.m].flag.noreturn)
+ if(!map->list[pl_sd->bl.m].flag.noreturn)
pc->setpos(pl_sd,pl_sd->status.save_point.map,pl_sd->status.save_point.x,pl_sd->status.save_point.y,CLR_TELEPORT);
break;
case 2: // SavePoint
- if(!maplist[pl_sd->bl.m].flag.noreturn)
+ if(!map->list[pl_sd->bl.m].flag.noreturn)
pc->setpos(pl_sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT);
break;
case 3: // m,x,y
- if(!maplist[pl_sd->bl.m].flag.noreturn && !maplist[pl_sd->bl.m].flag.nowarp)
+ 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);
break;
}
@@ -4873,7 +4721,7 @@ BUILDIN(heal) {
TBL_PC *sd;
int hp,sp;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (!sd) return true;
hp=script_getnum(st,2);
@@ -4898,7 +4746,7 @@ BUILDIN(itemheal)
return true;
}
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (!sd) return true;
pc->itemheal(sd,sd->itemid,hp,sp);
return true;
@@ -4920,7 +4768,7 @@ BUILDIN(percentheal)
return true;
}
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
#ifdef RENEWAL
@@ -4946,7 +4794,7 @@ BUILDIN(jobchange)
{
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -4982,14 +4830,14 @@ BUILDIN(input)
int min;
int max;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
data = script_getdata(st,2);
if( !data_isreference(data) ){
ShowError("script:input: not a variable\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;
}
@@ -5017,13 +4865,13 @@ BUILDIN(input)
if( is_string_variable(name) )
{
int len = (int)strlen(sd->npc_str);
- set_reg(st, sd, uid, name, (void*)sd->npc_str, script_getref(st,2));
+ script->set_reg(st, sd, uid, name, (void*)sd->npc_str, script_getref(st,2));
script_pushint(st, (len > max ? 1 : len < min ? -1 : 0));
}
else
{
int amount = sd->npc_amount;
- set_reg(st, sd, uid, name, (void*)__64BPTRSIZE(cap_value(amount,min,max)), script_getref(st,2));
+ script->set_reg(st, sd, uid, name, (void*)__64BPTRSIZE(cap_value(amount,min,max)), script_getref(st,2));
script_pushint(st, (amount > max ? 1 : amount < min ? -1 : 0));
}
st->state = RUN;
@@ -5052,7 +4900,7 @@ BUILDIN(set)
if( !data_isreference(data) )
{
ShowError("script:set: not a variable\n");
- script_reportdata(script_getdata(st,2));
+ script->reportdata(script_getdata(st,2));
st->state = END;
return false;
}
@@ -5063,7 +4911,7 @@ BUILDIN(set)
if( not_server_variable(prefix) )
{
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
{
ShowError("script:set: no player attached for player variable '%s'\n", name);
@@ -5078,7 +4926,7 @@ BUILDIN(set)
if( !not_array_variable(*namevalue) )
{// array variable being copied into another array variable
- if( sd == NULL && not_server_variable(*namevalue) && !(sd = script_rid2sd(st)) )
+ if( sd == NULL && not_server_variable(*namevalue) && !(sd = script->rid2sd(st)) )
{// player must be attached in order to copy a player variable
ShowError("script:set: no player attached for player variable '%s'\n", namevalue);
return true;
@@ -5100,9 +4948,9 @@ BUILDIN(set)
#endif
if( is_string_variable(name) )
- set_reg(st,sd,num,name,(void*)script_getstr(st,3),script_getref(st,2));
+ script->set_reg(st,sd,num,name,(void*)script_getstr(st,3),script_getref(st,2));
else
- set_reg(st,sd,num,name,(void*)__64BPTRSIZE(script_getnum(st,3)),script_getref(st,2));
+ script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(script_getnum(st,3)),script_getref(st,2));
// return a copy of the variable reference
script_pushcopy(st,2);
@@ -5115,7 +4963,7 @@ BUILDIN(set)
///
/// Returns the size of the specified array
-static int32 getarraysize(struct script_state* st, int32 id, int32 idx, int isstring, struct DBMap** ref)
+int32 getarraysize(struct script_state* st, int32 id, int32 idx, int isstring, struct DBMap** ref)
{
int32 ret = idx;
@@ -5160,7 +5008,7 @@ BUILDIN(setarray)
if( !data_isreference(data) )
{
ShowError("script:setarray: not a variable\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// not a variable
}
@@ -5171,14 +5019,14 @@ BUILDIN(setarray)
if( not_array_variable(*name) )
{
ShowError("script:setarray: illegal scope\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// not supported
}
if( not_server_variable(*name) )
{
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached
}
@@ -5190,12 +5038,12 @@ BUILDIN(setarray)
if( is_string_variable(name) )
{// string array
for( i = 3; start < end; ++start, ++i )
- set_reg(st, sd, reference_uid(id, start), name, (void*)script_getstr(st,i), reference_getref(data));
+ script->set_reg(st, sd, reference_uid(id, start), name, (void*)script_getstr(st,i), reference_getref(data));
}
else
{// int array
for( i = 3; start < end; ++start, ++i )
- set_reg(st, sd, reference_uid(id, start), name, (void*)__64BPTRSIZE(script_getnum(st,i)), reference_getref(data));
+ script->set_reg(st, sd, reference_uid(id, start), name, (void*)__64BPTRSIZE(script_getnum(st,i)), reference_getref(data));
}
return true;
}
@@ -5218,7 +5066,7 @@ BUILDIN(cleararray)
if( !data_isreference(data) )
{
ShowError("script:cleararray: not a variable\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// not a variable
}
@@ -5229,14 +5077,14 @@ BUILDIN(cleararray)
if( not_array_variable(*name) )
{
ShowError("script:cleararray: illegal scope\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// not supported
}
if( not_server_variable(*name) )
{
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached
}
@@ -5251,7 +5099,7 @@ BUILDIN(cleararray)
end = SCRIPT_MAX_ARRAYSIZE;
for( ; start < end; ++start )
- set_reg(st, sd, reference_uid(id, start), name, v, script_getref(st,2));
+ script->set_reg(st, sd, reference_uid(id, start), name, v, script_getref(st,2));
return true;
}
@@ -5279,8 +5127,8 @@ BUILDIN(copyarray)
if( !data_isreference(data1) || !data_isreference(data2) )
{
ShowError("script:copyarray: not a variable\n");
- script_reportdata(data1);
- script_reportdata(data2);
+ script->reportdata(data1);
+ script->reportdata(data2);
st->state = END;
return false;// not a variable
}
@@ -5294,8 +5142,8 @@ BUILDIN(copyarray)
if( not_array_variable(*name1) || not_array_variable(*name2) )
{
ShowError("script:copyarray: illegal scope\n");
- script_reportdata(data1);
- script_reportdata(data2);
+ script->reportdata(data1);
+ script->reportdata(data2);
st->state = END;
return false;// not supported
}
@@ -5303,15 +5151,15 @@ BUILDIN(copyarray)
if( is_string_variable(name1) != is_string_variable(name2) )
{
ShowError("script:copyarray: type mismatch\n");
- script_reportdata(data1);
- script_reportdata(data2);
+ script->reportdata(data1);
+ script->reportdata(data2);
st->state = END;
return false;// data type mismatch
}
if( not_server_variable(*name1) || not_server_variable(*name2) )
{
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached
}
@@ -5327,7 +5175,7 @@ BUILDIN(copyarray)
for( i = count - 1; i >= 0; --i )
{
v = script->get_val2(st, reference_uid(id2, idx2 + i), reference_getref(data2));
- set_reg(st, sd, reference_uid(id1, idx1 + i), name1, v, reference_getref(data1));
+ script->set_reg(st, sd, reference_uid(id1, idx1 + i), name1, v, reference_getref(data1));
script_removetop(st, -1, 0);
}
}
@@ -5338,11 +5186,11 @@ BUILDIN(copyarray)
if( idx2 + i < SCRIPT_MAX_ARRAYSIZE )
{
v = script->get_val2(st, reference_uid(id2, idx2 + i), reference_getref(data2));
- set_reg(st, sd, reference_uid(id1, idx1 + i), name1, v, reference_getref(data1));
+ script->set_reg(st, sd, reference_uid(id1, idx1 + i), name1, v, reference_getref(data1));
script_removetop(st, -1, 0);
}
else// out of range - assume ""/0
- set_reg(st, sd, reference_uid(id1, idx1 + i), name1, (is_string_variable(name1)?(void*)"":(void*)0), reference_getref(data1));
+ script->set_reg(st, sd, reference_uid(id1, idx1 + i), name1, (is_string_variable(name1)?(void*)"":(void*)0), reference_getref(data1));
}
}
return true;
@@ -5362,7 +5210,7 @@ BUILDIN(getarraysize)
if( !data_isreference(data) )
{
ShowError("script:getarraysize: not a variable\n");
- script_reportdata(data);
+ script->reportdata(data);
script_pushnil(st);
st->state = END;
return false;// not a variable
@@ -5372,13 +5220,13 @@ BUILDIN(getarraysize)
if( not_array_variable(*name) )
{
ShowError("script:getarraysize: illegal scope\n");
- script_reportdata(data);
+ script->reportdata(data);
script_pushnil(st);
st->state = END;
return false;// not supported
}
- script_pushint(st, getarraysize(st, reference_getid(data), reference_getindex(data), is_string_variable(name), reference_getref(data)));
+ script_pushint(st, script->getarraysize(st, reference_getid(data), reference_getindex(data), is_string_variable(name), reference_getref(data)));
return true;
}
@@ -5400,7 +5248,7 @@ BUILDIN(deletearray)
if( !data_isreference(data) )
{
ShowError("script:deletearray: not a variable\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// not a variable
}
@@ -5411,14 +5259,14 @@ BUILDIN(deletearray)
if( not_array_variable(*name) )
{
ShowError("script:deletearray: illegal scope\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// not supported
}
if( not_server_variable(*name) )
{
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached
}
@@ -5440,7 +5288,7 @@ BUILDIN(deletearray)
for( ; start + count < end; ++start )
{
void* v = script->get_val2(st, reference_uid(id, start + count), reference_getref(data));
- set_reg(st, sd, reference_uid(id, start), name, v, reference_getref(data));
+ script->set_reg(st, sd, reference_uid(id, start), name, v, reference_getref(data));
script_removetop(st, -1, 0);
}
}
@@ -5449,12 +5297,12 @@ BUILDIN(deletearray)
if( is_string_variable(name) )
{
for( ; start < end; ++start )
- set_reg(st, sd, reference_uid(id, start), name, (void *)"", reference_getref(data));
+ script->set_reg(st, sd, reference_uid(id, start), name, (void *)"", reference_getref(data));
}
else
{
for( ; start < end; ++start )
- set_reg(st, sd, reference_uid(id, start), name, (void*)0, reference_getref(data));
+ script->set_reg(st, sd, reference_uid(id, start), name, (void*)0, reference_getref(data));
}
return true;
}
@@ -5474,7 +5322,7 @@ BUILDIN(getelementofarray)
if( !data_isreference(data) )
{
ShowError("script:getelementofarray: not a variable\n");
- script_reportdata(data);
+ script->reportdata(data);
script_pushnil(st);
st->state = END;
return false;// not a variable
@@ -5485,7 +5333,7 @@ BUILDIN(getelementofarray)
if( not_array_variable(*name) )
{
ShowError("script:getelementofarray: illegal scope\n");
- script_reportdata(data);
+ script->reportdata(data);
script_pushnil(st);
st->state = END;
return false;// not supported
@@ -5495,7 +5343,7 @@ BUILDIN(getelementofarray)
if( i < 0 || i >= SCRIPT_MAX_ARRAYSIZE )
{
ShowWarning("script:getelementofarray: index out of range (%d)\n", i);
- script_reportdata(data);
+ script->reportdata(data);
script_pushnil(st);
st->state = END;
return false;// out of range
@@ -5520,7 +5368,7 @@ BUILDIN(setlook)
type=script_getnum(st,2);
val=script_getnum(st,3);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -5537,7 +5385,7 @@ BUILDIN(changelook)
type=script_getnum(st,2);
val=script_getnum(st,3);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -5553,7 +5401,7 @@ BUILDIN(cutin)
{
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -5575,7 +5423,7 @@ BUILDIN(viewpoint)
id=script_getnum(st,5);
color=script_getnum(st,6);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -5594,7 +5442,7 @@ BUILDIN(countitem)
struct item_data* id = NULL;
struct script_data* data;
- TBL_PC* sd = script_rid2sd(st);
+ TBL_PC* sd = script->rid2sd(st);
if (!sd) {
script_pushint(st,0);
return true;
@@ -5641,7 +5489,7 @@ BUILDIN(countitem2)
struct item_data* id = NULL;
struct script_data* data;
- TBL_PC* sd = script_rid2sd(st);
+ TBL_PC* sd = script->rid2sd(st);
if (!sd) {
script_pushint(st,0);
return true;
@@ -5704,7 +5552,7 @@ BUILDIN(checkweight)
struct map_session_data* sd;
struct script_data* data;
- if( ( sd = script_rid2sd(st) ) == NULL ){
+ if( ( sd = script->rid2sd(st) ) == NULL ){
return true;
}
nbargs = script_lastdata(st)+1;
@@ -5790,7 +5638,7 @@ BUILDIN(checkweight2)
int32 idx_it, idx_nb;
int nb_it, nb_nb; //array size
- TBL_PC *sd = script_rid2sd(st);
+ TBL_PC *sd = script->rid2sd(st);
nullpo_retr(1,sd);
data_it = script_getdata(st, 2);
@@ -5820,8 +5668,8 @@ BUILDIN(checkweight2)
script_pushint(st,0);
return false;// not supported
}
- nb_it = getarraysize(st, id_it, idx_it, 0, reference_getref(data_it));
- nb_nb = getarraysize(st, id_nb, idx_nb, 0, reference_getref(data_nb));
+ nb_it = script->getarraysize(st, id_it, idx_it, 0, reference_getref(data_it));
+ nb_nb = script->getarraysize(st, id_nb, idx_nb, 0, reference_getref(data_nb));
if(nb_it != nb_nb){
ShowError("Size mistmatch: nb_it=%d, nb_nb=%d\n",nb_it,nb_nb);
fail = 1;
@@ -5928,7 +5776,7 @@ BUILDIN(getitem)
if( script_hasdata(st,4) )
sd=map->id2sd(script_getnum(st,4)); // <Account ID>
else
- sd=script_rid2sd(st); // Attached player
+ sd=script->rid2sd(st); // Attached player
if( sd == NULL ) // no target
return true;
@@ -5968,7 +5816,7 @@ BUILDIN(getitem2)
if( script_hasdata(st,11) )
sd=map->id2sd(script_getnum(st,11)); // <Account ID>
else
- sd=script_rid2sd(st); // Attached player
+ sd=script->rid2sd(st); // Attached player
if( sd == NULL ) // no target
return true;
@@ -6064,7 +5912,7 @@ BUILDIN(rentitem)
data = script_getdata(st,2);
script->get_val(st,data);
- if( (sd = script_rid2sd(st)) == NULL )
+ if( (sd = script->rid2sd(st)) == NULL )
return true;
if( data_isstring(data) )
@@ -6121,7 +5969,7 @@ BUILDIN(getnameditem)
TBL_PC *sd, *tsd;
struct script_data *data;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (sd == NULL)
{ //Player not attached!
script_pushint(st,0);
@@ -6242,7 +6090,7 @@ BUILDIN(makeitem)
if(strcmp(mapname,"this")==0) {
TBL_PC *sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (!sd) return true; //Failed...
m=sd->bl.m;
} else
@@ -6270,7 +6118,7 @@ BUILDIN(makeitem)
/// Counts / deletes the current item given by idx.
/// Used by buildin_delitem_search
/// Relies on all input data being already fully valid.
-static void buildin_delitem_delete(struct map_session_data* sd, int idx, int* amount, bool delete_items)
+void buildin_delitem_delete(struct map_session_data* sd, int idx, int* amount, bool delete_items)
{
int delamount;
struct item* inv = &sd->status.inventory[idx];
@@ -6295,7 +6143,7 @@ static void buildin_delitem_delete(struct map_session_data* sd, int idx, int* am
/// Relies on all input data being already fully valid.
/// @param exact_match will also match item attributes and cards, not just name id
/// @return true when all items could be deleted, false when there were not enough items to delete
-static bool buildin_delitem_search(struct map_session_data* sd, struct item* it, bool exact_match)
+bool buildin_delitem_search(struct map_session_data* sd, struct item* it, bool exact_match)
{
bool delete_items = false;
int i, amount, important;
@@ -6358,7 +6206,7 @@ static bool buildin_delitem_search(struct map_session_data* sd, struct item* it,
}
// count / delete item
- buildin_delitem_delete(sd, i, &amount, delete_items);
+ script->buildin_delitem_delete(sd, i, &amount, delete_items);
}
// 2nd pass -- any matching item
@@ -6389,7 +6237,7 @@ static bool buildin_delitem_search(struct map_session_data* sd, struct item* it,
}
// count / delete item
- buildin_delitem_delete(sd, i, &amount, delete_items);
+ script->buildin_delitem_delete(sd, i, &amount, delete_items);
}
if( amount )
@@ -6432,7 +6280,7 @@ BUILDIN(delitem)
}
else
{
- sd = script_rid2sd(st);// attached player
+ sd = script->rid2sd(st);// attached player
if( sd == NULL )
return true;
}
@@ -6467,7 +6315,7 @@ BUILDIN(delitem)
if( it.amount <= 0 )
return true;// nothing to do
- if( buildin_delitem_search(sd, &it, false) )
+ if( script->buildin_delitem_search(sd, &it, false) )
{// success
return true;
}
@@ -6498,7 +6346,7 @@ BUILDIN(delitem2) {
}
else
{
- sd = script_rid2sd(st);// attached player
+ sd = script->rid2sd(st);// attached player
if( sd == NULL )
return true;
}
@@ -6540,7 +6388,7 @@ BUILDIN(delitem2) {
if( it.amount <= 0 )
return true;// nothing to do
- if( buildin_delitem_search(sd, &it, true) )
+ if( script->buildin_delitem_search(sd, &it, true) )
{// success
return true;
}
@@ -6557,7 +6405,7 @@ BUILDIN(delitem2) {
BUILDIN(enableitemuse)
{
TBL_PC *sd;
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if (sd)
st->npc_item_flag = sd->npc_item_flag = 1;
return true;
@@ -6566,7 +6414,7 @@ BUILDIN(enableitemuse)
BUILDIN(disableitemuse)
{
TBL_PC *sd;
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if (sd)
st->npc_item_flag = sd->npc_item_flag = 0;
return true;
@@ -6584,7 +6432,7 @@ BUILDIN(readparam) {
if( script_hasdata(st,3) )
sd=map->nick2sd(script_getstr(st,3));
else
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if(sd==NULL){
script_pushint(st,-1);
@@ -6613,7 +6461,7 @@ BUILDIN(getcharid) {
if( script_hasdata(st,3) )
sd=map->nick2sd(script_getstr(st,3));
else
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if(sd==NULL){
script_pushint(st,0); //return 0, according docs
@@ -6842,7 +6690,7 @@ BUILDIN(strcharinfo)
struct guild* g;
struct party_data* p;
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if (!sd) { //Avoid crashing....
script_pushconststr(st,"");
return true;
@@ -6867,7 +6715,7 @@ BUILDIN(strcharinfo)
}
break;
case 3:
- script_pushconststr(st,maplist[sd->bl.m].name);
+ script_pushconststr(st,map->list[sd->bl.m].name);
break;
default:
ShowWarning("buildin_strcharinfo: unknown parameter.\n");
@@ -6919,7 +6767,7 @@ BUILDIN(strnpcinfo) {
name = aStrdup(nd->exname);
break;
case 4: // map name
- name = aStrdup(maplist[nd->bl.m].name);
+ name = aStrdup(map->list[nd->bl.m].name);
break;
}
@@ -6931,10 +6779,6 @@ BUILDIN(strnpcinfo) {
return true;
}
-
-// aegis->athena slot position conversion table
-static unsigned int equip[] = {EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_GARMENT,EQP_SHOES,EQP_ACC_L,EQP_ACC_R,EQP_HEAD_MID,EQP_HEAD_LOW,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_GARMENT};
-
/*==========================================
* GetEquipID(Pos); Pos: 1-10
*------------------------------------------*/
@@ -6944,19 +6788,19 @@ BUILDIN(getequipid)
TBL_PC* sd;
struct item_data* item;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
num = script_getnum(st,2) - 1;
- if( num < 0 || num >= ARRAYLENGTH(equip) )
+ if( num < 0 || num >= ARRAYLENGTH(script->equip) )
{
script_pushint(st,-1);
return true;
}
// get inventory position of item
- i = pc->checkequip(sd,equip[num]);
+ i = pc->checkequip(sd,script->equip[num]);
if( i < 0 )
{
script_pushint(st,-1);
@@ -6982,19 +6826,19 @@ BUILDIN(getequipname)
TBL_PC* sd;
struct item_data* item;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
num = script_getnum(st,2) - 1;
- if( num < 0 || num >= ARRAYLENGTH(equip) )
+ if( num < 0 || num >= ARRAYLENGTH(script->equip) )
{
script_pushconststr(st,"");
return true;
}
// get inventory position of item
- i = pc->checkequip(sd,equip[num]);
+ i = pc->checkequip(sd,script->equip[num]);
if( i < 0 )
{
script_pushconststr(st,"");
@@ -7018,7 +6862,7 @@ BUILDIN(getbrokenid)
int i,num,id=0,brokencounter=0;
TBL_PC *sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -7047,7 +6891,7 @@ BUILDIN(repair)
int repaircounter=0;
TBL_PC *sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -7076,7 +6920,7 @@ BUILDIN(repairall)
int i, repaircounter = 0;
TBL_PC *sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if(sd == NULL)
return true;
@@ -7108,12 +6952,12 @@ BUILDIN(getequipisequiped)
TBL_PC *sd;
num = script_getnum(st,2);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
- if (num > 0 && num <= ARRAYLENGTH(equip))
- i=pc->checkequip(sd,equip[num-1]);
+ if (num > 0 && num <= ARRAYLENGTH(script->equip))
+ i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0)
script_pushint(st,1);
@@ -7135,12 +6979,12 @@ BUILDIN(getequipisenableref)
TBL_PC *sd;
num = script_getnum(st,2);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
- if( num > 0 && num <= ARRAYLENGTH(equip) )
- i = pc->checkequip(sd,equip[num-1]);
+ if( num > 0 && num <= ARRAYLENGTH(script->equip) )
+ i = pc->checkequip(sd,script->equip[num-1]);
if( i >= 0 && sd->inventory_data[i] && !sd->inventory_data[i]->flag.no_refine && !sd->status.inventory[i].expire_time )
script_pushint(st,1);
else
@@ -7161,12 +7005,12 @@ BUILDIN(getequipisidentify)
TBL_PC *sd;
num = script_getnum(st,2);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
- if (num > 0 && num <= ARRAYLENGTH(equip))
- i=pc->checkequip(sd,equip[num-1]);
+ if (num > 0 && num <= ARRAYLENGTH(script->equip))
+ i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0)
script_pushint(st,sd->status.inventory[i].identify);
else
@@ -7187,12 +7031,12 @@ BUILDIN(getequiprefinerycnt)
TBL_PC *sd;
num = script_getnum(st,2);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
- if (num > 0 && num <= ARRAYLENGTH(equip))
- i=pc->checkequip(sd,equip[num-1]);
+ if (num > 0 && num <= ARRAYLENGTH(script->equip))
+ i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0)
script_pushint(st,sd->status.inventory[i].refine);
else
@@ -7214,12 +7058,12 @@ BUILDIN(getequipweaponlv)
TBL_PC *sd;
num = script_getnum(st,2);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
- if (num > 0 && num <= ARRAYLENGTH(equip))
- i=pc->checkequip(sd,equip[num-1]);
+ if (num > 0 && num <= ARRAYLENGTH(script->equip))
+ i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0 && sd->inventory_data[i])
script_pushint(st,sd->inventory_data[i]->wlv);
else
@@ -7239,12 +7083,12 @@ BUILDIN(getequippercentrefinery) {
TBL_PC *sd;
num = script_getnum(st,2);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
- if (num > 0 && num <= ARRAYLENGTH(equip))
- i=pc->checkequip(sd,equip[num-1]);
+ if (num > 0 && num <= ARRAYLENGTH(script->equip))
+ i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0 && sd->status.inventory[i].nameid && sd->status.inventory[i].refine < MAX_REFINE)
script_pushint(st,status->get_refine_chance(itemdb_wlv(sd->status.inventory[i].nameid), (int)sd->status.inventory[i].refine));
else
@@ -7262,12 +7106,12 @@ BUILDIN(successrefitem)
TBL_PC *sd;
num = script_getnum(st,2);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
- if (num > 0 && num <= ARRAYLENGTH(equip))
- i=pc->checkequip(sd,equip[num-1]);
+ if (num > 0 && num <= ARRAYLENGTH(script->equip))
+ i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0) {
ep=sd->status.inventory[i].equip;
@@ -7319,12 +7163,12 @@ BUILDIN(failedrefitem)
TBL_PC *sd;
num = script_getnum(st,2);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
- if (num > 0 && num <= ARRAYLENGTH(equip))
- i=pc->checkequip(sd,equip[num-1]);
+ if (num > 0 && num <= ARRAYLENGTH(script->equip))
+ i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0) {
sd->status.inventory[i].refine = 0;
pc->unequipitem(sd,i,3); //recalculate bonus
@@ -7343,26 +7187,29 @@ BUILDIN(failedrefitem)
*------------------------------------------*/
BUILDIN(downrefitem)
{
- int i = -1,num,ep;
+ int i = -1,num,ep, down = 1;
TBL_PC *sd;
- num = script_getnum(st,2);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
+ num = script_getnum(st,2);
+ if( script_hasdata(st, 3) )
+ down = script_getnum(st, 3);
- if (num > 0 && num <= ARRAYLENGTH(equip))
- i = pc->checkequip(sd,equip[num-1]);
+ if (num > 0 && num <= ARRAYLENGTH(script->equip))
+ i = pc->checkequip(sd,script->equip[num-1]);
if(i >= 0) {
ep = sd->status.inventory[i].equip;
//Logs items, got from (N)PC scripts [Lupus]
logs->pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i],sd->inventory_data[i]);
- sd->status.inventory[i].refine++;
pc->unequipitem(sd,i,2); // status calc will happen in pc->equipitem() below
-
- clif->refine(sd->fd,2,i,sd->status.inventory[i].refine = sd->status.inventory[i].refine - 2);
+ sd->status.inventory[i].refine -= down;
+ sd->status.inventory[i].refine = cap_value( sd->status.inventory[i].refine, 0, MAX_REFINE);
+
+ clif->refine(sd->fd,2,i,sd->status.inventory[i].refine);
clif->delitem(sd,i,1,3);
//Logs items, got from (N)PC scripts [Lupus]
@@ -7385,12 +7232,12 @@ BUILDIN(delequip)
TBL_PC *sd;
num = script_getnum(st,2);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
- if (num > 0 && num <= ARRAYLENGTH(equip))
- i=pc->checkequip(sd,equip[num-1]);
+ if (num > 0 && num <= ARRAYLENGTH(script->equip))
+ i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0) {
pc->unequipitem(sd,i,3); //recalculate bonus
pc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
@@ -7408,7 +7255,7 @@ BUILDIN(statusup)
TBL_PC *sd;
type=script_getnum(st,2);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -7426,7 +7273,7 @@ BUILDIN(statusup2)
type=script_getnum(st,2);
val=script_getnum(st,3);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -7452,7 +7299,7 @@ BUILDIN(bonus)
int val5 = 0;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true; // no player attached
@@ -7531,7 +7378,7 @@ BUILDIN(autobonus) {
TBL_PC* sd;
const char *bonus_script, *other_script = NULL;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true; // no player attached
@@ -7552,9 +7399,9 @@ BUILDIN(autobonus) {
if( pc->addautobonus(sd->autobonus,ARRAYLENGTH(sd->autobonus),bonus_script,rate,dur,atk_type,other_script,
sd->status.inventory[status->current_equip_item_index].equip,false)
) {
- script_add_autobonus(bonus_script);
+ script->add_autobonus(bonus_script);
if( other_script )
- script_add_autobonus(other_script);
+ script->add_autobonus(other_script);
}
return true;
@@ -7567,7 +7414,7 @@ BUILDIN(autobonus2) {
TBL_PC* sd;
const char *bonus_script, *other_script = NULL;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true; // no player attached
@@ -7588,9 +7435,9 @@ BUILDIN(autobonus2) {
if( pc->addautobonus(sd->autobonus2,ARRAYLENGTH(sd->autobonus2),bonus_script,rate,dur,atk_type,other_script,
sd->status.inventory[status->current_equip_item_index].equip,false)
) {
- script_add_autobonus(bonus_script);
+ script->add_autobonus(bonus_script);
if( other_script )
- script_add_autobonus(other_script);
+ script->add_autobonus(other_script);
}
return true;
@@ -7602,7 +7449,7 @@ BUILDIN(autobonus3) {
TBL_PC* sd;
const char *bonus_script, *other_script = NULL;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true; // no player attached
@@ -7622,9 +7469,9 @@ BUILDIN(autobonus3) {
if( pc->addautobonus(sd->autobonus3,ARRAYLENGTH(sd->autobonus3),bonus_script,rate,dur,atk_type,other_script,
sd->status.inventory[status->current_equip_item_index].equip,true)
) {
- script_add_autobonus(bonus_script);
+ script->add_autobonus(bonus_script);
if( other_script )
- script_add_autobonus(other_script);
+ script->add_autobonus(other_script);
}
return true;
@@ -7647,7 +7494,7 @@ BUILDIN(skill)
int flag = 1;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -7676,7 +7523,7 @@ BUILDIN(addtoskill)
int flag = 2;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -7700,7 +7547,7 @@ BUILDIN(guildskill)
TBL_PC* sd;
int i;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -7721,7 +7568,7 @@ BUILDIN(getskilllv)
int id;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -7770,7 +7617,7 @@ BUILDIN(getgmlevel)
{
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -7786,7 +7633,7 @@ BUILDIN(getgroupid)
{
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (sd == NULL)
return false; // no player attached, report source
script_pushint(st, pc_get_group_id(sd));
@@ -7810,7 +7657,7 @@ BUILDIN(checkoption)
int option;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -7831,7 +7678,7 @@ BUILDIN(checkoption1)
int opt1;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -7852,7 +7699,7 @@ BUILDIN(checkoption2)
int opt2;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -7878,7 +7725,7 @@ BUILDIN(setoption)
int flag = 1;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -7911,7 +7758,7 @@ BUILDIN(checkcart)
{
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -7939,7 +7786,7 @@ BUILDIN(setcart)
int type = 1;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -7959,7 +7806,7 @@ BUILDIN(checkfalcon)
{
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -7981,7 +7828,7 @@ BUILDIN(setfalcon)
int flag = 1;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -8002,7 +7849,7 @@ BUILDIN(checkriding)
{
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -8024,7 +7871,7 @@ BUILDIN(setriding)
int flag = 1;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -8043,7 +7890,7 @@ BUILDIN(checkwug)
{
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -8063,7 +7910,7 @@ BUILDIN(checkmadogear)
{
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -8085,7 +7932,7 @@ BUILDIN(setmadogear)
int flag = 1;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -8107,7 +7954,7 @@ BUILDIN(savepoint) {
const char* str;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
@@ -8226,7 +8073,7 @@ BUILDIN(gettimestr)
BUILDIN(openstorage) {
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -8238,7 +8085,7 @@ BUILDIN(guildopenstorage) {
TBL_PC* sd;
int ret;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -8257,7 +8104,7 @@ BUILDIN(itemskill) {
int lv;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL || sd->ud.skilltimer != INVALID_TIMER )
return true;
@@ -8283,7 +8130,7 @@ BUILDIN(produce)
int trigger;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -8299,7 +8146,7 @@ BUILDIN(cooking)
int trigger;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -8316,7 +8163,7 @@ BUILDIN(makepet)
int id,pet_id;
id=script_getnum(st,2);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -8344,7 +8191,7 @@ BUILDIN(getexp)
int base=0,job=0;
double bonus;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -8371,7 +8218,7 @@ BUILDIN(guildgetexp)
TBL_PC* sd;
int exp;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -8431,7 +8278,7 @@ BUILDIN(monster)
if (script_hasdata(st, 8))
{
event = script_getstr(st, 8);
- check_event(st, event);
+ script->check_event(st, event);
}
if (script_hasdata(st, 9))
@@ -8470,7 +8317,7 @@ BUILDIN(monster)
return false;
}
- if (maplist[m].flag.src4instance && st->instance_id >= 0) { // Try to redirect to the instance map, not the src map
+ if (map->list[m].flag.src4instance && st->instance_id >= 0) { // Try to redirect to the instance map, not the src map
if ((m = instance->mapid2imapid(m, st->instance_id)) < 0) {
ShowError("buildin_monster: Trying to spawn monster (%d) on instance map (%s) without instance attached.\n", class_, mapn);
return false;
@@ -8540,7 +8387,7 @@ BUILDIN(areamonster)
if (script_hasdata(st,10)) {
event = script_getstr(st, 10);
- check_event(st, event);
+ script->check_event(st, event);
}
if (script_hasdata(st, 11)) {
@@ -8568,7 +8415,7 @@ BUILDIN(areamonster)
ShowWarning("buildin_areamonster: Attempted to spawn monster class %d on non-existing map '%s'\n",class_, mapn);
return false;
}
- if (maplist[m].flag.src4instance && st->instance_id >= 0) { // Try to redirect to the instance map, not the src map
+ if (map->list[m].flag.src4instance && st->instance_id >= 0) { // Try to redirect to the instance map, not the src map
if ((m = instance->mapid2imapid(m, st->instance_id)) < 0) {
ShowError("buildin_areamonster: Trying to spawn monster (%d) on instance map (%s) without instance attached.\n", class_, mapn);
return false;
@@ -8584,7 +8431,7 @@ BUILDIN(areamonster)
/*==========================================
* KillMonster subcheck, verify if mob to kill ain't got an even to handle, could be force kill by allflag
*------------------------------------------*/
-static int buildin_killmonster_sub_strip(struct block_list *bl,va_list ap)
+int buildin_killmonster_sub_strip(struct block_list *bl,va_list ap)
{ //same fix but with killmonster instead - stripping events from mobs.
TBL_MOB* md = (TBL_MOB*)bl;
char *event=va_arg(ap,char *);
@@ -8602,7 +8449,7 @@ static int buildin_killmonster_sub_strip(struct block_list *bl,va_list ap)
md->state.npc_killmonster = 0;
return 0;
}
-static int buildin_killmonster_sub(struct block_list *bl,va_list ap)
+int buildin_killmonster_sub(struct block_list *bl,va_list ap)
{
TBL_MOB* md = (TBL_MOB*)bl;
char *event=va_arg(ap,char *);
@@ -8625,28 +8472,28 @@ BUILDIN(killmonster) {
if(strcmp(event,"All")==0)
allflag = 1;
else
- check_event(st, event);
+ script->check_event(st, event);
if( (m=map->mapname2mapid(mapname))<0 )
return true;
- if( maplist[m].flag.src4instance && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 )
+ if( map->list[m].flag.src4instance && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 )
return true;
if( script_hasdata(st,4) ) {
if ( script_getnum(st,4) == 1 ) {
- map->foreachinmap(buildin_killmonster_sub, m, BL_MOB, event ,allflag);
+ map->foreachinmap(script->buildin_killmonster_sub, m, BL_MOB, event ,allflag);
return true;
}
}
map->freeblock_lock();
- map->foreachinmap(buildin_killmonster_sub_strip, m, BL_MOB, event ,allflag);
+ map->foreachinmap(script->buildin_killmonster_sub_strip, m, BL_MOB, event ,allflag);
map->freeblock_unlock();
return true;
}
-static int buildin_killmonsterall_sub_strip(struct block_list *bl,va_list ap)
+int buildin_killmonsterall_sub_strip(struct block_list *bl,va_list ap)
{ //Strips the event from the mob if it's killed the old method.
struct mob_data *md;
@@ -8657,7 +8504,7 @@ static int buildin_killmonsterall_sub_strip(struct block_list *bl,va_list ap)
status_kill(bl);
return 0;
}
-static int buildin_killmonsterall_sub(struct block_list *bl,va_list ap)
+int buildin_killmonsterall_sub(struct block_list *bl,va_list ap)
{
status_kill(bl);
return 0;
@@ -8670,17 +8517,17 @@ BUILDIN(killmonsterall) {
if( (m = map->mapname2mapid(mapname))<0 )
return true;
- if( maplist[m].flag.src4instance && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 )
+ if( map->list[m].flag.src4instance && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 )
return true;
if( script_hasdata(st,3) ) {
if ( script_getnum(st,3) == 1 ) {
- map->foreachinmap(buildin_killmonsterall_sub,m,BL_MOB);
+ map->foreachinmap(script->buildin_killmonsterall_sub,m,BL_MOB);
return true;
}
}
- map->foreachinmap(buildin_killmonsterall_sub_strip,m,BL_MOB);
+ map->foreachinmap(script->buildin_killmonsterall_sub_strip,m,BL_MOB);
return true;
}
@@ -8712,7 +8559,7 @@ BUILDIN(clone) {
if( script_hasdata(st,10) )
duration=script_getnum(st,10);
- check_event(st, event);
+ script->check_event(st, event);
m = map->mapname2mapid(mapname);
if (m < 0) return true;
@@ -8740,12 +8587,12 @@ BUILDIN(doevent)
const char* event = script_getstr(st,2);
struct map_session_data* sd;
- if( ( sd = script_rid2sd(st) ) == NULL )
+ if( ( sd = script->rid2sd(st) ) == NULL )
{
return true;
}
- check_event(st, event);
+ script->check_event(st, event);
npc->event(sd, event, 0);
return true;
}
@@ -8754,7 +8601,7 @@ BUILDIN(doevent)
BUILDIN(donpcevent)
{
const char* event = script_getstr(st,2);
- check_event(st, event);
+ script->check_event(st, event);
if( !npc->event_do(event) ) {
struct npc_data * nd = map->id2nd(st->oid);
ShowDebug("NPCEvent '%s' not found! (source: %s)\n",event,nd?nd->name:"Unknown");
@@ -8772,7 +8619,7 @@ BUILDIN(cmdothernpc) // Added by RoVeRT
const char* command = script_getstr(st,3);
char event[EVENT_NAME_LENGTH];
snprintf(event, sizeof(event), "%s::OnCommand%s", npc_name, command);
- check_event(st, event);
+ script->check_event(st, event);
npc->event_do(event);
return true;
}
@@ -8785,8 +8632,8 @@ BUILDIN(addtimer)
const char* event = script_getstr(st, 3);
TBL_PC* sd;
- check_event(st, event);
- sd = script_rid2sd(st);
+ script->check_event(st, event);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -8801,11 +8648,11 @@ BUILDIN(deltimer)
TBL_PC* sd;
event=script_getstr(st, 2);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
- check_event(st, event);
+ script->check_event(st, event);
pc->deleventtimer(sd,event);
return true;
}
@@ -8819,11 +8666,11 @@ BUILDIN(addtimercount)
event=script_getstr(st, 2);
tick=script_getnum(st,3);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
- check_event(st, event);
+ script->check_event(st, event);
pc->addeventtimercount(sd,event,tick);
return true;
}
@@ -8862,7 +8709,7 @@ BUILDIN(initnpctimer)
return true;
if( flag ) //Attach
{
- TBL_PC* sd = script_rid2sd(st);
+ TBL_PC* sd = script->rid2sd(st);
if( sd == NULL )
return true;
nd->u.scr.rid = sd->bl.id;
@@ -8907,7 +8754,7 @@ BUILDIN(startnpctimer)
return true;
if( flag ) //Attach
{
- TBL_PC* sd = script_rid2sd(st);
+ TBL_PC* sd = script->rid2sd(st);
if( sd == NULL )
return true;
nd->u.scr.rid = sd->bl.id;
@@ -9034,7 +8881,7 @@ BUILDIN(attachnpctimer) {
if( script_hasdata(st,2) )
sd = map->nick2sd(script_getstr(st,2));
else
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( !sd )
{
@@ -9098,7 +8945,7 @@ BUILDIN(announce) {
if( flag&(BC_TARGET_MASK|BC_SOURCE_MASK) ) {
// Broadcast source or broadcast region defined
send_target target;
- struct block_list *bl = (flag&BC_NPC) ? map->id2bl(st->oid) : (struct block_list *)script_rid2sd(st); // If bc_npc flag is set, use NPC as broadcast source
+ struct block_list *bl = (flag&BC_NPC) ? map->id2bl(st->oid) : (struct block_list *)script->rid2sd(st); // If bc_npc flag is set, use NPC as broadcast source
if (bl == NULL)
return true;
@@ -9123,7 +8970,7 @@ BUILDIN(announce) {
}
/*==========================================
*------------------------------------------*/
-static int buildin_announce_sub(struct block_list *bl, va_list ap)
+int buildin_announce_sub(struct block_list *bl, va_list ap)
{
char *mes = va_arg(ap, char *);
int len = va_arg(ap, int);
@@ -9148,7 +8995,7 @@ BUILDIN(itemeffect) {
struct script_data *data;
struct item_data *item_data;
- nullpo_retr( 1, ( sd = script_rid2sd( st ) ) );
+ nullpo_retr( 1, ( sd = script->rid2sd( st ) ) );
nullpo_retr( 1, ( nd = (TBL_NPC *)map->id2bl( sd->npc_id ) ) );
data = script_getdata( st, 2 );
@@ -9192,7 +9039,7 @@ BUILDIN(mapannounce) {
if ((m = map->mapname2mapid(mapname)) < 0)
return true;
- map->foreachinmap(buildin_announce_sub, m, BL_PC,
+ map->foreachinmap(script->buildin_announce_sub, m, BL_PC,
mes, strlen(mes)+1, flag&BC_COLOR_MASK, fontColor, fontType, fontSize, fontAlign, fontY);
return true;
}
@@ -9216,7 +9063,7 @@ BUILDIN(areaannounce) {
if ((m = map->mapname2mapid(mapname)) < 0)
return true;
- map->foreachinarea(buildin_announce_sub, m, x0, y0, x1, y1, BL_PC,
+ map->foreachinarea(script->buildin_announce_sub, m, x0, y0, x1, y1, BL_PC,
mes, strlen(mes)+1, flag&BC_COLOR_MASK, fontColor, fontType, fontSize, fontAlign, fontY);
return true;
}
@@ -9235,13 +9082,13 @@ BUILDIN(getusers) {
if(flag&0x8) {
// npc
bl = map->id2bl(st->oid);
- } else if((sd = script_rid2sd(st))!=NULL) {
+ } else if((sd = script->rid2sd(st))!=NULL) {
// pc
bl = &sd->bl;
}
if(bl) {
- val = maplist[bl->m].users;
+ val = map->list[bl->m].users;
}
break;
case 1:
@@ -9265,7 +9112,7 @@ BUILDIN(getusersname)
int /*disp_num=1,*/ group_level = 0;
struct s_mapiterator* iter;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (!sd) return true;
group_level = pc->get_group_level(sd);
@@ -9324,12 +9171,12 @@ BUILDIN(getmapusers) {
script_pushint(st,-1);
return true;
}
- script_pushint(st,maplist[m].users);
+ script_pushint(st,map->list[m].users);
return true;
}
/*==========================================
*------------------------------------------*/
-static int buildin_getareausers_sub(struct block_list *bl,va_list ap)
+int buildin_getareausers_sub(struct block_list *bl,va_list ap)
{
int *users=va_arg(ap,int *);
(*users)++;
@@ -9348,7 +9195,7 @@ BUILDIN(getareausers)
script_pushint(st,-1);
return true;
}
- map->foreachinarea(buildin_getareausers_sub,
+ map->foreachinarea(script->buildin_getareausers_sub,
m,x0,y0,x1,y1,BL_PC,&users);
script_pushint(st,users);
return true;
@@ -9356,7 +9203,7 @@ BUILDIN(getareausers)
/*==========================================
*------------------------------------------*/
-static int buildin_getareadropitem_sub(struct block_list *bl,va_list ap)
+int buildin_getareadropitem_sub(struct block_list *bl,va_list ap)
{
int item=va_arg(ap,int);
int *amount=va_arg(ap,int *);
@@ -9395,7 +9242,7 @@ BUILDIN(getareadropitem)
script_pushint(st,-1);
return true;
}
- map->foreachinarea(buildin_getareadropitem_sub,
+ map->foreachinarea(script->buildin_getareadropitem_sub,
m,x0,y0,x1,y1,BL_ITEM,item,&amount);
script_pushint(st,amount);
return true;
@@ -9625,7 +9472,7 @@ BUILDIN(getscrate) {
BUILDIN(getstatus)
{
int id, type;
- struct map_session_data* sd = script_rid2sd(st);
+ struct map_session_data* sd = script->rid2sd(st);
if( sd == NULL )
{// no player attached
@@ -9687,7 +9534,7 @@ BUILDIN(catchpet)
TBL_PC *sd;
pet_id= script_getnum(st,2);
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if( sd == NULL )
return true;
@@ -9702,7 +9549,7 @@ BUILDIN(homunculus_evolution)
{
TBL_PC *sd;
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if( sd == NULL )
return true;
@@ -9723,7 +9570,7 @@ BUILDIN(homunculus_mutate) {
enum homun_type m_class, m_id;
TBL_PC *sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL || sd->hd == NULL )
return true;
@@ -9748,7 +9595,7 @@ BUILDIN(homunculus_mutate) {
BUILDIN(homunculus_shuffle) {
TBL_PC *sd;
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if( sd == NULL )
return true;
@@ -9767,7 +9614,7 @@ BUILDIN(homunculus_shuffle) {
*------------------------------------------*/
BUILDIN(checkhomcall)
{
- TBL_PC *sd = script_rid2sd(st);
+ TBL_PC *sd = script->rid2sd(st);
TBL_HOM *hd;
if( sd == NULL )
@@ -9791,7 +9638,7 @@ BUILDIN(eaclass)
class_ = script_getnum(st,2);
else {
TBL_PC *sd;
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if (!sd) {
script_pushint(st,-1);
return true;
@@ -9810,7 +9657,7 @@ BUILDIN(roclass)
sex = script_getnum(st,3);
else {
TBL_PC *sd;
- if (st->rid && (sd=script_rid2sd(st)))
+ if (st->rid && (sd=script->rid2sd(st)))
sex = sd->status.sex;
else
sex = 1; //Just use male when not found.
@@ -9825,7 +9672,7 @@ BUILDIN(roclass)
BUILDIN(birthpet)
{
TBL_PC *sd;
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if( sd == NULL )
return true;
@@ -9852,7 +9699,7 @@ BUILDIN(resetlvl)
int type=script_getnum(st,2);
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if( sd == NULL )
return true;
@@ -9865,7 +9712,7 @@ BUILDIN(resetlvl)
BUILDIN(resetstatus)
{
TBL_PC *sd;
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
pc->resetstate(sd);
return true;
}
@@ -9876,7 +9723,7 @@ BUILDIN(resetstatus)
BUILDIN(resetskill)
{
TBL_PC *sd;
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
pc->resetskill(sd,1);
return true;
}
@@ -9887,7 +9734,7 @@ BUILDIN(resetskill)
BUILDIN(skillpointcount)
{
TBL_PC *sd;
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
script_pushint(st,sd->status.skill_point + pc->resetskill(sd,2));
return true;
}
@@ -9902,7 +9749,7 @@ BUILDIN(changebase) {
if( script_hasdata(st,3) )
sd=map->id2sd(script_getnum(st,3));
else
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if(sd == NULL)
return true;
@@ -9936,7 +9783,7 @@ BUILDIN(changesex)
{
int i;
TBL_PC *sd = NULL;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
pc->resetskill(sd,4);
// to avoid any problem with equipment and invalid sex, equipment is unequiped.
@@ -10144,7 +9991,7 @@ BUILDIN(warpwaitingpc) {
for( i = 0; i < n && cd->users > 0; i++ ) {
sd = cd->usersd[0];
- if( strcmp(map_name,"SavePoint") == 0 && maplist[sd->bl.m].flag.noteleport ) {
+ if( strcmp(map_name,"SavePoint") == 0 && map->list[sd->bl.m].flag.noteleport ) {
// can't teleport on this map
break;
}
@@ -10180,7 +10027,7 @@ BUILDIN(warpwaitingpc) {
/// @param st Script state to detach the character from.
void script_detach_rid(struct script_state* st) {
if(st->rid) {
- script_detach_state(st, false);
+ script->detach_state(st, false);
st->rid = 0;
}
}
@@ -10192,7 +10039,7 @@ BUILDIN(attachrid) {
int rid = script_getnum(st,2);
if (map->id2sd(rid) != NULL) {
- script_detach_rid(st);
+ script->detach_rid(st);
st->rid = rid;
script->attach_state(st);
@@ -10206,7 +10053,7 @@ BUILDIN(attachrid) {
*------------------------------------------*/
BUILDIN(detachrid)
{
- script_detach_rid(st);
+ script->detach_rid(st);
return true;
}
/*==========================================
@@ -10238,10 +10085,10 @@ BUILDIN(setmapflagnosave) {
mapindex = mapindex_name2id(str2);
if(m >= 0 && mapindex) {
- maplist[m].flag.nosave=1;
- maplist[m].save.map=mapindex;
- maplist[m].save.x=x;
- maplist[m].save.y=y;
+ map->list[m].flag.nosave=1;
+ map->list[m].save.map=mapindex;
+ map->list[m].save.x=x;
+ map->list[m].save.y=y;
}
return true;
@@ -10258,63 +10105,63 @@ BUILDIN(getmapflag)
m = map->mapname2mapid(str);
if(m >= 0) {
switch(i) {
- case MF_NOMEMO: script_pushint(st,maplist[m].flag.nomemo); break;
- case MF_NOTELEPORT: script_pushint(st,maplist[m].flag.noteleport); break;
- case MF_NOSAVE: script_pushint(st,maplist[m].flag.nosave); break;
- case MF_NOBRANCH: script_pushint(st,maplist[m].flag.nobranch); break;
- case MF_NOPENALTY: script_pushint(st,maplist[m].flag.noexppenalty); break;
- case MF_NOZENYPENALTY: script_pushint(st,maplist[m].flag.nozenypenalty); break;
- case MF_PVP: script_pushint(st,maplist[m].flag.pvp); break;
- case MF_PVP_NOPARTY: script_pushint(st,maplist[m].flag.pvp_noparty); break;
- case MF_PVP_NOGUILD: script_pushint(st,maplist[m].flag.pvp_noguild); break;
- case MF_GVG: script_pushint(st,maplist[m].flag.gvg); break;
- case MF_GVG_NOPARTY: script_pushint(st,maplist[m].flag.gvg_noparty); break;
- case MF_NOTRADE: script_pushint(st,maplist[m].flag.notrade); break;
- case MF_NOSKILL: script_pushint(st,maplist[m].flag.noskill); break;
- case MF_NOWARP: script_pushint(st,maplist[m].flag.nowarp); break;
- case MF_PARTYLOCK: script_pushint(st,maplist[m].flag.partylock); break;
- case MF_NOICEWALL: script_pushint(st,maplist[m].flag.noicewall); break;
- case MF_SNOW: script_pushint(st,maplist[m].flag.snow); break;
- case MF_FOG: script_pushint(st,maplist[m].flag.fog); break;
- case MF_SAKURA: script_pushint(st,maplist[m].flag.sakura); break;
- case MF_LEAVES: script_pushint(st,maplist[m].flag.leaves); break;
- case MF_CLOUDS: script_pushint(st,maplist[m].flag.clouds); break;
- case MF_CLOUDS2: script_pushint(st,maplist[m].flag.clouds2); break;
- case MF_FIREWORKS: script_pushint(st,maplist[m].flag.fireworks); break;
- case MF_GVG_CASTLE: script_pushint(st,maplist[m].flag.gvg_castle); break;
- case MF_GVG_DUNGEON: script_pushint(st,maplist[m].flag.gvg_dungeon); break;
- case MF_NIGHTENABLED: script_pushint(st,maplist[m].flag.nightenabled); break;
- case MF_NOBASEEXP: script_pushint(st,maplist[m].flag.nobaseexp); break;
- case MF_NOJOBEXP: script_pushint(st,maplist[m].flag.nojobexp); break;
- case MF_NOMOBLOOT: script_pushint(st,maplist[m].flag.nomobloot); break;
- case MF_NOMVPLOOT: script_pushint(st,maplist[m].flag.nomvploot); break;
- case MF_NORETURN: script_pushint(st,maplist[m].flag.noreturn); break;
- case MF_NOWARPTO: script_pushint(st,maplist[m].flag.nowarpto); break;
- case MF_NIGHTMAREDROP: script_pushint(st,maplist[m].flag.pvp_nightmaredrop); break;
- case MF_NOCOMMAND: script_pushint(st,maplist[m].nocommand); break;
- case MF_NODROP: script_pushint(st,maplist[m].flag.nodrop); break;
- case MF_JEXP: script_pushint(st,maplist[m].jexp); break;
- case MF_BEXP: script_pushint(st,maplist[m].bexp); break;
- case MF_NOVENDING: script_pushint(st,maplist[m].flag.novending); break;
- case MF_LOADEVENT: script_pushint(st,maplist[m].flag.loadevent); break;
- case MF_NOCHAT: script_pushint(st,maplist[m].flag.nochat); break;
- case MF_NOEXPPENALTY: script_pushint(st,maplist[m].flag.noexppenalty ); break;
- case MF_GUILDLOCK: script_pushint(st,maplist[m].flag.guildlock); break;
- case MF_TOWN: script_pushint(st,maplist[m].flag.town); break;
- case MF_AUTOTRADE: script_pushint(st,maplist[m].flag.autotrade); break;
- case MF_ALLOWKS: script_pushint(st,maplist[m].flag.allowks); break;
- case MF_MONSTER_NOTELEPORT: script_pushint(st,maplist[m].flag.monster_noteleport); break;
- case MF_PVP_NOCALCRANK: script_pushint(st,maplist[m].flag.pvp_nocalcrank); break;
- case MF_BATTLEGROUND: script_pushint(st,maplist[m].flag.battleground); break;
- case MF_RESET: script_pushint(st,maplist[m].flag.reset); break;
- case MF_NOTOMB: script_pushint(st,maplist[m].flag.notomb); break;
+ case MF_NOMEMO: script_pushint(st,map->list[m].flag.nomemo); break;
+ case MF_NOTELEPORT: script_pushint(st,map->list[m].flag.noteleport); break;
+ case MF_NOSAVE: script_pushint(st,map->list[m].flag.nosave); break;
+ case MF_NOBRANCH: script_pushint(st,map->list[m].flag.nobranch); break;
+ case MF_NOPENALTY: script_pushint(st,map->list[m].flag.noexppenalty); break;
+ case MF_NOZENYPENALTY: script_pushint(st,map->list[m].flag.nozenypenalty); break;
+ case MF_PVP: script_pushint(st,map->list[m].flag.pvp); break;
+ case MF_PVP_NOPARTY: script_pushint(st,map->list[m].flag.pvp_noparty); break;
+ case MF_PVP_NOGUILD: script_pushint(st,map->list[m].flag.pvp_noguild); break;
+ case MF_GVG: script_pushint(st,map->list[m].flag.gvg); break;
+ case MF_GVG_NOPARTY: script_pushint(st,map->list[m].flag.gvg_noparty); break;
+ case MF_NOTRADE: script_pushint(st,map->list[m].flag.notrade); break;
+ case MF_NOSKILL: script_pushint(st,map->list[m].flag.noskill); break;
+ case MF_NOWARP: script_pushint(st,map->list[m].flag.nowarp); break;
+ case MF_PARTYLOCK: script_pushint(st,map->list[m].flag.partylock); break;
+ case MF_NOICEWALL: script_pushint(st,map->list[m].flag.noicewall); break;
+ case MF_SNOW: script_pushint(st,map->list[m].flag.snow); break;
+ case MF_FOG: script_pushint(st,map->list[m].flag.fog); break;
+ case MF_SAKURA: script_pushint(st,map->list[m].flag.sakura); break;
+ case MF_LEAVES: script_pushint(st,map->list[m].flag.leaves); break;
+ case MF_CLOUDS: script_pushint(st,map->list[m].flag.clouds); break;
+ case MF_CLOUDS2: script_pushint(st,map->list[m].flag.clouds2); break;
+ case MF_FIREWORKS: script_pushint(st,map->list[m].flag.fireworks); break;
+ case MF_GVG_CASTLE: script_pushint(st,map->list[m].flag.gvg_castle); break;
+ case MF_GVG_DUNGEON: script_pushint(st,map->list[m].flag.gvg_dungeon); break;
+ case MF_NIGHTENABLED: script_pushint(st,map->list[m].flag.nightenabled); break;
+ case MF_NOBASEEXP: script_pushint(st,map->list[m].flag.nobaseexp); break;
+ case MF_NOJOBEXP: script_pushint(st,map->list[m].flag.nojobexp); break;
+ case MF_NOMOBLOOT: script_pushint(st,map->list[m].flag.nomobloot); break;
+ case MF_NOMVPLOOT: script_pushint(st,map->list[m].flag.nomvploot); break;
+ case MF_NORETURN: script_pushint(st,map->list[m].flag.noreturn); break;
+ case MF_NOWARPTO: script_pushint(st,map->list[m].flag.nowarpto); break;
+ case MF_NIGHTMAREDROP: script_pushint(st,map->list[m].flag.pvp_nightmaredrop); break;
+ case MF_NOCOMMAND: script_pushint(st,map->list[m].nocommand); break;
+ case MF_NODROP: script_pushint(st,map->list[m].flag.nodrop); break;
+ case MF_JEXP: script_pushint(st,map->list[m].jexp); break;
+ case MF_BEXP: script_pushint(st,map->list[m].bexp); break;
+ case MF_NOVENDING: script_pushint(st,map->list[m].flag.novending); break;
+ case MF_LOADEVENT: script_pushint(st,map->list[m].flag.loadevent); break;
+ case MF_NOCHAT: script_pushint(st,map->list[m].flag.nochat); break;
+ case MF_NOEXPPENALTY: script_pushint(st,map->list[m].flag.noexppenalty ); break;
+ case MF_GUILDLOCK: script_pushint(st,map->list[m].flag.guildlock); break;
+ case MF_TOWN: script_pushint(st,map->list[m].flag.town); break;
+ case MF_AUTOTRADE: script_pushint(st,map->list[m].flag.autotrade); break;
+ case MF_ALLOWKS: script_pushint(st,map->list[m].flag.allowks); break;
+ case MF_MONSTER_NOTELEPORT: script_pushint(st,map->list[m].flag.monster_noteleport); break;
+ case MF_PVP_NOCALCRANK: script_pushint(st,map->list[m].flag.pvp_nocalcrank); break;
+ case MF_BATTLEGROUND: script_pushint(st,map->list[m].flag.battleground); break;
+ case MF_RESET: script_pushint(st,map->list[m].flag.reset); break;
+ case MF_NOTOMB: script_pushint(st,map->list[m].flag.notomb); break;
}
}
return true;
}
/* pvp timer handling */
-static int script_mapflag_pvp_sub(struct block_list *bl,va_list ap) {
+int script_mapflag_pvp_sub(struct block_list *bl,va_list ap) {
TBL_PC* sd = (TBL_PC*)bl;
if (sd->pvp_timer == INVALID_TIMER) {
sd->pvp_timer = timer->add(timer->gettick() + 200, pc->calc_pvprank_timer, sd->bl.id, 0);
@@ -10353,77 +10200,77 @@ BUILDIN(setmapflag) {
if(m >= 0) {
switch(i) {
- case MF_NOMEMO: maplist[m].flag.nomemo = 1; break;
- case MF_NOTELEPORT: maplist[m].flag.noteleport = 1; break;
- case MF_NOSAVE: maplist[m].flag.nosave = 1; break;
- case MF_NOBRANCH: maplist[m].flag.nobranch = 1; break;
- case MF_NOPENALTY: maplist[m].flag.noexppenalty = 1; maplist[m].flag.nozenypenalty = 1; break;
- case MF_NOZENYPENALTY: maplist[m].flag.nozenypenalty = 1; break;
+ case MF_NOMEMO: map->list[m].flag.nomemo = 1; break;
+ case MF_NOTELEPORT: map->list[m].flag.noteleport = 1; break;
+ case MF_NOSAVE: map->list[m].flag.nosave = 1; break;
+ case MF_NOBRANCH: map->list[m].flag.nobranch = 1; break;
+ case MF_NOPENALTY: map->list[m].flag.noexppenalty = 1; map->list[m].flag.nozenypenalty = 1; break;
+ case MF_NOZENYPENALTY: map->list[m].flag.nozenypenalty = 1; break;
case MF_PVP:
- maplist[m].flag.pvp = 1;
+ map->list[m].flag.pvp = 1;
if( !battle_config.pk_mode ) {
- map->foreachinmap(script_mapflag_pvp_sub,m,BL_PC);
+ map->foreachinmap(script->mapflag_pvp_sub,m,BL_PC);
}
break;
- case MF_PVP_NOPARTY: maplist[m].flag.pvp_noparty = 1; break;
- case MF_PVP_NOGUILD: maplist[m].flag.pvp_noguild = 1; break;
+ case MF_PVP_NOPARTY: map->list[m].flag.pvp_noparty = 1; break;
+ case MF_PVP_NOGUILD: map->list[m].flag.pvp_noguild = 1; break;
case MF_GVG: {
struct block_list bl;
- maplist[m].flag.gvg = 1;
+ map->list[m].flag.gvg = 1;
clif->map_property_mapall(m, MAPPROPERTY_AGITZONE);
bl.type = BL_NUL;
bl.m = m;
clif->maptypeproperty2(&bl,ALL_SAMEMAP);
}
break;
- case MF_GVG_NOPARTY: maplist[m].flag.gvg_noparty = 1; break;
- case MF_NOTRADE: maplist[m].flag.notrade = 1; break;
- case MF_NOSKILL: maplist[m].flag.noskill = 1; break;
- case MF_NOWARP: maplist[m].flag.nowarp = 1; break;
- case MF_PARTYLOCK: maplist[m].flag.partylock = 1; break;
- case MF_NOICEWALL: maplist[m].flag.noicewall = 1; break;
- case MF_SNOW: maplist[m].flag.snow = 1; break;
- case MF_FOG: maplist[m].flag.fog = 1; break;
- case MF_SAKURA: maplist[m].flag.sakura = 1; break;
- case MF_LEAVES: maplist[m].flag.leaves = 1; break;
- case MF_CLOUDS: maplist[m].flag.clouds = 1; break;
- case MF_CLOUDS2: maplist[m].flag.clouds2 = 1; break;
- case MF_FIREWORKS: maplist[m].flag.fireworks = 1; break;
- case MF_GVG_CASTLE: maplist[m].flag.gvg_castle = 1; break;
- case MF_GVG_DUNGEON: maplist[m].flag.gvg_dungeon = 1; break;
- case MF_NIGHTENABLED: maplist[m].flag.nightenabled = 1; break;
- case MF_NOBASEEXP: maplist[m].flag.nobaseexp = 1; break;
- case MF_NOJOBEXP: maplist[m].flag.nojobexp = 1; break;
- case MF_NOMOBLOOT: maplist[m].flag.nomobloot = 1; break;
- case MF_NOMVPLOOT: maplist[m].flag.nomvploot = 1; break;
- case MF_NORETURN: maplist[m].flag.noreturn = 1; break;
- case MF_NOWARPTO: maplist[m].flag.nowarpto = 1; break;
- case MF_NIGHTMAREDROP: maplist[m].flag.pvp_nightmaredrop = 1; break;
+ case MF_GVG_NOPARTY: map->list[m].flag.gvg_noparty = 1; break;
+ case MF_NOTRADE: map->list[m].flag.notrade = 1; break;
+ case MF_NOSKILL: map->list[m].flag.noskill = 1; break;
+ case MF_NOWARP: map->list[m].flag.nowarp = 1; break;
+ case MF_PARTYLOCK: map->list[m].flag.partylock = 1; break;
+ case MF_NOICEWALL: map->list[m].flag.noicewall = 1; break;
+ case MF_SNOW: map->list[m].flag.snow = 1; break;
+ case MF_FOG: map->list[m].flag.fog = 1; break;
+ case MF_SAKURA: map->list[m].flag.sakura = 1; break;
+ case MF_LEAVES: map->list[m].flag.leaves = 1; break;
+ case MF_CLOUDS: map->list[m].flag.clouds = 1; break;
+ case MF_CLOUDS2: map->list[m].flag.clouds2 = 1; break;
+ case MF_FIREWORKS: map->list[m].flag.fireworks = 1; break;
+ case MF_GVG_CASTLE: map->list[m].flag.gvg_castle = 1; break;
+ case MF_GVG_DUNGEON: map->list[m].flag.gvg_dungeon = 1; break;
+ case MF_NIGHTENABLED: map->list[m].flag.nightenabled = 1; break;
+ case MF_NOBASEEXP: map->list[m].flag.nobaseexp = 1; break;
+ case MF_NOJOBEXP: map->list[m].flag.nojobexp = 1; break;
+ case MF_NOMOBLOOT: map->list[m].flag.nomobloot = 1; break;
+ case MF_NOMVPLOOT: map->list[m].flag.nomvploot = 1; break;
+ 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(maplist[m].name, empty, zone, params, empty, empty, empty);
+ npc->parse_mapflag(map->list[m].name, empty, zone, params, empty, empty, empty);
}
break;
- case MF_NOCOMMAND: maplist[m].nocommand = (val <= 0) ? 100 : val; break;
- case MF_NODROP: maplist[m].flag.nodrop = 1; break;
- case MF_JEXP: maplist[m].jexp = (val <= 0) ? 100 : val; break;
- case MF_BEXP: maplist[m].bexp = (val <= 0) ? 100 : val; break;
- case MF_NOVENDING: maplist[m].flag.novending = 1; break;
- case MF_LOADEVENT: maplist[m].flag.loadevent = 1; break;
- case MF_NOCHAT: maplist[m].flag.nochat = 1; break;
- case MF_NOEXPPENALTY: maplist[m].flag.noexppenalty = 1; break;
- case MF_GUILDLOCK: maplist[m].flag.guildlock = 1; break;
- case MF_TOWN: maplist[m].flag.town = 1; break;
- case MF_AUTOTRADE: maplist[m].flag.autotrade = 1; break;
- case MF_ALLOWKS: maplist[m].flag.allowks = 1; break;
- case MF_MONSTER_NOTELEPORT: maplist[m].flag.monster_noteleport = 1; break;
- case MF_PVP_NOCALCRANK: maplist[m].flag.pvp_nocalcrank = 1; break;
- case MF_BATTLEGROUND: maplist[m].flag.battleground = (val <= 0 || val > 2) ? 1 : val; break;
- case MF_RESET: maplist[m].flag.reset = 1; break;
- case MF_NOTOMB: maplist[m].flag.notomb = 1; break;
+ case MF_NOCOMMAND: map->list[m].nocommand = (val <= 0) ? 100 : val; break;
+ case MF_NODROP: map->list[m].flag.nodrop = 1; break;
+ case MF_JEXP: map->list[m].jexp = (val <= 0) ? 100 : val; break;
+ case MF_BEXP: map->list[m].bexp = (val <= 0) ? 100 : val; break;
+ case MF_NOVENDING: map->list[m].flag.novending = 1; break;
+ case MF_LOADEVENT: map->list[m].flag.loadevent = 1; break;
+ case MF_NOCHAT: map->list[m].flag.nochat = 1; break;
+ case MF_NOEXPPENALTY: map->list[m].flag.noexppenalty = 1; break;
+ case MF_GUILDLOCK: map->list[m].flag.guildlock = 1; break;
+ case MF_TOWN: map->list[m].flag.town = 1; break;
+ case MF_AUTOTRADE: map->list[m].flag.autotrade = 1; break;
+ case MF_ALLOWKS: map->list[m].flag.allowks = 1; break;
+ case MF_MONSTER_NOTELEPORT: map->list[m].flag.monster_noteleport = 1; break;
+ case MF_PVP_NOCALCRANK: map->list[m].flag.pvp_nocalcrank = 1; break;
+ case MF_BATTLEGROUND: map->list[m].flag.battleground = (val <= 0 || val > 2) ? 1 : val; break;
+ case MF_RESET: map->list[m].flag.reset = 1; break;
+ case MF_NOTOMB: map->list[m].flag.notomb = 1; break;
}
}
@@ -10440,75 +10287,75 @@ BUILDIN(removemapflag) {
m = map->mapname2mapid(str);
if(m >= 0) {
switch(i) {
- case MF_NOMEMO: maplist[m].flag.nomemo = 0; break;
- case MF_NOTELEPORT: maplist[m].flag.noteleport = 0; break;
- case MF_NOSAVE: maplist[m].flag.nosave = 0; break;
- case MF_NOBRANCH: maplist[m].flag.nobranch = 0; break;
- case MF_NOPENALTY: maplist[m].flag.noexppenalty = 0; maplist[m].flag.nozenypenalty = 0; break;
- case MF_NOZENYPENALTY: maplist[m].flag.nozenypenalty = 0; break;
+ case MF_NOMEMO: map->list[m].flag.nomemo = 0; break;
+ case MF_NOTELEPORT: map->list[m].flag.noteleport = 0; break;
+ case MF_NOSAVE: map->list[m].flag.nosave = 0; break;
+ case MF_NOBRANCH: map->list[m].flag.nobranch = 0; break;
+ case MF_NOPENALTY: map->list[m].flag.noexppenalty = 0; map->list[m].flag.nozenypenalty = 0; break;
+ case MF_NOZENYPENALTY: map->list[m].flag.nozenypenalty = 0; break;
case MF_PVP: {
struct block_list bl;
bl.type = BL_NUL;
bl.m = m;
- maplist[m].flag.pvp = 0;
+ map->list[m].flag.pvp = 0;
clif->map_property_mapall(m, MAPPROPERTY_NOTHING);
clif->maptypeproperty2(&bl,ALL_SAMEMAP);
}
break;
- case MF_PVP_NOPARTY: maplist[m].flag.pvp_noparty = 0; break;
- case MF_PVP_NOGUILD: maplist[m].flag.pvp_noguild = 0; break;
+ case MF_PVP_NOPARTY: map->list[m].flag.pvp_noparty = 0; break;
+ case MF_PVP_NOGUILD: map->list[m].flag.pvp_noguild = 0; break;
case MF_GVG: {
struct block_list bl;
bl.type = BL_NUL;
bl.m = m;
- maplist[m].flag.gvg = 0;
+ map->list[m].flag.gvg = 0;
clif->map_property_mapall(m, MAPPROPERTY_NOTHING);
clif->maptypeproperty2(&bl,ALL_SAMEMAP);
}
break;
- case MF_GVG_NOPARTY: maplist[m].flag.gvg_noparty = 0; break;
- case MF_NOTRADE: maplist[m].flag.notrade = 0; break;
- case MF_NOSKILL: maplist[m].flag.noskill = 0; break;
- case MF_NOWARP: maplist[m].flag.nowarp = 0; break;
- case MF_PARTYLOCK: maplist[m].flag.partylock = 0; break;
- case MF_NOICEWALL: maplist[m].flag.noicewall = 0; break;
- case MF_SNOW: maplist[m].flag.snow = 0; break;
- case MF_FOG: maplist[m].flag.fog = 0; break;
- case MF_SAKURA: maplist[m].flag.sakura = 0; break;
- case MF_LEAVES: maplist[m].flag.leaves = 0; break;
- case MF_CLOUDS: maplist[m].flag.clouds = 0; break;
- case MF_CLOUDS2: maplist[m].flag.clouds2 = 0; break;
- case MF_FIREWORKS: maplist[m].flag.fireworks = 0; break;
- case MF_GVG_CASTLE: maplist[m].flag.gvg_castle = 0; break;
- case MF_GVG_DUNGEON: maplist[m].flag.gvg_dungeon = 0; break;
- case MF_NIGHTENABLED: maplist[m].flag.nightenabled = 0; break;
- case MF_NOBASEEXP: maplist[m].flag.nobaseexp = 0; break;
- case MF_NOJOBEXP: maplist[m].flag.nojobexp = 0; break;
- case MF_NOMOBLOOT: maplist[m].flag.nomobloot = 0; break;
- case MF_NOMVPLOOT: maplist[m].flag.nomvploot = 0; break;
- case MF_NORETURN: maplist[m].flag.noreturn = 0; break;
- case MF_NOWARPTO: maplist[m].flag.nowarpto = 0; break;
- case MF_NIGHTMAREDROP: maplist[m].flag.pvp_nightmaredrop = 0; break;
+ case MF_GVG_NOPARTY: map->list[m].flag.gvg_noparty = 0; break;
+ case MF_NOTRADE: map->list[m].flag.notrade = 0; break;
+ case MF_NOSKILL: map->list[m].flag.noskill = 0; break;
+ case MF_NOWARP: map->list[m].flag.nowarp = 0; break;
+ case MF_PARTYLOCK: map->list[m].flag.partylock = 0; break;
+ case MF_NOICEWALL: map->list[m].flag.noicewall = 0; break;
+ case MF_SNOW: map->list[m].flag.snow = 0; break;
+ case MF_FOG: map->list[m].flag.fog = 0; break;
+ case MF_SAKURA: map->list[m].flag.sakura = 0; break;
+ case MF_LEAVES: map->list[m].flag.leaves = 0; break;
+ case MF_CLOUDS: map->list[m].flag.clouds = 0; break;
+ case MF_CLOUDS2: map->list[m].flag.clouds2 = 0; break;
+ case MF_FIREWORKS: map->list[m].flag.fireworks = 0; break;
+ case MF_GVG_CASTLE: map->list[m].flag.gvg_castle = 0; break;
+ case MF_GVG_DUNGEON: map->list[m].flag.gvg_dungeon = 0; break;
+ case MF_NIGHTENABLED: map->list[m].flag.nightenabled = 0; break;
+ case MF_NOBASEEXP: map->list[m].flag.nobaseexp = 0; break;
+ case MF_NOJOBEXP: map->list[m].flag.nojobexp = 0; break;
+ case MF_NOMOBLOOT: map->list[m].flag.nomobloot = 0; break;
+ case MF_NOMVPLOOT: map->list[m].flag.nomvploot = 0; break;
+ case MF_NORETURN: map->list[m].flag.noreturn = 0; break;
+ case MF_NOWARPTO: map->list[m].flag.nowarpto = 0; break;
+ case MF_NIGHTMAREDROP: map->list[m].flag.pvp_nightmaredrop = 0; break;
case MF_ZONE:
- map->zone_change2(m, maplist[m].prev_zone);
+ map->zone_change2(m, map->list[m].prev_zone);
break;
- case MF_NOCOMMAND: maplist[m].nocommand = 0; break;
- case MF_NODROP: maplist[m].flag.nodrop = 0; break;
- case MF_JEXP: maplist[m].jexp = 0; break;
- case MF_BEXP: maplist[m].bexp = 0; break;
- case MF_NOVENDING: maplist[m].flag.novending = 0; break;
- case MF_LOADEVENT: maplist[m].flag.loadevent = 0; break;
- case MF_NOCHAT: maplist[m].flag.nochat = 0; break;
- case MF_NOEXPPENALTY: maplist[m].flag.noexppenalty = 0; break;
- case MF_GUILDLOCK: maplist[m].flag.guildlock = 0; break;
- case MF_TOWN: maplist[m].flag.town = 0; break;
- case MF_AUTOTRADE: maplist[m].flag.autotrade = 0; break;
- case MF_ALLOWKS: maplist[m].flag.allowks = 0; break;
- case MF_MONSTER_NOTELEPORT: maplist[m].flag.monster_noteleport = 0; break;
- case MF_PVP_NOCALCRANK: maplist[m].flag.pvp_nocalcrank = 0; break;
- case MF_BATTLEGROUND: maplist[m].flag.battleground = 0; break;
- case MF_RESET: maplist[m].flag.reset = 0; break;
- case MF_NOTOMB: maplist[m].flag.notomb = 0; break;
+ case MF_NOCOMMAND: map->list[m].nocommand = 0; break;
+ case MF_NODROP: map->list[m].flag.nodrop = 0; break;
+ case MF_JEXP: map->list[m].jexp = 0; break;
+ case MF_BEXP: map->list[m].bexp = 0; break;
+ case MF_NOVENDING: map->list[m].flag.novending = 0; break;
+ case MF_LOADEVENT: map->list[m].flag.loadevent = 0; break;
+ case MF_NOCHAT: map->list[m].flag.nochat = 0; break;
+ case MF_NOEXPPENALTY: map->list[m].flag.noexppenalty = 0; break;
+ case MF_GUILDLOCK: map->list[m].flag.guildlock = 0; break;
+ case MF_TOWN: map->list[m].flag.town = 0; break;
+ case MF_AUTOTRADE: map->list[m].flag.autotrade = 0; break;
+ case MF_ALLOWKS: map->list[m].flag.allowks = 0; break;
+ case MF_MONSTER_NOTELEPORT: map->list[m].flag.monster_noteleport = 0; break;
+ case MF_PVP_NOCALCRANK: map->list[m].flag.pvp_nocalcrank = 0; break;
+ case MF_BATTLEGROUND: map->list[m].flag.battleground = 0; break;
+ case MF_RESET: map->list[m].flag.reset = 0; break;
+ case MF_NOTOMB: map->list[m].flag.notomb = 0; break;
}
}
@@ -10524,11 +10371,16 @@ BUILDIN(pvpon) {
str = script_getstr(st,2);
m = map->mapname2mapid(str);
- if( m < 0 || maplist[m].flag.pvp )
+ if( m < 0 || map->list[m].flag.pvp )
return true; // nothing to do
- map->zone_change2(m, strdb_get(zone_db, MAP_ZONE_PVP_NAME));
- maplist[m].flag.pvp = 1;
+ if( !strdb_exists(map->zone_db,MAP_ZONE_PVP_NAME) ) {
+ ShowError("buildin_pvpon: zone_db missing '%s'\n",MAP_ZONE_PVP_NAME);
+ return true;
+ }
+
+ map->zone_change2(m, strdb_get(map->zone_db, MAP_ZONE_PVP_NAME));
+ map->list[m].flag.pvp = 1;
clif->map_property_mapall(m, MAPPROPERTY_FREEPVPZONE);
bl.type = BL_NUL;
bl.m = m;
@@ -10556,7 +10408,7 @@ BUILDIN(pvpon) {
return true;
}
-static int buildin_pvpoff_sub(struct block_list *bl,va_list ap)
+int buildin_pvpoff_sub(struct block_list *bl,va_list ap)
{
TBL_PC* sd = (TBL_PC*)bl;
clif->pvpset(sd, 0, 0, 2);
@@ -10574,11 +10426,11 @@ BUILDIN(pvpoff) {
str=script_getstr(st,2);
m = map->mapname2mapid(str);
- if(m < 0 || !maplist[m].flag.pvp)
+ if(m < 0 || !map->list[m].flag.pvp)
return true; //fixed Lupus
- map->zone_change2(m, maplist[m].prev_zone);
- maplist[m].flag.pvp = 0;
+ map->zone_change2(m, map->list[m].prev_zone);
+ map->list[m].flag.pvp = 0;
clif->map_property_mapall(m, MAPPROPERTY_NOTHING);
bl.type = BL_NUL;
bl.m = m;
@@ -10587,7 +10439,7 @@ BUILDIN(pvpoff) {
if(battle_config.pk_mode) // disable ranking options if pk_mode is on [Valaris]
return true;
- map->foreachinmap(buildin_pvpoff_sub, m, BL_PC);
+ map->foreachinmap(script->buildin_pvpoff_sub, m, BL_PC);
return true;
}
@@ -10597,10 +10449,16 @@ BUILDIN(gvgon) {
str=script_getstr(st,2);
m = map->mapname2mapid(str);
- if(m >= 0 && !maplist[m].flag.gvg) {
+ if(m >= 0 && !map->list[m].flag.gvg) {
struct block_list bl;
- map->zone_change2(m, strdb_get(zone_db, MAP_ZONE_GVG_NAME));
- maplist[m].flag.gvg = 1;
+
+ if( !strdb_exists(map->zone_db,MAP_ZONE_GVG_NAME) ) {
+ ShowError("buildin_gvgon: zone_db missing '%s'\n",MAP_ZONE_GVG_NAME);
+ return true;
+ }
+
+ map->zone_change2(m, strdb_get(map->zone_db, MAP_ZONE_GVG_NAME));
+ map->list[m].flag.gvg = 1;
clif->map_property_mapall(m, MAPPROPERTY_AGITZONE);
bl.type = BL_NUL;
bl.m = m;
@@ -10615,10 +10473,10 @@ BUILDIN(gvgoff) {
str=script_getstr(st,2);
m = map->mapname2mapid(str);
- if(m >= 0 && maplist[m].flag.gvg) {
+ if(m >= 0 && map->list[m].flag.gvg) {
struct block_list bl;
- map->zone_change2(m, maplist[m].prev_zone);
- maplist[m].flag.gvg = 0;
+ map->zone_change2(m, map->list[m].prev_zone);
+ map->list[m].flag.gvg = 0;
clif->map_property_mapall(m, MAPPROPERTY_NOTHING);
bl.type = BL_NUL;
bl.m = m;
@@ -10648,7 +10506,7 @@ BUILDIN(emotion) {
if( script_hasdata(st,4) )
sd = map->nick2sd(script_getstr(st,4));
else
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (sd)
clif->emotion(&sd->bl,type);
} else if( script_hasdata(st,4) ) {
@@ -10660,7 +10518,7 @@ BUILDIN(emotion) {
return true;
}
-static int buildin_maprespawnguildid_sub_pc(struct map_session_data* sd, va_list ap)
+int buildin_maprespawnguildid_sub_pc(struct map_session_data* sd, va_list ap)
{
int16 m=va_arg(ap,int);
int g_id=va_arg(ap,int);
@@ -10677,7 +10535,7 @@ static int buildin_maprespawnguildid_sub_pc(struct map_session_data* sd, va_list
return 1;
}
-static int buildin_maprespawnguildid_sub_mob(struct block_list *bl,va_list ap)
+int buildin_maprespawnguildid_sub_mob(struct block_list *bl,va_list ap)
{
struct mob_data *md=(struct mob_data *)bl;
@@ -10698,9 +10556,9 @@ BUILDIN(maprespawnguildid) {
return true;
//Catch ALL players (in case some are 'between maps' on execution time)
- map->map_foreachpc(buildin_maprespawnguildid_sub_pc,m,g_id,flag);
+ map->foreachpc(script->buildin_maprespawnguildid_sub_pc,m,g_id,flag);
if (flag&4) //Remove script mobs.
- map->foreachinmap(buildin_maprespawnguildid_sub_mob,m,BL_MOB);
+ map->foreachinmap(script->buildin_maprespawnguildid_sub_mob,m,BL_MOB);
return true;
}
@@ -10857,7 +10715,7 @@ BUILDIN(requestguildinfo)
if( script_hasdata(st,3) ){
event=script_getstr(st,3);
- check_event(st, event);
+ script->check_event(st, event);
}
if(guild_id>0)
@@ -10874,9 +10732,9 @@ BUILDIN(getequipcardcnt)
int count;
num=script_getnum(st,2);
- sd=script_rid2sd(st);
- if (num > 0 && num <= ARRAYLENGTH(equip))
- i=pc->checkequip(sd,equip[num-1]);
+ sd=script->rid2sd(st);
+ if (num > 0 && num <= ARRAYLENGTH(script->equip))
+ i=pc->checkequip(sd,script->equip[num-1]);
if (i < 0 || !sd->inventory_data[i]) {
script_pushint(st,0);
@@ -10904,11 +10762,11 @@ BUILDIN(getequipcardcnt)
BUILDIN(successremovecards) {
int i=-1,j,c,cardflag=0;
- TBL_PC* sd = script_rid2sd(st);
+ TBL_PC* sd = script->rid2sd(st);
int num = script_getnum(st,2);
- if (num > 0 && num <= ARRAYLENGTH(equip))
- i=pc->checkequip(sd,equip[num-1]);
+ if (num > 0 && num <= ARRAYLENGTH(script->equip))
+ i=pc->checkequip(sd,script->equip[num-1]);
if (i < 0 || !sd->inventory_data[i]) {
return true;
@@ -10967,12 +10825,12 @@ BUILDIN(successremovecards) {
BUILDIN(failedremovecards) {
int i=-1,j,c,cardflag=0;
- TBL_PC* sd = script_rid2sd(st);
+ TBL_PC* sd = script->rid2sd(st);
int num = script_getnum(st,2);
int typefail = script_getnum(st,3);
- if (num > 0 && num <= ARRAYLENGTH(equip))
- i=pc->checkequip(sd,equip[num-1]);
+ if (num > 0 && num <= ARRAYLENGTH(script->equip))
+ i=pc->checkequip(sd,script->equip[num-1]);
if (i < 0 || !sd->inventory_data[i])
return true;
@@ -11084,14 +10942,14 @@ BUILDIN(mapwarp) {
}
break;
default:
- map->foreachinmap(buildin_areawarp_sub,m,BL_PC,index,x,y,0,0);
+ map->foreachinmap(script->buildin_areawarp_sub,m,BL_PC,index,x,y,0,0);
break;
}
return true;
}
-static int buildin_mobcount_sub(struct block_list *bl,va_list ap) // Added by RoVeRT
+int buildin_mobcount_sub(struct block_list *bl,va_list ap) // Added by RoVeRT
{
char *event=va_arg(ap,char *);
struct mob_data *md = ((struct mob_data *)bl);
@@ -11110,10 +10968,10 @@ BUILDIN(mobcount) {
if( strcmp(event, "all") == 0 )
event = NULL;
else
- check_event(st, event);
+ script->check_event(st, event);
if( strcmp(mapname, "this") == 0 ) {
- struct map_session_data *sd = script_rid2sd(st);
+ struct map_session_data *sd = script->rid2sd(st);
if( sd )
m = sd->bl.m;
else {
@@ -11125,19 +10983,19 @@ BUILDIN(mobcount) {
return true;
}
- if( maplist[m].flag.src4instance && maplist[m].instance_id == -1 && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 ) {
+ if( map->list[m].flag.src4instance && map->list[m].instance_id == -1 && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 ) {
script_pushint(st,-1);
return true;
}
- script_pushint(st,map->foreachinmap(buildin_mobcount_sub, m, BL_MOB, event));
+ script_pushint(st,map->foreachinmap(script->buildin_mobcount_sub, m, BL_MOB, event));
return true;
}
BUILDIN(marriage) {
const char *partner=script_getstr(st,2);
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
TBL_PC *p_sd=map->nick2sd(partner);
if(sd==NULL || p_sd==NULL || pc->marriage(sd,p_sd) < 0){
@@ -11148,7 +11006,7 @@ BUILDIN(marriage) {
return true;
}
BUILDIN(wedding_effect) {
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
struct block_list *bl;
if(sd==NULL) {
@@ -11160,7 +11018,7 @@ BUILDIN(wedding_effect) {
}
BUILDIN(divorce)
{
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if(sd==NULL || pc->divorce(sd) < 0){
script_pushint(st,0);
return true;
@@ -11170,7 +11028,7 @@ BUILDIN(divorce)
}
BUILDIN(ispartneron) {
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if(sd==NULL || !pc->ismarried(sd) ||
map->charid2sd(sd->status.partner_id) == NULL) {
@@ -11184,7 +11042,7 @@ BUILDIN(ispartneron) {
BUILDIN(getpartnerid)
{
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if (sd == NULL) {
script_pushint(st,0);
return true;
@@ -11196,7 +11054,7 @@ BUILDIN(getpartnerid)
BUILDIN(getchildid)
{
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if (sd == NULL) {
script_pushint(st,0);
return true;
@@ -11208,7 +11066,7 @@ BUILDIN(getchildid)
BUILDIN(getmotherid)
{
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if (sd == NULL) {
script_pushint(st,0);
return true;
@@ -11220,7 +11078,7 @@ BUILDIN(getmotherid)
BUILDIN(getfatherid)
{
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if (sd == NULL) {
script_pushint(st,0);
return true;
@@ -11235,7 +11093,7 @@ BUILDIN(warppartner)
int x,y;
unsigned short mapindex;
const char *str;
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
TBL_PC *p_sd=NULL;
if(sd==NULL || !pc->ismarried(sd) ||
@@ -11323,12 +11181,12 @@ BUILDIN(guardian) {
has_index = true;
} else {
ShowError("script:guardian: invalid data type for argument #6 (from 1)\n");
- script_reportdata(data);
+ script->reportdata(data);
return false;
}
}
- check_event(st, evt);
+ script->check_event(st, evt);
script_pushint(st, mob->spawn_guardian(mapname,x,y,str,class_,evt,guardian,has_index));
return true;
@@ -11554,9 +11412,9 @@ BUILDIN(getequipcardid)
num=script_getnum(st,2);
slot=script_getnum(st,3);
- sd=script_rid2sd(st);
- if (num > 0 && num <= ARRAYLENGTH(equip))
- i=pc->checkequip(sd,equip[num-1]);
+ sd=script->rid2sd(st);
+ if (num > 0 && num <= ARRAYLENGTH(script->equip))
+ i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0 && slot>=0 && slot<4)
script_pushint(st,sd->status.inventory[i].card[slot]);
else
@@ -11572,7 +11430,7 @@ BUILDIN(petskillbonus)
{
struct pet_data *pd;
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if(sd==NULL || sd->pd==NULL)
return true;
@@ -11609,7 +11467,7 @@ BUILDIN(petloot)
{
int max;
struct pet_data *pd;
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if(sd==NULL || sd->pd==NULL)
return true;
@@ -11647,7 +11505,7 @@ BUILDIN(petloot)
*------------------------------------------*/
BUILDIN(getinventorylist)
{
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
char card_var[NAME_LENGTH];
int i,j=0,k;
@@ -11675,7 +11533,7 @@ BUILDIN(getinventorylist)
BUILDIN(getskilllist)
{
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
int i,j=0;
if(!sd) return true;
for(i=0;i<MAX_SKILL;i++){
@@ -11692,7 +11550,7 @@ BUILDIN(getskilllist)
BUILDIN(clearitem)
{
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
int i;
if(sd==NULL) return true;
for (i=0; i<MAX_INVENTORY; i++) {
@@ -11709,7 +11567,7 @@ BUILDIN(clearitem)
BUILDIN(disguise)
{
int id;
- TBL_PC* sd = script_rid2sd(st);
+ TBL_PC* sd = script->rid2sd(st);
if (sd == NULL) return true;
id = script_getnum(st,2);
@@ -11728,7 +11586,7 @@ BUILDIN(disguise)
*------------------------------------------*/
BUILDIN(undisguise)
{
- TBL_PC* sd = script_rid2sd(st);
+ TBL_PC* sd = script->rid2sd(st);
if (sd == NULL) return true;
if (sd->disguise != -1) {
@@ -11769,7 +11627,7 @@ BUILDIN(misceffect)
if (bl)
clif->specialeffect(bl,type,AREA);
} else{
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if(sd)
clif->specialeffect(&sd->bl,type,AREA);
}
@@ -11783,7 +11641,7 @@ BUILDIN(playBGM)
const char* name;
struct map_session_data* sd;
- if( ( sd = script_rid2sd(st) ) != NULL )
+ if( ( sd = script->rid2sd(st) ) != NULL )
{
name = script_getstr(st,2);
@@ -11793,7 +11651,7 @@ BUILDIN(playBGM)
return true;
}
-static int playBGM_sub(struct block_list* bl,va_list ap)
+int playBGM_sub(struct block_list* bl,va_list ap)
{
const char* name = va_arg(ap,const char*);
@@ -11802,7 +11660,7 @@ static int playBGM_sub(struct block_list* bl,va_list ap)
return 0;
}
-static int playBGM_foreachpc_sub(struct map_session_data* sd, va_list args)
+int playBGM_foreachpc_sub(struct map_session_data* sd, va_list args)
{
const char* name = va_arg(args, const char*);
@@ -11832,7 +11690,7 @@ BUILDIN(playBGMall) {
return true;
}
- map->foreachinarea(playBGM_sub, m, x0, y0, x1, y1, BL_PC, name);
+ map->foreachinarea(script->playBGM_sub, m, x0, y0, x1, y1, BL_PC, name);
} else if( script_hasdata(st,3) ) {
// entire map
const char* mapname = script_getstr(st,3);
@@ -11843,10 +11701,10 @@ BUILDIN(playBGMall) {
return true;
}
- map->foreachinmap(playBGM_sub, m, BL_PC, name);
+ map->foreachinmap(script->playBGM_sub, m, BL_PC, name);
} else {
// entire server
- map->map_foreachpc(&playBGM_foreachpc_sub, name);
+ map->foreachpc(script->playBGM_foreachpc_sub, name);
}
return true;
@@ -11857,7 +11715,7 @@ BUILDIN(playBGMall) {
*------------------------------------------*/
BUILDIN(soundeffect)
{
- TBL_PC* sd = script_rid2sd(st);
+ TBL_PC* sd = script->rid2sd(st);
const char* name = script_getstr(st,2);
int type = script_getnum(st,3);
@@ -11887,7 +11745,7 @@ BUILDIN(soundeffectall) {
const char* name;
int type;
- bl = (st->rid) ? &(script_rid2sd(st)->bl) : map->id2bl(st->oid);
+ bl = (st->rid) ? &(script->rid2sd(st)->bl) : map->id2bl(st->oid);
if (!bl)
return true;
@@ -11908,7 +11766,7 @@ BUILDIN(soundeffectall) {
return true;
}
- map->foreachinmap(soundeffect_sub, m, BL_PC, name, type);
+ map->foreachinmap(script->soundeffect_sub, m, BL_PC, name, type);
} else if(script_hasdata(st,8)) { // specified part of map
const char *mapname = script_getstr(st,4);
int x0 = script_getnum(st,5);
@@ -11922,7 +11780,7 @@ BUILDIN(soundeffectall) {
return true;
}
- map->foreachinarea(soundeffect_sub, m, x0, y0, x1, y1, BL_PC, name, type);
+ map->foreachinarea(script->soundeffect_sub, m, x0, y0, x1, y1, BL_PC, name, type);
} else {
ShowError("buildin_soundeffectall: insufficient arguments for specific area broadcast.\n");
}
@@ -11936,7 +11794,7 @@ BUILDIN(soundeffectall) {
BUILDIN(petrecovery)
{
struct pet_data *pd;
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if(sd==NULL || sd->pd==NULL)
return true;
@@ -11963,7 +11821,7 @@ BUILDIN(petrecovery)
BUILDIN(petheal)
{
struct pet_data *pd;
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if(sd==NULL || sd->pd==NULL)
return true;
@@ -12005,7 +11863,7 @@ BUILDIN(petheal)
BUILDIN(petskillattack)
{
struct pet_data *pd;
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if(sd==NULL || sd->pd==NULL)
return true;
@@ -12031,7 +11889,7 @@ BUILDIN(petskillattack)
BUILDIN(petskillattack2)
{
struct pet_data *pd;
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if(sd==NULL || sd->pd==NULL)
return true;
@@ -12057,7 +11915,7 @@ BUILDIN(petskillattack2)
BUILDIN(petskillsupport)
{
struct pet_data *pd;
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if(sd==NULL || sd->pd==NULL)
return true;
@@ -12101,7 +11959,7 @@ BUILDIN(skilleffect)
uint16 skill_id=( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
uint16 skill_lv=script_getnum(st,3);
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
clif->skill_nodamage(&sd->bl,&sd->bl,skill_id,skill_lv,1);
@@ -12147,7 +12005,7 @@ BUILDIN(specialeffect) {
else
{
if (target == SELF) {
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if (sd)
clif->specialeffect_single(bl,type,sd->fd);
} else {
@@ -12159,7 +12017,7 @@ BUILDIN(specialeffect) {
}
BUILDIN(specialeffect2) {
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
int type = script_getnum(st,2);
enum send_target target = script_hasdata(st,3) ? (send_target)script_getnum(st,3) : AREA;
@@ -12177,7 +12035,7 @@ BUILDIN(specialeffect2) {
*------------------------------------------*/
BUILDIN(nude)
{
- TBL_PC *sd = script_rid2sd(st);
+ TBL_PC *sd = script->rid2sd(st);
int i, calcflag = 0;
if( sd == NULL )
@@ -12209,7 +12067,7 @@ BUILDIN(atcommand) {
cmd = script_getstr(st,2);
if (st->rid) {
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
fd = sd->fd;
} else { //Use a dummy character.
sd = dummy_sd = pc->get_dummy_sd();
@@ -12225,7 +12083,7 @@ BUILDIN(atcommand) {
if (!atcommand->parse(fd, sd, cmd, 0)) {
ShowWarning("script: buildin_atcommand: failed to execute command '%s'\n", cmd);
- script_reportsrc(st);
+ script->reportsrc(st);
ret = false;
}
if (dummy_sd) aFree(dummy_sd);
@@ -12237,7 +12095,7 @@ BUILDIN(atcommand) {
*------------------------------------------*/
BUILDIN(dispbottom)
{
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
const char *message;
message=script_getstr(st,2);
if(sd)
@@ -12273,7 +12131,7 @@ BUILDIN(recovery)
*------------------------------------------*/
BUILDIN(getpetinfo)
{
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
TBL_PET *pd;
int type=script_getnum(st,2);
@@ -12307,7 +12165,7 @@ BUILDIN(getpetinfo)
*------------------------------------------*/
BUILDIN(gethominfo)
{
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
TBL_HOM *hd;
int type=script_getnum(st,2);
@@ -12354,7 +12212,7 @@ BUILDIN(getmercinfo) {
return false;
}
} else {
- if( ( sd = script_rid2sd(st) ) == NULL ) {
+ if( ( sd = script->rid2sd(st) ) == NULL ) {
script_pushnil(st);
return true;
}
@@ -12393,7 +12251,7 @@ BUILDIN(getmercinfo) {
*------------------------------------------*/
BUILDIN(checkequipedcard)
{
- TBL_PC *sd=script_rid2sd(st);
+ TBL_PC *sd=script->rid2sd(st);
if(sd){
int n,i,c=0;
@@ -12550,7 +12408,7 @@ BUILDIN(getlook)
{
int type,val;
TBL_PC *sd;
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
type=script_getnum(st,2);
val=-1;
@@ -12579,7 +12437,7 @@ BUILDIN(getsavepoint)
TBL_PC* sd;
int type;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (sd == NULL) {
script_pushint(st,0);
return true;
@@ -12656,7 +12514,7 @@ BUILDIN(getmapxy)
if( script_hasdata(st,6) )
sd=map->nick2sd(script_getstr(st,6));
else
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if (sd)
bl = &sd->bl;
@@ -12675,7 +12533,7 @@ BUILDIN(getmapxy)
if(script_hasdata(st,6))
sd=map->nick2sd(script_getstr(st,6));
else
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if (sd && sd->pd)
bl = &sd->pd->bl;
@@ -12686,7 +12544,7 @@ BUILDIN(getmapxy)
if(script_hasdata(st,6))
sd=map->nick2sd(script_getstr(st,6));
else
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if (sd && sd->hd)
bl = &sd->hd->bl;
@@ -12695,7 +12553,7 @@ BUILDIN(getmapxy)
if(script_hasdata(st,6))
sd=map->nick2sd(script_getstr(st,6));
else
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if (sd && sd->md)
bl = &sd->md->bl;
@@ -12704,7 +12562,7 @@ BUILDIN(getmapxy)
if(script_hasdata(st,6))
sd=map->nick2sd(script_getstr(st,6));
else
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if (sd && sd->ed)
bl = &sd->ed->bl;
@@ -12721,7 +12579,7 @@ BUILDIN(getmapxy)
x= bl->x;
y= bl->y;
- safestrncpy(mapname, maplist[bl->m].name, MAP_NAME_LENGTH);
+ safestrncpy(mapname, map->list[bl->m].name, MAP_NAME_LENGTH);
//Set MapName$
num=st->stack->stack_data[st->start+2].u.num;
@@ -12729,10 +12587,10 @@ BUILDIN(getmapxy)
prefix=*name;
if(not_server_variable(prefix))
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
else
sd=NULL;
- set_reg(st,sd,num,name,(void*)mapname,script_getref(st,2));
+ script->set_reg(st,sd,num,name,(void*)mapname,script_getref(st,2));
//Set MapX
num=st->stack->stack_data[st->start+3].u.num;
@@ -12740,10 +12598,10 @@ BUILDIN(getmapxy)
prefix=*name;
if(not_server_variable(prefix))
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
else
sd=NULL;
- set_reg(st,sd,num,name,(void*)__64BPTRSIZE(x),script_getref(st,3));
+ script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(x),script_getref(st,3));
//Set MapY
num=st->stack->stack_data[st->start+4].u.num;
@@ -12751,10 +12609,10 @@ BUILDIN(getmapxy)
prefix=*name;
if(not_server_variable(prefix))
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
else
sd=NULL;
- set_reg(st,sd,num,name,(void*)__64BPTRSIZE(y),script_getref(st,4));
+ script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(y),script_getref(st,4));
//Return Success value
script_pushint(st,0);
@@ -12769,7 +12627,7 @@ BUILDIN(logmes)
const char *str;
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return false;
@@ -12786,7 +12644,7 @@ BUILDIN(summon)
struct mob_data *md;
int tick = timer->gettick();
- sd=script_rid2sd(st);
+ sd=script->rid2sd(st);
if (!sd) return true;
str =script_getstr(st,2);
@@ -12795,7 +12653,7 @@ BUILDIN(summon)
timeout=script_getnum(st,4);
if( script_hasdata(st,5) ){
event=script_getstr(st,5);
- check_event(st, event);
+ script->check_event(st, event);
}
clif->skill_poseffect(&sd->bl,AM_CALLHOMUN,1,sd->bl.x,sd->bl.y,tick);
@@ -12837,14 +12695,14 @@ BUILDIN(isequippedcnt)
int i, j, k, id = 1;
int ret = 0;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (!sd) { //If the player is not attached it is a script error anyway... but better prevent the map server from crashing...
script_pushint(st,0);
return true;
}
for (i=0; id!=0; i++) {
- FETCH (i+2, id) else id = 0;
+ script_fetch(st,i+2, id) else id = 0;
if (id <= 0)
continue;
@@ -12892,7 +12750,7 @@ BUILDIN(isequipped)
//Original hash to reverse it when full check fails.
unsigned int setitem_hash = 0, setitem_hash2 = 0;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (!sd) { //If the player is not attached it is a script error anyway... but better prevent the map server from crashing...
script_pushint(st,0);
@@ -12902,7 +12760,7 @@ BUILDIN(isequipped)
setitem_hash = sd->bonus.setitem_hash;
setitem_hash2 = sd->bonus.setitem_hash2;
for (i=0; id!=0; i++) {
- FETCH (i+2, id) else id = 0;
+ script_fetch(st,i+2, id) else id = 0;
if (id <= 0)
continue;
flag = 0;
@@ -12973,10 +12831,10 @@ BUILDIN(cardscnt) {
int ret = 0;
int index;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
for (i=0; id!=0; i++) {
- FETCH (i+2, id) else id = 0;
+ script_fetch(st,i+2, id) else id = 0;
if (id <= 0)
continue;
@@ -13009,7 +12867,7 @@ BUILDIN(cardscnt) {
*-------------------------------------------------------*/
BUILDIN(getrefine) {
TBL_PC *sd;
- if ((sd = script_rid2sd(st))!= NULL)
+ if ((sd = script->rid2sd(st))!= NULL)
script_pushint(st,sd->status.inventory[status->current_equip_item_index].refine);
else
script_pushint(st,0);
@@ -13038,10 +12896,10 @@ BUILDIN(unequip)
TBL_PC *sd;
num = script_getnum(st,2);
- sd = script_rid2sd(st);
- if( sd != NULL && num >= 1 && num <= ARRAYLENGTH(equip) )
+ sd = script->rid2sd(st);
+ if( sd != NULL && num >= 1 && num <= ARRAYLENGTH(script->equip) )
{
- i = pc->checkequip(sd,equip[num-1]);
+ i = pc->checkequip(sd,script->equip[num-1]);
if (i >= 0)
pc->unequipitem(sd,i,1|2);
}
@@ -13054,7 +12912,7 @@ BUILDIN(equip)
TBL_PC *sd;
struct item_data *item_data;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
nameid=script_getnum(st,2);
if((item_data = itemdb->exists(nameid)) == NULL)
@@ -13343,7 +13201,7 @@ BUILDIN(explode)
if( !data_isreference(data) )
{
ShowError("script:explode: not a variable\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// not a variable
}
@@ -13355,7 +13213,7 @@ BUILDIN(explode)
if( not_array_variable(*name) )
{
ShowError("script:explode: illegal scope\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// not supported
}
@@ -13363,14 +13221,14 @@ BUILDIN(explode)
if( !is_string_variable(name) )
{
ShowError("script:explode: not string array\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// data type mismatch
}
if( not_server_variable(*name) )
{
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached
}
@@ -13378,7 +13236,7 @@ BUILDIN(explode)
while(str[i] != '\0') {
if(str[i] == delimiter && start < SCRIPT_MAX_ARRAYSIZE-1) { //break at delimiter but ignore after reaching last array index
temp[j] = '\0';
- set_reg(st, sd, reference_uid(id, start++), name, (void*)temp, reference_getref(data));
+ script->set_reg(st, sd, reference_uid(id, start++), name, (void*)temp, reference_getref(data));
j = 0;
++i;
} else {
@@ -13387,7 +13245,7 @@ BUILDIN(explode)
}
//set last string
temp[j] = '\0';
- set_reg(st, sd, reference_uid(id, start), name, (void*)temp, reference_getref(data));
+ script->set_reg(st, sd, reference_uid(id, start), name, (void*)temp, reference_getref(data));
aFree(temp);
return true;
@@ -13412,7 +13270,7 @@ BUILDIN(implode)
if( !data_isreference(data) )
{
ShowError("script:implode: not a variable\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// not a variable
}
@@ -13423,7 +13281,7 @@ BUILDIN(implode)
if( not_array_variable(*name) )
{
ShowError("script:implode: illegal scope\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// not supported
}
@@ -13431,20 +13289,20 @@ BUILDIN(implode)
if( !is_string_variable(name) )
{
ShowError("script:implode: not string array\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// data type mismatch
}
if( not_server_variable(*name) )
{
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached
}
//count chars
- array_size = getarraysize(st, id, reference_getindex(data), is_string_variable(name), reference_getref(data)) - 1;
+ array_size = script->getarraysize(st, id, reference_getindex(data), is_string_variable(name), reference_getref(data)) - 1;
if(array_size == -1) //empty array check (AmsTaff)
{
@@ -13553,7 +13411,7 @@ BUILDIN(sprintf)
}
if(*p=='n'){ // %n
ShowWarning("buildin_sprintf: Format %%n not supported! Skipping...\n");
- script_reportsrc(st);
+ script->reportsrc(st);
q+=2;
continue;
}
@@ -13612,7 +13470,7 @@ BUILDIN(sprintf)
// Passed more, than needed
if(arg<argc){
ShowWarning("buildin_sprintf: Unused arguments passed.\n");
- script_reportsrc(st);
+ script->reportsrc(st);
}
script_pushstrcopy(st, StrBuf->Value(&final_buf));
@@ -13687,7 +13545,7 @@ BUILDIN(sscanf){
return false;
}
buf_p = reference_getname(data);
- if(not_server_variable(*buf_p) && (sd = script_rid2sd(st))==NULL){
+ if(not_server_variable(*buf_p) && (sd = script->rid2sd(st))==NULL){
script_pushint(st, -1);
if(buf) aFree(buf);
if(ref_str) aFree(ref_str);
@@ -13702,12 +13560,12 @@ BUILDIN(sscanf){
if(sscanf(str, buf, ref_str)==0){
break;
}
- set_reg(st, sd, reference_uid( reference_getid(data), reference_getindex(data) ), buf_p, (void *)(ref_str), reference_getref(data));
+ script->set_reg(st, sd, reference_uid( reference_getid(data), reference_getindex(data) ), buf_p, (void *)(ref_str), reference_getref(data));
} else { // Number
if(sscanf(str, buf, &ref_int)==0){
break;
}
- set_reg(st, sd, reference_uid( reference_getid(data), reference_getindex(data) ), buf_p, (void *)__64BPTRSIZE(ref_int), reference_getref(data));
+ script->set_reg(st, sd, reference_uid( reference_getid(data), reference_getindex(data) ), buf_p, (void *)__64BPTRSIZE(ref_int), reference_getref(data));
}
arg++;
@@ -13941,7 +13799,7 @@ BUILDIN(setnpcdisplay)
else
{
ShowError("script:setnpcdisplay: expected string or number\n");
- script_reportdata(data);
+ script->reportdata(data);
return false;
}
@@ -14054,7 +13912,7 @@ BUILDIN(setd)
if( not_server_variable(*varname) )
{
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
{
ShowError("script:setd: no player attached for player variable '%s'\n", buffer);
@@ -14088,9 +13946,9 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
if( data_isreference(data) ) { // it's a variable
name = reference_getname(data);
if( not_server_variable(*name) && sd == NULL ) { // requires a player
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL ) { // no player attached
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;
}
@@ -14099,7 +13957,7 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
max_rows = 1;// not an array, limit to one row
} else {
ShowError("script:query_sql: not a variable\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;
}
@@ -14125,10 +13983,10 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
num_cols = SQL->NumColumns(handle);
if( num_vars < num_cols ) {
ShowWarning("script:query_sql: Too many columns, discarding last %u columns.\n", (unsigned int)(num_cols-num_vars));
- script_reportsrc(st);
+ script->reportsrc(st);
} else if( num_vars > num_cols ) {
ShowWarning("script:query_sql: Too many variables (%u extra).\n", (unsigned int)(num_vars-num_cols));
- script_reportsrc(st);
+ script->reportsrc(st);
}
// Store data
@@ -14149,7 +14007,7 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
}
if( i == max_rows && max_rows < SQL->NumRows(handle) ) {
ShowWarning("script:query_sql: Only %d/%u rows have been stored.\n", max_rows, (unsigned int)SQL->NumRows(handle));
- script_reportsrc(st);
+ script->reportsrc(st);
}
// Free data
@@ -14159,16 +14017,16 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
return true;
}
BUILDIN(query_sql) {
- return buildin_query_sql_sub(st, mmysql_handle);
+ return script->buildin_query_sql_sub(st, map->mysql_handle);
}
BUILDIN(query_logsql) {
- if( !logs->config.sql_logs ) {// logmysql_handle == NULL
+ if( !logs->config.sql_logs ) {// logs->mysql_handle == NULL
ShowWarning("buildin_query_logsql: SQL logs are disabled, query '%s' will not be executed.\n", script_getstr(st,2));
script_pushint(st,-1);
return false;
}
- return buildin_query_sql_sub(st, logmysql_handle);
+ return script->buildin_query_sql_sub(st, logs->mysql_handle);
}
//Allows escaping of a given string.
@@ -14181,7 +14039,7 @@ BUILDIN(escape_sql)
str = script_getstr(st,2);
len = strlen(str);
esc_str = (char*)aMalloc(len*2+1);
- SQL->EscapeStringLen(mmysql_handle, esc_str, str, len);
+ SQL->EscapeStringLen(map->mysql_handle, esc_str, str, len);
script_pushstr(st, esc_str);
return true;
}
@@ -14210,7 +14068,7 @@ BUILDIN(petstat)
TBL_PC *sd = NULL;
struct pet_data *pd;
int flag = script_getnum(st,2);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if(!sd || !sd->status.pet_id || !sd->pd){
if(flag == 2)
script_pushconststr(st, "");
@@ -14238,7 +14096,7 @@ BUILDIN(callshop)
struct npc_data *nd;
const char *shopname;
int flag = 0;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (!sd) {
script_pushint(st,0);
return true;
@@ -14522,7 +14380,7 @@ BUILDIN(checkvending) // check vending [Nab4]
if(script_hasdata(st,2))
sd = map->nick2sd(script_getstr(st,2));
else
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if(sd)
script_pushint(st, sd->state.autotrade ? 2 : sd->state.vending);
@@ -14540,7 +14398,7 @@ BUILDIN(checkchatting) {
if(script_hasdata(st,2))
sd = map->nick2sd(script_getstr(st,2));
else
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if(sd)
script_pushint(st,(sd->chatID != 0));
@@ -14556,7 +14414,7 @@ BUILDIN(checkidle) {
if (script_hasdata(st, 2))
sd = map->nick2sd(script_getstr(st, 2));
else
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (sd)
script_pushint(st, DIFF_TICK(last_tick, sd->idletime));
@@ -14594,7 +14452,7 @@ BUILDIN(searchitem)
if( !data_isreference(data) )
{
ShowError("script:searchitem: not a variable\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// not a variable
}
@@ -14605,14 +14463,14 @@ BUILDIN(searchitem)
if( not_array_variable(*name) )
{
ShowError("script:searchitem: illegal scope\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// not supported
}
if( not_server_variable(*name) )
{
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached
}
@@ -14620,7 +14478,7 @@ BUILDIN(searchitem)
if( is_string_variable(name) )
{// string array
ShowError("script:searchitem: not an integer array reference\n");
- script_reportdata(data);
+ script->reportdata(data);
st->state = END;
return false;// not supported
}
@@ -14628,7 +14486,7 @@ BUILDIN(searchitem)
for( i = 0; i < count; ++start, ++i )
{// Set array
void* v = (void*)__64BPTRSIZE((int)items[i]->nameid);
- set_reg(st, sd, reference_uid(id, start), name, v, reference_getref(data));
+ script->set_reg(st, sd, reference_uid(id, start), name, v, reference_getref(data));
}
script_pushint(st, count);
@@ -14672,7 +14530,7 @@ int axtoi(const char *hexStg)
BUILDIN(axtoi)
{
const char *hex = script_getstr(st,2);
- script_pushint(st,axtoi(hex));
+ script_pushint(st,script->axtoi(hex));
return true;
}
@@ -14710,7 +14568,7 @@ BUILDIN(pcblockmove) {
if(id)
sd = map->id2sd(id);
else
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if(sd)
sd->state.blockedmove = flag > 0;
@@ -14729,7 +14587,7 @@ BUILDIN(pcfollow) {
if(id)
sd = map->id2sd(id);
else
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if(sd)
pc->follow(sd, targetid);
@@ -14748,7 +14606,7 @@ BUILDIN(pcstopfollow)
if(id)
sd = map->id2sd(id);
else
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if(sd)
pc->stop_following(sd);
@@ -15040,7 +14898,7 @@ BUILDIN(sleep)
ticks = script_getnum(st,2);
// detach the player
- script_detach_rid(st);
+ script->detach_rid(st);
if( ticks <= 0 )
{// do nothing
@@ -15138,7 +14996,7 @@ BUILDIN(getvariableofnpc)
if( !data_isreference(data) )
{// Not a reference (aka varaible name)
ShowError("script:getvariableofnpc: not a variable\n");
- script_reportdata(data);
+ script->reportdata(data);
script_pushnil(st);
st->state = END;
return false;
@@ -15148,7 +15006,7 @@ BUILDIN(getvariableofnpc)
if( *name != '.' || name[1] == '@' )
{// not a npc variable
ShowError("script:getvariableofnpc: invalid scope (not npc variable)\n");
- script_reportdata(data);
+ script->reportdata(data);
script_pushnil(st);
st->state = END;
return false;
@@ -15212,7 +15070,7 @@ BUILDIN(openmail)
{
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -15225,7 +15083,7 @@ BUILDIN(openauction)
{
TBL_PC* sd;
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -15281,7 +15139,7 @@ BUILDIN(setcell) {
for( y = y1; y <= y2; ++y )
for( x = x1; x <= x2; ++x )
- maplist[m].setcell(m, x, y, type, flag);
+ map->list[m].setcell(m, x, y, type, flag);
return true;
}
@@ -15294,7 +15152,7 @@ BUILDIN(mercenary_create)
struct map_session_data *sd;
int class_, contract_time;
- if( (sd = script_rid2sd(st)) == NULL || sd->md || sd->status.mer_id != 0 )
+ if( (sd = script->rid2sd(st)) == NULL || sd->md || sd->status.mer_id != 0 )
return true;
class_ = script_getnum(st,2);
@@ -15308,7 +15166,7 @@ BUILDIN(mercenary_create)
}
BUILDIN(mercenary_heal) {
- struct map_session_data *sd = script_rid2sd(st);
+ struct map_session_data *sd = script->rid2sd(st);
int hp, sp;
if( sd == NULL || sd->md == NULL )
@@ -15321,7 +15179,7 @@ BUILDIN(mercenary_heal) {
}
BUILDIN(mercenary_sc_start) {
- struct map_session_data *sd = script_rid2sd(st);
+ struct map_session_data *sd = script->rid2sd(st);
enum sc_type type;
int tick, val1;
@@ -15337,7 +15195,7 @@ BUILDIN(mercenary_sc_start) {
}
BUILDIN(mercenary_get_calls) {
- struct map_session_data *sd = script_rid2sd(st);
+ struct map_session_data *sd = script->rid2sd(st);
int guild_id;
if( sd == NULL )
@@ -15363,7 +15221,7 @@ BUILDIN(mercenary_get_calls) {
}
BUILDIN(mercenary_set_calls) {
- struct map_session_data *sd = script_rid2sd(st);
+ struct map_session_data *sd = script->rid2sd(st);
int guild_id, value, *calls;
if( sd == NULL )
@@ -15393,7 +15251,7 @@ BUILDIN(mercenary_set_calls) {
}
BUILDIN(mercenary_get_faith) {
- struct map_session_data *sd = script_rid2sd(st);
+ struct map_session_data *sd = script->rid2sd(st);
int guild_id;
if( sd == NULL )
@@ -15419,7 +15277,7 @@ BUILDIN(mercenary_get_faith) {
}
BUILDIN(mercenary_set_faith) {
- struct map_session_data *sd = script_rid2sd(st);
+ struct map_session_data *sd = script->rid2sd(st);
int guild_id, value, *calls;
if( sd == NULL )
@@ -15458,7 +15316,7 @@ BUILDIN(readbook)
struct map_session_data *sd;
int book_id, page;
- if( (sd = script_rid2sd(st)) == NULL )
+ if( (sd = script->rid2sd(st)) == NULL )
return true;
book_id = script_getnum(st,2);
@@ -15474,7 +15332,7 @@ BUILDIN(readbook)
BUILDIN(setquest)
{
- struct map_session_data *sd = script_rid2sd(st);
+ struct map_session_data *sd = script->rid2sd(st);
nullpo_ret(sd);
quest->add(sd, script_getnum(st, 2));
@@ -15483,7 +15341,7 @@ BUILDIN(setquest)
BUILDIN(erasequest)
{
- struct map_session_data *sd = script_rid2sd(st);
+ struct map_session_data *sd = script->rid2sd(st);
nullpo_ret(sd);
quest->delete(sd, script_getnum(st, 2));
@@ -15492,7 +15350,7 @@ BUILDIN(erasequest)
BUILDIN(completequest)
{
- struct map_session_data *sd = script_rid2sd(st);
+ struct map_session_data *sd = script->rid2sd(st);
nullpo_ret(sd);
quest->update_status(sd, script_getnum(st, 2), Q_COMPLETE);
@@ -15501,7 +15359,7 @@ BUILDIN(completequest)
BUILDIN(changequest)
{
- struct map_session_data *sd = script_rid2sd(st);
+ struct map_session_data *sd = script->rid2sd(st);
nullpo_ret(sd);
quest->change(sd, script_getnum(st, 2),script_getnum(st, 3));
@@ -15510,7 +15368,7 @@ BUILDIN(changequest)
BUILDIN(checkquest)
{
- struct map_session_data *sd = script_rid2sd(st);
+ struct map_session_data *sd = script->rid2sd(st);
quest_check_type type = HAVEQUEST;
nullpo_ret(sd);
@@ -15524,7 +15382,7 @@ BUILDIN(checkquest)
}
BUILDIN(showevent) {
- TBL_PC *sd = script_rid2sd(st);
+ TBL_PC *sd = script->rid2sd(st);
struct npc_data *nd = map->id2nd(st->oid);
int state, color;
@@ -15670,7 +15528,7 @@ BUILDIN(bg_monster)
str = script_getstr(st,6);
class_ = script_getnum(st,7);
if( script_hasdata(st,8) ) evt = script_getstr(st,8);
- check_event(st, evt);
+ script->check_event(st, evt);
script_pushint(st, mob->spawn_bg(mapname,x,y,str,class_,evt,bg_id));
return true;
}
@@ -15696,7 +15554,7 @@ BUILDIN(bg_monster_set_team) {
BUILDIN(bg_leave)
{
- struct map_session_data *sd = script_rid2sd(st);
+ struct map_session_data *sd = script->rid2sd(st);
if( sd == NULL || !sd->bg_id )
return true;
@@ -15753,8 +15611,8 @@ BUILDIN(bg_updatescore) {
if( (m = map->mapname2mapid(str)) < 0 )
return true;
- maplist[m].bgscore_lion = script_getnum(st,3);
- maplist[m].bgscore_eagle = script_getnum(st,4);
+ map->list[m].bgscore_lion = script_getnum(st,3);
+ map->list[m].bgscore_eagle = script_getnum(st,4);
clif->bg_updatescore(m);
return true;
@@ -15860,7 +15718,7 @@ BUILDIN(instance_attachmap) {
script_pushconststr(st, "");
return true;
}
- script_pushconststr(st, maplist[m].name);
+ script_pushconststr(st, map->list[m].name);
return true;
}
@@ -15930,7 +15788,7 @@ BUILDIN(instance_init) {
return true;
}
- if( instances[instance_id].state != INSTANCE_IDLE ) {
+ if( instance->list[instance_id].state != INSTANCE_IDLE ) {
ShowError("instance_init: instance already initialized.\n");
return true;
}
@@ -15961,8 +15819,8 @@ BUILDIN(instance_announce) {
if( !instance->valid(instance_id) )
return true;
- for( i = 0; i < instances[instance_id].num_map; i++ )
- map->foreachinmap(buildin_announce_sub, instances[instance_id].map[i], BL_PC,
+ for( i = 0; i < instance->list[instance_id].num_map; i++ )
+ map->foreachinmap(script->buildin_announce_sub, instance->list[instance_id].map[i], BL_PC,
mes, strlen(mes)+1, flag&BC_COLOR_MASK, fontColor, fontType, fontSize, fontAlign, fontY);
return true;
@@ -16009,14 +15867,14 @@ BUILDIN(has_instance) {
instance_id = script_getnum(st, 3);
else if( st->instance_id >= 0 )
instance_id = st->instance_id;
- else if( (sd = script_rid2sd(st)) != NULL ) {
+ else if( (sd = script->rid2sd(st)) != NULL ) {
struct party_data *p;
int i = 0, j = 0;
if( sd->instances ) {
for( i = 0; i < sd->instances; i++ ) {
if( sd->instance[i] >= 0 ) {
- ARR_FIND(0, instances[sd->instance[i]].num_map, j, maplist[instances[sd->instance[i]].map[j]].instance_src_map == m);
- if( j != instances[sd->instance[i]].num_map )
+ ARR_FIND(0, instance->list[sd->instance[i]].num_map, j, map->list[instance->list[sd->instance[i]].map[j]].instance_src_map == m);
+ if( j != instance->list[sd->instance[i]].num_map )
break;
}
}
@@ -16026,8 +15884,8 @@ BUILDIN(has_instance) {
if( instance_id == -1 && sd->status.party_id && (p = party->search(sd->status.party_id)) && p->instances ) {
for( i = 0; i < p->instances; i++ ) {
if( p->instance[i] >= 0 ) {
- ARR_FIND(0, instances[p->instance[i]].num_map, j, maplist[instances[p->instance[i]].map[j]].instance_src_map == m);
- if( j != instances[p->instance[i]].num_map )
+ ARR_FIND(0, instance->list[p->instance[i]].num_map, j, map->list[instance->list[p->instance[i]].map[j]].instance_src_map == m);
+ if( j != instance->list[p->instance[i]].num_map )
break;
}
}
@@ -16037,8 +15895,8 @@ BUILDIN(has_instance) {
if( instance_id == -1 && sd->guild && sd->guild->instances ) {
for( i = 0; i < sd->guild->instances; i++ ) {
if( sd->guild->instance[i] >= 0 ) {
- ARR_FIND(0, instances[sd->guild->instance[i]].num_map, j, maplist[instances[sd->guild->instance[i]].map[j]].instance_src_map == m);
- if( j != instances[sd->guild->instance[i]].num_map )
+ ARR_FIND(0, instance->list[sd->guild->instance[i]].num_map, j, map->list[instance->list[sd->guild->instance[i]].map[j]].instance_src_map == m);
+ if( j != instance->list[sd->guild->instance[i]].num_map )
break;
}
}
@@ -16052,10 +15910,10 @@ BUILDIN(has_instance) {
return true;
}
- script_pushconststr(st, maplist[m].name);
+ script_pushconststr(st, map->list[m].name);
return true;
}
-static int buildin_instance_warpall_sub(struct block_list *bl,va_list ap) {
+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 x = va_arg(ap,int);
@@ -16083,12 +15941,12 @@ BUILDIN(instance_warpall) {
else
return true;
- if( (m = map->mapname2mapid(mapn)) < 0 || (maplist[m].flag.src4instance && (m = instance->mapid2imapid(m, instance_id)) < 0) )
+ 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->foreachininstance(buildin_instance_warpall_sub, instance_id, BL_PC,mapindex,x,y);
+ map->foreachininstance(script->buildin_instance_warpall_sub, instance_id, BL_PC,mapindex,x,y);
return true;
}
@@ -16155,7 +16013,7 @@ BUILDIN(instance_check_party) {
*------------------------------------------*/
BUILDIN(setfont)
{
- struct map_session_data *sd = script_rid2sd(st);
+ struct map_session_data *sd = script->rid2sd(st);
int font = script_getnum(st,2);
if( sd == NULL )
return true;
@@ -16169,7 +16027,7 @@ BUILDIN(setfont)
return true;
}
-static int buildin_mobuseskill_sub(struct block_list *bl,va_list ap)
+int buildin_mobuseskill_sub(struct block_list *bl,va_list ap)
{
TBL_MOB* md = (TBL_MOB*)bl;
struct block_list *tbl;
@@ -16221,7 +16079,7 @@ BUILDIN(areamobuseskill) {
return true;
}
- if( maplist[m].flag.src4instance && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 )
+ if( map->list[m].flag.src4instance && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 )
return true;
center.m = m;
@@ -16236,14 +16094,14 @@ BUILDIN(areamobuseskill) {
emotion = script_getnum(st,11);
target = script_getnum(st,12);
- map->foreachinrange(buildin_mobuseskill_sub, &center, range, BL_MOB, mobid, skill_id, skill_lv, casttime, cancel, emotion, target);
+ map->foreachinrange(script->buildin_mobuseskill_sub, &center, range, BL_MOB, mobid, skill_id, skill_lv, casttime, cancel, emotion, target);
return true;
}
BUILDIN(progressbar)
{
- struct map_session_data * sd = script_rid2sd(st);
+ struct map_session_data * sd = script->rid2sd(st);
const char * color;
unsigned int second;
@@ -16269,7 +16127,7 @@ BUILDIN(pushpc)
int cells, dx, dy;
struct map_session_data* sd;
- if((sd = script_rid2sd(st))==NULL)
+ if((sd = script->rid2sd(st))==NULL)
{
return true;
}
@@ -16280,7 +16138,7 @@ BUILDIN(pushpc)
if(dir>7)
{
ShowWarning("buildin_pushpc: Invalid direction %d specified.\n", dir);
- script_reportsrc(st);
+ script->reportsrc(st);
dir%= 8; // trim spin-over
}
@@ -16309,7 +16167,7 @@ BUILDIN(buyingstore)
{
struct map_session_data* sd;
- if( ( sd = script_rid2sd(st) ) == NULL ) {
+ if( ( sd = script->rid2sd(st) ) == NULL ) {
return true;
}
@@ -16326,7 +16184,7 @@ BUILDIN(searchstores)
unsigned int uses;
struct map_session_data* sd;
- if( ( sd = script_rid2sd(st) ) == NULL )
+ if( ( sd = script->rid2sd(st) ) == NULL )
{
return true;
}
@@ -16357,7 +16215,7 @@ BUILDIN(showdigit)
int value;
struct map_session_data* sd;
- if( ( sd = script_rid2sd(st) ) == NULL )
+ if( ( sd = script->rid2sd(st) ) == NULL )
{
return true;
}
@@ -16383,7 +16241,7 @@ BUILDIN(showdigit)
**/
BUILDIN(makerune) {
TBL_PC* sd;
- if( (sd = script_rid2sd(st)) == NULL )
+ if( (sd = script->rid2sd(st)) == NULL )
return true;
clif->skill_produce_mix_list(sd,RK_RUNEMASTERY,24);
sd->itemid = script_getnum(st,2);
@@ -16394,7 +16252,7 @@ BUILDIN(makerune) {
**/
BUILDIN(checkdragon) {
TBL_PC* sd;
- if( (sd = script_rid2sd(st)) == NULL )
+ if( (sd = script->rid2sd(st)) == NULL )
return true;
if( pc_isridingdragon(sd) )
script_pushint(st,1);
@@ -16416,7 +16274,7 @@ BUILDIN(setdragon) {
TBL_PC* sd;
int color = script_hasdata(st,2) ? script_getnum(st,2) : 0;
- if( (sd = script_rid2sd(st)) == NULL )
+ if( (sd = script->rid2sd(st)) == NULL )
return true;
if( !pc->checkskill(sd,RK_DRAGONTRAINING) || (sd->class_&MAPID_THIRDMASK) != MAPID_RUNE_KNIGHT )
script_pushint(st,0);//Doesn't have the skill or it's not a Rune Knight
@@ -16447,7 +16305,7 @@ BUILDIN(setdragon) {
**/
BUILDIN(ismounting) {
TBL_PC* sd;
- if( (sd = script_rid2sd(st)) == NULL )
+ if( (sd = script->rid2sd(st)) == NULL )
return true;
if( sd->sc.data[SC_ALL_RIDING] )
script_pushint(st,1);
@@ -16464,7 +16322,7 @@ BUILDIN(ismounting) {
**/
BUILDIN(setmounting) {
TBL_PC* sd;
- if( (sd = script_rid2sd(st)) == NULL )
+ if( (sd = script->rid2sd(st)) == NULL )
return true;
if( sd->sc.option&(OPTION_WUGRIDER|OPTION_RIDING|OPTION_DRAGON|OPTION_MADOGEAR) ){
clif->msgtable(sd->fd, 0X78b);
@@ -16513,7 +16371,7 @@ BUILDIN(getcharip) {
}
}
else
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
/* check for sd and IP */
if (!sd || !session[sd->fd]->client_addr)
@@ -16585,7 +16443,7 @@ BUILDIN(sit) {
sd = map->nick2sd(script_getstr(st, 2));
if (sd == NULL)
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (!pc_issit(sd))
{
@@ -16603,7 +16461,7 @@ BUILDIN(stand) {
sd = map->nick2sd(script_getstr(st, 2));
if (sd == NULL)
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (pc_issit(sd))
{
@@ -16621,7 +16479,7 @@ BUILDIN(issit) {
sd = map->nick2sd(script_getstr(st, 2));
if (sd == NULL)
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
if (pc_issit(sd))
script_pushint(st, 1);
@@ -16733,7 +16591,7 @@ BUILDIN(useatcmd) {
cmd = script_getstr(st,2);
if( st->rid ) {
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
fd = sd->fd;
} else {
// Use a dummy character.
@@ -16876,7 +16734,7 @@ BUILDIN(getrandgroupitem) {
/* cleanmap <map_name>;
* cleanarea <map_name>, <x0>, <y0>, <x1>, <y1>; */
-static int atcommand_cleanfloor_sub(struct block_list *bl, va_list ap) {
+int script_cleanfloor_sub(struct block_list *bl, va_list ap) {
nullpo_ret(bl);
map->clearflooritem(bl);
@@ -16894,14 +16752,14 @@ BUILDIN(cleanmap) {
return false;
if ((script_lastdata(st) - 2) < 4) {
- map->foreachinmap(atcommand_cleanfloor_sub, m, BL_ITEM);
+ map->foreachinmap(script->cleanfloor_sub, m, BL_ITEM);
} else {
x0 = script_getnum(st, 3);
y0 = script_getnum(st, 4);
x1 = script_getnum(st, 5);
y1 = script_getnum(st, 6);
if (x0 > 0 && y0 > 0 && x1 > 0 && y1 > 0) {
- map->foreachinarea(atcommand_cleanfloor_sub, m, x0, y0, x1, y1, BL_ITEM);
+ map->foreachinarea(script->cleanfloor_sub, m, x0, y0, x1, y1, BL_ITEM);
} else {
ShowError("cleanarea: invalid coordinate defined!\n");
return false;
@@ -16925,7 +16783,7 @@ BUILDIN(npcskill) {
skill_level = script_getnum(st, 3);
stat_point = script_getnum(st, 4);
npc_level = script_getnum(st, 5);
- sd = script_rid2sd(st);
+ sd = script->rid2sd(st);
nd = (struct npc_data *)map->id2bl(sd->npc_id);
if (stat_point > battle_config.max_third_parameter) {
@@ -17520,7 +17378,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(getequippercentrefinery,"i"),
BUILDIN_DEF(successrefitem,"i"),
BUILDIN_DEF(failedrefitem,"i"),
- BUILDIN_DEF(downrefitem,"i"),
+ BUILDIN_DEF(downrefitem,"i?"),
BUILDIN_DEF(statusup,"i"),
BUILDIN_DEF(statusup2,"ii"),
BUILDIN_DEF(bonus,"iv"),
@@ -17938,17 +17796,17 @@ void script_parse_builtin(void) {
while( *p == '?' ) ++p;
if( *p == '*' ) ++p;
if( *p != 0 ){
- ShowWarning("script_parse_builtin: ignoring function \"%s\" with invalid arg \"%s\".\n", BUILDIN[i].name, BUILDIN[i].arg);
- } else if( *skip_word(BUILDIN[i].name) != 0 ){
- ShowWarning("script_parse_builtin: ignoring function with invalid name \"%s\" (must be a word).\n", BUILDIN[i].name);
+ 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, "set")) buildin_set_ref = n;
- else if (!strcmp(BUILDIN[i].name, "callsub")) buildin_callsub_ref = n;
- else if (!strcmp(BUILDIN[i].name, "callfunc")) buildin_callfunc_ref = n;
- else if (!strcmp(BUILDIN[i].name, "getelementofarray") ) buildin_getelementofarray_ref = n;
+ if (!strcmp(BUILDIN[i].name, "set")) 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. */
@@ -17984,6 +17842,9 @@ void script_label_add(int key, int pos) {
}
void script_defaults(void) {
+ // aegis->athena slot position conversion table
+ unsigned int equip[SCRIPT_EQUIP_TABLE_SIZE] = {EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_GARMENT,EQP_SHOES,EQP_ACC_L,EQP_ACC_R,EQP_HEAD_MID,EQP_HEAD_LOW,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_GARMENT};
+
script = &script_s;
script->st_db = NULL;
@@ -18006,6 +17867,7 @@ void script_defaults(void) {
script->str_buf = NULL;
script->str_size = 0;
script->str_pos = 0;
+ memset(script->str_hash, 0, sizeof(script->str_hash));
script->word_buf = NULL;
script->word_size = 0;
@@ -18016,6 +17878,29 @@ void script_defaults(void) {
script->label_count = 0;
script->labels_size = 0;
+ script->buf = NULL;
+ script->pos = 0, script->size = 0;
+
+ script->parse_options = 0;
+ script->buildin_set_ref = 0;
+ script->buildin_callsub_ref = 0;
+ script->buildin_callfunc_ref = 0;
+ script->buildin_getelementofarray_ref = 0;
+
+ memset(script->error_jump,0,sizeof(script->error_jump));
+ script->error_msg = NULL;
+ script->error_pos = NULL;
+ script->error_report = 0;
+ script->parser_current_src = NULL;
+ script->parser_current_file = NULL;
+ script->parser_current_line = 0;
+
+ memset(&script->syntax,0,sizeof(script->syntax));
+
+ script->parse_syntax_for_flag = 0;
+
+ memcpy(script->equip, &equip, sizeof(script->equip));
+
memset(&script->config, 0, sizeof(script->config));
script->autobonus_db = NULL;
@@ -18078,6 +17963,77 @@ void script_defaults(void) {
script->queue_create = script_hqueue_create;
script->queue_clear = script_hqueue_clear;
+ script->parse_curly_close = parse_curly_close;
+ script->parse_syntax_close = parse_syntax_close;
+ script->parse_syntax_close_sub = parse_syntax_close_sub;
+ script->parse_syntax = parse_syntax;
+ script->get_com = get_com;
+ script->get_num = get_num;
+ script->op2name = script_op2name;
+ 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;
+ script->addb = add_scriptb;
+ script->addc = add_scriptc;
+ script->addi = add_scripti;
+ script->addl = add_scriptl;
+ script->set_label = set_label;
+ script->skip_word = skip_word;
+ script->add_word = add_word;
+ script->parse_callfunc = parse_callfunc;
+ script->parse_nextline = parse_nextline;
+ script->parse_variable = parse_variable;
+ script->parse_simpleexpr = parse_simpleexpr;
+ script->parse_expr = parse_expr;
+ script->parse_line = parse_line;
+ script->read_constdb = read_constdb;
+ script->print_line = script_print_line;
+ script->errorwarning_sub = script_errorwarning_sub;
+ script->set_reg = set_reg;
+ script->stack_expand = stack_expand;
+ script->push_retinfo = push_retinfo;
+ script->pop_val = pop_val;
+ script->op_3 = op_3;
+ script->op_2str = op_2str;
+ script->op_2num = op_2num;
+ script->op_2 = op_2;
+ script->op_1 = op_1;
+ script->check_buildin_argtype = script_check_buildin_argtype;
+ script->detach_state = script_detach_state;
+ script->db_free_code_sub = db_script_free_code_sub;
+ script->add_autobonus = script_add_autobonus;
+ script->menu_countoptions = menu_countoptions;
+ script->buildin_areawarp_sub = buildin_areawarp_sub;
+ script->buildin_areapercentheal_sub = buildin_areapercentheal_sub;
+ script->getarraysize = getarraysize;
+ script->buildin_delitem_delete = buildin_delitem_delete;
+ script->buildin_delitem_search = buildin_delitem_search;
+ script->buildin_killmonster_sub_strip = buildin_killmonster_sub_strip;
+ script->buildin_killmonster_sub = buildin_killmonster_sub;
+ script->buildin_killmonsterall_sub_strip = buildin_killmonsterall_sub_strip;
+ script->buildin_killmonsterall_sub = buildin_killmonsterall_sub;
+ script->buildin_announce_sub = buildin_announce_sub;
+ script->buildin_getareausers_sub = buildin_getareausers_sub;
+ script->buildin_getareadropitem_sub = buildin_getareadropitem_sub;
+ script->mapflag_pvp_sub = script_mapflag_pvp_sub;
+ script->buildin_pvpoff_sub = buildin_pvpoff_sub;
+ script->buildin_maprespawnguildid_sub_pc = buildin_maprespawnguildid_sub_pc;
+ script->buildin_maprespawnguildid_sub_mob = buildin_maprespawnguildid_sub_mob;
+ script->buildin_mobcount_sub = buildin_mobcount_sub;
+ script->playBGM_sub = playBGM_sub;
+ script->playBGM_foreachpc_sub = playBGM_foreachpc_sub;
+ script->soundeffect_sub = soundeffect_sub;
+ script->buildin_query_sql_sub = buildin_query_sql_sub;
+ script->axtoi = axtoi;
+ script->buildin_instance_warpall_sub = buildin_instance_warpall_sub;
+ script->buildin_mobuseskill_sub = buildin_mobuseskill_sub;
+ script->cleanfloor_sub = script_cleanfloor_sub;
+ script->run_func = run_func;
+
/* script_config base */
script->config.warn_func_mismatch_argtypes = 1;
script->config.warn_func_mismatch_paramnum = 1;
diff --git a/src/map/script.h b/src/map/script.h
index 97f9bdb8c..c00086ef9 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -1,11 +1,16 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#ifndef _SCRIPT_H_
#define _SCRIPT_H_
+#include "../common/strlib.h" //StringBuf
#include "map.h" //EVENT_NAME_LENGTH
+#include <setjmp.h>
+#include <errno.h>
+
/**
* Declarations
**/
@@ -17,6 +22,130 @@ struct eri;
**/
#define NUM_WHISPER_VAR 10
+/// Maximum amount of elements in script arrays (soon getting ducked)
+#define SCRIPT_MAX_ARRAYSIZE 128
+
+#define SCRIPT_BLOCK_SIZE 512
+
+// Using a prime number for SCRIPT_HASH_SIZE should give better distributions
+#define SCRIPT_HASH_SIZE 1021
+
+// Specifies which string hashing method to use
+//#define SCRIPT_HASH_DJB2
+//#define SCRIPT_HASH_SDBM
+#define SCRIPT_HASH_ELF
+
+#define SCRIPT_EQUIP_TABLE_SIZE 14
+
+//#define SCRIPT_DEBUG_DISP
+//#define SCRIPT_DEBUG_DISASM
+//#define SCRIPT_DEBUG_HASH
+//#define SCRIPT_DEBUG_DUMP_STACK
+
+///////////////////////////////////////////////////////////////////////////////
+//## TODO possible enhancements: [FlavioJS]
+// - 'callfunc' supporting labels in the current npc "::LabelName"
+// - 'callfunc' supporting labels in other npcs "NpcName::LabelName"
+// - 'function FuncName;' function declarations reverting to global functions
+// if local label isn't found
+// - join callfunc and callsub's functionality
+// - remove dynamic allocation in add_word()
+// - remove GETVALUE / SETVALUE
+// - clean up the set_reg / set_val / setd_sub mess
+// - detect invalid label references at parse-time
+
+//
+// struct script_state* st;
+//
+
+/// Returns the script_data at the target index
+#define script_getdata(st,i) ( &((st)->stack->stack_data[(st)->start + (i)]) )
+/// Returns if the stack contains data at the target index
+#define script_hasdata(st,i) ( (st)->end > (st)->start + (i) )
+/// Returns the index of the last data in the stack
+#define script_lastdata(st) ( (st)->end - (st)->start - 1 )
+/// Pushes an int into the stack
+#define script_pushint(st,val) script->push_val((st)->stack, C_INT, (val),NULL)
+/// Pushes a string into the stack (script engine frees it automatically)
+#define script_pushstr(st,val) script->push_str((st)->stack, C_STR, (val))
+/// Pushes a copy of a string into the stack
+#define script_pushstrcopy(st,val) script->push_str((st)->stack, C_STR, aStrdup(val))
+/// Pushes a constant string into the stack (must never change or be freed)
+#define script_pushconststr(st,val) script->push_str((st)->stack, C_CONSTSTR, (val))
+/// Pushes a nil into the stack
+#define script_pushnil(st) script->push_val((st)->stack, C_NOP, 0,NULL)
+/// Pushes a copy of the data in the target index
+#define script_pushcopy(st,i) script->push_copy((st)->stack, (st)->start + (i))
+
+#define script_isstring(st,i) data_isstring(script_getdata(st,i))
+#define script_isint(st,i) data_isint(script_getdata(st,i))
+
+#define script_getnum(st,val) script->conv_num(st, script_getdata(st,val))
+#define script_getstr(st,val) script->conv_str(st, script_getdata(st,val))
+#define script_getref(st,val) ( script_getdata(st,val)->ref )
+
+// Note: "top" functions/defines use indexes relative to the top of the stack
+// -1 is the index of the data at the top
+
+/// Returns the script_data at the target index relative to the top of the stack
+#define script_getdatatop(st,i) ( &((st)->stack->stack_data[(st)->stack->sp + (i)]) )
+/// Pushes a copy of the data in the target index relative to the top of the stack
+#define script_pushcopytop(st,i) script->push_copy((st)->stack, (st)->stack->sp + (i))
+/// Removes the range of values [start,end[ relative to the top of the stack
+#define script_removetop(st,start,end) ( script->pop_stack((st), ((st)->stack->sp + (start)), (st)->stack->sp + (end)) )
+
+//
+// struct script_data* data;
+//
+
+/// Returns if the script data is a string
+#define data_isstring(data) ( (data)->type == C_STR || (data)->type == C_CONSTSTR )
+/// Returns if the script data is an int
+#define data_isint(data) ( (data)->type == C_INT )
+/// Returns if the script data is a reference
+#define data_isreference(data) ( (data)->type == C_NAME )
+/// Returns if the script data is a label
+#define data_islabel(data) ( (data)->type == C_POS )
+/// Returns if the script data is an internal script function label
+#define data_isfunclabel(data) ( (data)->type == C_USERFUNC_POS )
+
+/// Returns if this is a reference to a constant
+#define reference_toconstant(data) ( script->str_data[reference_getid(data)].type == C_INT )
+/// Returns if this a reference to a param
+#define reference_toparam(data) ( script->str_data[reference_getid(data)].type == C_PARAM )
+/// Returns if this a reference to a variable
+//##TODO confirm it's C_NAME [FlavioJS]
+#define reference_tovariable(data) ( script->str_data[reference_getid(data)].type == C_NAME )
+/// Returns the unique id of the reference (id and index)
+#define reference_getuid(data) ( (data)->u.num )
+/// Returns the id of the reference
+#define reference_getid(data) ( (int32)(reference_getuid(data) & 0x00ffffff) )
+/// Returns the array index of the reference
+#define reference_getindex(data) ( (int32)(((uint32)(reference_getuid(data) & 0xff000000)) >> 24) )
+/// Returns the name of the reference
+#define reference_getname(data) ( script->str_buf + script->str_data[reference_getid(data)].str )
+/// Returns the linked list of uid-value pairs of the reference (can be NULL)
+#define reference_getref(data) ( (data)->ref )
+/// Returns the value of the constant
+#define reference_getconstant(data) ( script->str_data[reference_getid(data)].val )
+/// Returns the type of param
+#define reference_getparamtype(data) ( script->str_data[reference_getid(data)].val )
+
+/// Composes the uid of a reference from the id and the index
+#define reference_uid(id,idx) ( (int32)((((uint32)(id)) & 0x00ffffff) | (((uint32)(idx)) << 24)) )
+
+#define not_server_variable(prefix) ( (prefix) != '$' && (prefix) != '.' && (prefix) != '\'')
+#define not_array_variable(prefix) ( (prefix) != '$' && (prefix) != '@' && (prefix) != '.' && (prefix) != '\'' )
+#define is_string_variable(name) ( (name)[strlen(name) - 1] == '$' )
+
+#define BUILDIN(x) bool buildin_ ## x (struct script_state* st)
+#define BUILDIN_A(x) buildin_ ## x
+
+#define script_fetch(st, n, t) \
+ if( script_hasdata(st,n) ) \
+ (t)=script_getnum(st,n);
+
+
/**
* Enumerations
**/
@@ -79,6 +208,88 @@ enum script_parse_options {
SCRIPT_RETURN_EMPTY_SCRIPT = 0x4// returns the script object instead of NULL for empty scripts
};
+enum { LABEL_NEXTLINE=1,LABEL_START };
+
+// for advanced scripting support ( nested if, switch, while, for, do-while, function, etc )
+// [Eoe / jA 1080, 1081, 1094, 1164]
+enum curly_type {
+ TYPE_NULL = 0,
+ TYPE_IF,
+ TYPE_SWITCH,
+ TYPE_WHILE,
+ TYPE_FOR,
+ TYPE_DO,
+ TYPE_USERFUNC,
+ TYPE_ARGLIST // function argument list
+};
+
+enum e_arglist {
+ ARGLIST_UNDEFINED = 0,
+ ARGLIST_NO_PAREN = 1,
+ ARGLIST_PAREN = 2,
+};
+
+/*==========================================
+ * (Only those needed) local declaration prototype
+ * - those could be used server-wide so that the scans are done once during processing and never again,
+ * - doing so would also improve map zone processing and storage [Ind]
+ *------------------------------------------*/
+
+enum {
+ MF_NOMEMO, //0
+ MF_NOTELEPORT,
+ MF_NOSAVE,
+ MF_NOBRANCH,
+ MF_NOPENALTY,
+ MF_NOZENYPENALTY,
+ MF_PVP,
+ MF_PVP_NOPARTY,
+ MF_PVP_NOGUILD,
+ MF_GVG,
+ MF_GVG_NOPARTY, //10
+ MF_NOTRADE,
+ MF_NOSKILL,
+ MF_NOWARP,
+ MF_PARTYLOCK,
+ MF_NOICEWALL,
+ MF_SNOW,
+ MF_FOG,
+ MF_SAKURA,
+ MF_LEAVES,
+ /* 21 - 22 free */
+ MF_CLOUDS = 23,
+ MF_CLOUDS2,
+ MF_FIREWORKS,
+ MF_GVG_CASTLE,
+ MF_GVG_DUNGEON,
+ MF_NIGHTENABLED,
+ MF_NOBASEEXP,
+ MF_NOJOBEXP, //30
+ MF_NOMOBLOOT,
+ MF_NOMVPLOOT,
+ MF_NORETURN,
+ MF_NOWARPTO,
+ MF_NIGHTMAREDROP,
+ MF_ZONE,
+ MF_NOCOMMAND,
+ MF_NODROP,
+ MF_JEXP,
+ MF_BEXP, //40
+ MF_NOVENDING,
+ MF_LOADEVENT,
+ MF_NOCHAT,
+ MF_NOEXPPENALTY,
+ MF_GUILDLOCK,
+ MF_TOWN,
+ MF_AUTOTRADE,
+ MF_ALLOWKS,
+ MF_MONSTER_NOTELEPORT,
+ MF_PVP_NOCALCRANK, //50
+ MF_BATTLEGROUND,
+ MF_RESET,
+ MF_NOTOMB
+};
+
/**
* Structures
**/
@@ -209,106 +420,21 @@ struct script_label_entry {
int key,pos;
};
-///////////////////////////////////////////////////////////////////////////////
-//## TODO possible enhancements: [FlavioJS]
-// - 'callfunc' supporting labels in the current npc "::LabelName"
-// - 'callfunc' supporting labels in other npcs "NpcName::LabelName"
-// - 'function FuncName;' function declarations reverting to global functions
-// if local label isn't found
-// - join callfunc and callsub's functionality
-// - remove dynamic allocation in add_word()
-// - remove GETVALUE / SETVALUE
-// - clean up the set_reg / set_val / setd_sub mess
-// - detect invalid label references at parse-time
-
-//
-// struct script_state* st;
-//
-
-/// Returns the script_data at the target index
-#define script_getdata(st,i) ( &((st)->stack->stack_data[(st)->start + (i)]) )
-/// Returns if the stack contains data at the target index
-#define script_hasdata(st,i) ( (st)->end > (st)->start + (i) )
-/// Returns the index of the last data in the stack
-#define script_lastdata(st) ( (st)->end - (st)->start - 1 )
-/// Pushes an int into the stack
-#define script_pushint(st,val) script->push_val((st)->stack, C_INT, (val),NULL)
-/// Pushes a string into the stack (script engine frees it automatically)
-#define script_pushstr(st,val) script->push_str((st)->stack, C_STR, (val))
-/// Pushes a copy of a string into the stack
-#define script_pushstrcopy(st,val) script->push_str((st)->stack, C_STR, aStrdup(val))
-/// Pushes a constant string into the stack (must never change or be freed)
-#define script_pushconststr(st,val) script->push_str((st)->stack, C_CONSTSTR, (val))
-/// Pushes a nil into the stack
-#define script_pushnil(st) script->push_val((st)->stack, C_NOP, 0,NULL)
-/// Pushes a copy of the data in the target index
-#define script_pushcopy(st,i) script->push_copy((st)->stack, (st)->start + (i))
-
-#define script_isstring(st,i) data_isstring(script_getdata(st,i))
-#define script_isint(st,i) data_isint(script_getdata(st,i))
-
-#define script_getnum(st,val) script->conv_num(st, script_getdata(st,val))
-#define script_getstr(st,val) script->conv_str(st, script_getdata(st,val))
-#define script_getref(st,val) ( script_getdata(st,val)->ref )
-
-// Note: "top" functions/defines use indexes relative to the top of the stack
-// -1 is the index of the data at the top
-
-/// Returns the script_data at the target index relative to the top of the stack
-#define script_getdatatop(st,i) ( &((st)->stack->stack_data[(st)->stack->sp + (i)]) )
-/// Pushes a copy of the data in the target index relative to the top of the stack
-#define script_pushcopytop(st,i) script->push_copy((st)->stack, (st)->stack->sp + (i))
-/// Removes the range of values [start,end[ relative to the top of the stack
-#define script_removetop(st,start,end) ( script->pop_stack((st), ((st)->stack->sp + (start)), (st)->stack->sp + (end)) )
-
-//
-// struct script_data* data;
-//
-
-/// Returns if the script data is a string
-#define data_isstring(data) ( (data)->type == C_STR || (data)->type == C_CONSTSTR )
-/// Returns if the script data is an int
-#define data_isint(data) ( (data)->type == C_INT )
-/// Returns if the script data is a reference
-#define data_isreference(data) ( (data)->type == C_NAME )
-/// Returns if the script data is a label
-#define data_islabel(data) ( (data)->type == C_POS )
-/// Returns if the script data is an internal script function label
-#define data_isfunclabel(data) ( (data)->type == C_USERFUNC_POS )
-
-/// Returns if this is a reference to a constant
-#define reference_toconstant(data) ( script->str_data[reference_getid(data)].type == C_INT )
-/// Returns if this a reference to a param
-#define reference_toparam(data) ( script->str_data[reference_getid(data)].type == C_PARAM )
-/// Returns if this a reference to a variable
-//##TODO confirm it's C_NAME [FlavioJS]
-#define reference_tovariable(data) ( script->str_data[reference_getid(data)].type == C_NAME )
-/// Returns the unique id of the reference (id and index)
-#define reference_getuid(data) ( (data)->u.num )
-/// Returns the id of the reference
-#define reference_getid(data) ( (int32)(reference_getuid(data) & 0x00ffffff) )
-/// Returns the array index of the reference
-#define reference_getindex(data) ( (int32)(((uint32)(reference_getuid(data) & 0xff000000)) >> 24) )
-/// Returns the name of the reference
-#define reference_getname(data) ( script->str_buf + script->str_data[reference_getid(data)].str )
-/// Returns the linked list of uid-value pairs of the reference (can be NULL)
-#define reference_getref(data) ( (data)->ref )
-/// Returns the value of the constant
-#define reference_getconstant(data) ( script->str_data[reference_getid(data)].val )
-/// Returns the type of param
-#define reference_getparamtype(data) ( script->str_data[reference_getid(data)].val )
-
-/// Composes the uid of a reference from the id and the index
-#define reference_uid(id,idx) ( (int32)((((uint32)(id)) & 0x00ffffff) | (((uint32)(idx)) << 24)) )
-
-#define not_server_variable(prefix) ( (prefix) != '$' && (prefix) != '.' && (prefix) != '\'')
-#define not_array_variable(prefix) ( (prefix) != '$' && (prefix) != '@' && (prefix) != '.' && (prefix) != '\'' )
-#define is_string_variable(name) ( (name)[strlen(name) - 1] == '$' )
-
-#define BUILDIN(x) bool buildin_ ## x (struct script_state* st)
-#define BUILDIN_A(x) buildin_ ## x
+struct script_syntax_data {
+ struct {
+ enum curly_type type;
+ int index;
+ int count;
+ int flag;
+ struct linkdb_node *case_label;
+ } curly[256]; // Information right parenthesis
+ int curly_count; // The number of right brackets
+ int index; // Number of the syntax used in the script
+};
-/* script.c interface (incomplete) */
+/**
+ * Interface
+ **/
struct script_interface {
/* */
DBMap *st_db;
@@ -332,6 +458,7 @@ struct script_interface {
char *str_buf;
int 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;
@@ -344,6 +471,32 @@ struct script_interface {
/* */
struct Script_Config config;
/* */
+ /// temporary buffer for passing around compiled bytecode
+ /// @see add_scriptb, set_label, parse_script
+ unsigned char* buf;
+ int pos, size;
+ /* */
+ struct script_syntax_data syntax;
+ /* */
+ int parse_options;
+ // important buildin function references for usage in scripts
+ int buildin_set_ref;
+ int buildin_callsub_ref;
+ int buildin_callfunc_ref;
+ int buildin_getelementofarray_ref;
+ /* */
+ jmp_buf error_jump;
+ char* error_msg;
+ const char* error_pos;
+ int error_report; // if the error should produce output
+ // Used by disp_warning_message
+ const char* parser_current_src;
+ const char* parser_current_file;
+ int parser_current_line;
+ int parse_syntax_for_flag;
+ // aegis->athena slot position conversion table
+ unsigned int equip[SCRIPT_EQUIP_TABLE_SIZE];
+ /* */
/* Caches compiled autoscript item code. */
/* Note: This is not cleared when reloading itemdb. */
DBMap* autobonus_db; // char* script -> char* bytecode
@@ -405,6 +558,77 @@ struct script_interface {
bool (*queue_remove) (int idx, int var);
int (*queue_create) (void);
void (*queue_clear) (int idx);
+ /* */
+ const char * (*parse_curly_close) (const char *p);
+ const char * (*parse_syntax_close) (const char *p);
+ const char * (*parse_syntax_close_sub) (const char *p, int *flag);
+ const char * (*parse_syntax) (const char *p);
+ c_op (*get_com) (unsigned char *scriptbuf, int *pos);
+ int (*get_num) (unsigned char *scriptbuf, int *pos);
+ const char* (*op2name) (int op);
+ 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);
+ void (*addb) (int a);
+ void (*addc) (int a);
+ void (*addi) (int a);
+ void (*addl) (int l);
+ void (*set_label) (int l, int pos, const char *script_pos);
+ const char* (*skip_word) (const char *p);
+ int (*add_word) (const char *p);
+ const char* (*parse_callfunc) (const char *p, int require_paren, int is_custom);
+ void (*parse_nextline) (bool first, const char *p);
+ const char* (*parse_variable) (const char *p);
+ const char* (*parse_simpleexpr) (const char *p);
+ const char* (*parse_expr) (const char *p);
+ const char* (*parse_line) (const char *p);
+ void (*read_constdb) (void);
+ const char* (*print_line) (StringBuf *buf, const char *p, const char *mark, int line);
+ void (*errorwarning_sub) (StringBuf *buf, const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos);
+ int (*set_reg) (struct script_state *st, TBL_PC *sd, int num, const char *name, const void *value, struct DBMap **ref);
+ void (*stack_expand) (struct script_stack *stack);
+ struct script_data* (*push_retinfo) (struct script_stack *stack, struct script_retinfo *ri, DBMap **ref);
+ int (*pop_val) (struct script_state *st);
+ void (*op_3) (struct script_state *st, int op);
+ void (*op_2str) (struct script_state *st, int op, const char *s1, const char *s2);
+ void (*op_2num) (struct script_state *st, int op, int i1, int i2);
+ void (*op_2) (struct script_state *st, int op);
+ void (*op_1) (struct script_state *st, int op);
+ void (*check_buildin_argtype) (struct script_state *st, int func);
+ void (*detach_state) (struct script_state *st, bool dequeue_event);
+ int (*db_free_code_sub) (DBKey key, DBData *data, va_list ap);
+ void (*add_autobonus) (const char *autobonus);
+ int (*menu_countoptions) (const char *str, int max_count, int *total);
+ int (*buildin_areawarp_sub) (struct block_list *bl, va_list ap);
+ int (*buildin_areapercentheal_sub) (struct block_list *bl, va_list ap);
+ int32 (*getarraysize) (struct script_state *st, int32 id, int32 idx, int isstring, struct DBMap **ref);
+ void (*buildin_delitem_delete) (struct map_session_data *sd, int idx, int *amount, bool delete_items);
+ bool (*buildin_delitem_search) (struct map_session_data *sd, struct item *it, bool exact_match);
+ int (*buildin_killmonster_sub_strip) (struct block_list *bl, va_list ap);
+ int (*buildin_killmonster_sub) (struct block_list *bl, va_list ap);
+ int (*buildin_killmonsterall_sub_strip) (struct block_list *bl, va_list ap);
+ int (*buildin_killmonsterall_sub) (struct block_list *bl, va_list ap);
+ int (*buildin_announce_sub) (struct block_list *bl, va_list ap);
+ int (*buildin_getareausers_sub) (struct block_list *bl, va_list ap);
+ int (*buildin_getareadropitem_sub) (struct block_list *bl, va_list ap);
+ int (*mapflag_pvp_sub) (struct block_list *bl, va_list ap);
+ int (*buildin_pvpoff_sub) (struct block_list *bl, va_list ap);
+ int (*buildin_maprespawnguildid_sub_pc) (struct map_session_data *sd, va_list ap);
+ int (*buildin_maprespawnguildid_sub_mob) (struct block_list *bl, va_list ap);
+ int (*buildin_mobcount_sub) (struct block_list *bl, va_list ap);
+ int (*playBGM_sub) (struct block_list *bl, va_list ap);
+ int (*playBGM_foreachpc_sub) (struct map_session_data *sd, va_list args);
+ int (*soundeffect_sub) (struct block_list *bl, va_list ap);
+ int (*buildin_query_sql_sub) (struct script_state *st, Sql *handle);
+ int (*axtoi) (const char *hexStg);
+ int (*buildin_instance_warpall_sub) (struct block_list *bl, va_list ap);
+ int (*buildin_mobuseskill_sub) (struct block_list *bl, va_list ap);
+ int (*cleanfloor_sub) (struct block_list *bl, va_list ap);
+ int (*run_func) (struct script_state *st);
};
struct script_interface *script;
diff --git a/src/map/searchstore.c b/src/map/searchstore.c
index 6fd6f6aad..0144aea93 100644
--- a/src/map/searchstore.c
+++ b/src/map/searchstore.c
@@ -11,34 +11,6 @@
#include "pc.h" // struct map_session_data
#include "searchstore.h" // struct s_search_store_info
-
-/// failure constants for clif functions
-enum e_searchstore_failure {
- SSI_FAILED_NOTHING_SEARCH_ITEM = 0, // "No matching stores were found."
- SSI_FAILED_OVER_MAXCOUNT = 1, // "There are too many results. Please enter more detailed search term."
- SSI_FAILED_SEARCH_CNT = 2, // "You cannot search anymore."
- SSI_FAILED_LIMIT_SEARCH_TIME = 3, // "You cannot search yet."
- SSI_FAILED_SSILIST_CLICK_TO_OPEN_STORE = 4, // "No sale (purchase) information available."
-};
-
-
-enum e_searchstore_searchtype {
- SEARCHTYPE_VENDING = 0,
- SEARCHTYPE_BUYING_STORE = 1,
-};
-
-
-enum e_searchstore_effecttype {
- EFFECTTYPE_NORMAL = 0,
- EFFECTTYPE_CASH = 1,
- EFFECTTYPE_MAX
-};
-
-
-/// type for shop search function
-typedef bool (*searchstore_search_t)(struct map_session_data* sd, unsigned short nameid);
-typedef bool (*searchstore_searchall_t)(struct map_session_data* sd, const struct s_search_store_search* s);
-
struct searchstore_interface searchstore_s;
/// retrieves search function by type
diff --git a/src/map/searchstore.h b/src/map/searchstore.h
index 42d47c7c0..d7a327181 100644
--- a/src/map/searchstore.h
+++ b/src/map/searchstore.h
@@ -5,8 +5,36 @@
#ifndef _SEARCHSTORE_H_
#define _SEARCHSTORE_H_
+/**
+ * Defines
+ **/
#define SEARCHSTORE_RESULTS_PER_PAGE 10
+/**
+ * Enumerations
+ **/
+enum e_searchstore_searchtype {
+ SEARCHTYPE_VENDING = 0,
+ SEARCHTYPE_BUYING_STORE = 1,
+};
+
+enum e_searchstore_effecttype {
+ EFFECTTYPE_NORMAL = 0,
+ EFFECTTYPE_CASH = 1,
+ EFFECTTYPE_MAX
+};
+/// failure constants for clif functions
+enum e_searchstore_failure {
+ SSI_FAILED_NOTHING_SEARCH_ITEM = 0, // "No matching stores were found."
+ SSI_FAILED_OVER_MAXCOUNT = 1, // "There are too many results. Please enter more detailed search term."
+ SSI_FAILED_SEARCH_CNT = 2, // "You cannot search anymore."
+ SSI_FAILED_LIMIT_SEARCH_TIME = 3, // "You cannot search yet."
+ SSI_FAILED_SSILIST_CLICK_TO_OPEN_STORE = 4, // "No sale (purchase) information available."
+};
+
+/**
+ * Structures
+ **/
/// information about the search being performed
struct s_search_store_search {
struct map_session_data* search_sd; // sd of the searching player
@@ -41,6 +69,13 @@ struct s_search_store_info {
bool open;
};
+/// type for shop search function
+typedef bool (*searchstore_search_t)(struct map_session_data* sd, unsigned short nameid);
+typedef bool (*searchstore_searchall_t)(struct map_session_data* sd, const struct s_search_store_search* s);
+
+/**
+ * Interface
+ **/
struct searchstore_interface {
bool (*open) (struct map_session_data* sd, unsigned int uses, unsigned short effect);
void (*query) (struct map_session_data* sd, unsigned char type, unsigned int min_price, unsigned int max_price, const unsigned short* itemlist, unsigned int item_count, const unsigned short* cardlist, unsigned int card_count);
diff --git a/src/map/skill.c b/src/map/skill.c
index fac465df6..b90be3c2a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -185,17 +185,21 @@ int skill_get_unit_bl_target( uint16 skill_id ) { skill_get (skill->db[skill_
int skill_get_unit_flag( uint16 skill_id ) { skill_get (skill->db[skill_id].unit_flag, skill_id); }
int skill_get_unit_layout_type( uint16 skill_id ,uint16 skill_lv ){ skill_get2 (skill->db[skill_id].unit_layout_type[skill_glv(skill_lv-1)], skill_id, skill_lv); }
int skill_get_cooldown( uint16 skill_id, uint16 skill_lv ) { skill_get2 (skill->db[skill_id].cooldown[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_fixed_cast( uint16 skill_id ,uint16 skill_lv ) {
#ifdef RENEWAL_CAST
-int skill_get_fixed_cast( uint16 skill_id ,uint16 skill_lv ){ skill_get2 (skill->db[skill_id].fixed_cast[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+ skill_get2 (skill->db[skill_id].fixed_cast[skill_glv(skill_lv-1)], skill_id, skill_lv);
+#else
+ return 0;
#endif
+}
int skill_tree_get_max(uint16 skill_id, int b_class)
{
int i;
b_class = pc->class2idx(b_class);
- ARR_FIND( 0, MAX_SKILL_TREE, i, skill_tree[b_class][i].id == 0 || skill_tree[b_class][i].id == skill_id );
- if( i < MAX_SKILL_TREE && skill_tree[b_class][i].id == skill_id )
- return skill_tree[b_class][i].max;
+ ARR_FIND( 0, MAX_SKILL_TREE, i, pc->skill_tree[b_class][i].id == 0 || pc->skill_tree[b_class][i].id == skill_id );
+ if( i < MAX_SKILL_TREE && pc->skill_tree[b_class][i].id == skill_id )
+ return pc->skill_tree[b_class][i].max;
else
return skill->get_max(skill_id);
}
@@ -475,7 +479,7 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd)
case AL_WARP:
case RETURN_TO_ELDICASTES:
case ALL_GUARDIAN_RECALL:
- if(maplist[m].flag.nowarp) {
+ if(map->list[m].flag.nowarp) {
clif->skill_mapinfomessage(sd,0);
return 1;
}
@@ -483,7 +487,7 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd)
case AL_TELEPORT:
case SC_FATALMENACE:
case SC_DIMENSIONDOOR:
- if(maplist[m].flag.noteleport) {
+ if(map->list[m].flag.noteleport) {
clif->skill_mapinfomessage(sd,0);
return 1;
}
@@ -491,7 +495,7 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd)
case WE_CALLPARTNER:
case WE_CALLPARENT:
case WE_CALLBABY:
- if (maplist[m].flag.nomemo) {
+ if (map->list[m].flag.nomemo) {
clif->skill_mapinfomessage(sd,1);
return 1;
}
@@ -510,7 +514,7 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd)
return 0; // always allowed
case WZ_ICEWALL:
// noicewall flag [Valaris]
- if (maplist[m].flag.noicewall) {
+ if (map->list[m].flag.noicewall) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 1;
}
@@ -523,8 +527,8 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd)
break;
case GD_EMERGENCYCALL:
if( !(battle_config.emergency_call&((map->agit_flag || map->agit2_flag)?2:1))
- || !(battle_config.emergency_call&(maplist[m].flag.gvg || maplist[m].flag.gvg_castle?8:4))
- || (battle_config.emergency_call&16 && maplist[m].flag.nowarpto && !maplist[m].flag.gvg_castle)
+ || !(battle_config.emergency_call&(map->list[m].flag.gvg || map->list[m].flag.gvg_castle?8:4))
+ || (battle_config.emergency_call&16 && map->list[m].flag.nowarpto && !map->list[m].flag.gvg_castle)
) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 1;
@@ -560,7 +564,7 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd)
break;
}
- return (maplist[m].flag.noskill);
+ return (map->list[m].flag.noskill);
}
int skillnotok_hom(uint16 skill_id, struct homun_data *hd)
@@ -2015,7 +2019,7 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in
nullpo_ret(src);
- if (src != target && maplist[src->m].flag.noknockback)
+ if (src != target && map->list[src->m].flag.noknockback)
return 0; //No knocking
if (count == 0)
return 0; //Actual knockback distance is 0.
@@ -3526,7 +3530,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
uint8 dir = map->calc_dir(bl, src->x, src->y);
// teleport to target (if not on WoE grounds)
- if( !map_flag_gvg2(src->m) && !maplist[src->m].flag.battleground && unit->movepos(src, bl->x, bl->y, 0, 1) )
+ if( !map_flag_gvg2(src->m) && !map->list[src->m].flag.battleground && unit->movepos(src, bl->x, bl->y, 0, 1) )
clif->slide(src, bl->x, bl->y);
// cause damage and knockback if the path to target was a straight one
@@ -3634,7 +3638,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
if( dir > 2 && dir < 6 ) y = -i;
else if( dir == 7 || dir < 2 ) y = i;
else y = 0;
- if( (mbl == src || (!map_flag_gvg2(src->m) && !maplist[src->m].flag.battleground) ) // only NJ_ISSEN don't have slide effect in GVG
+ if( (mbl == src || (!map_flag_gvg2(src->m) && !map->list[src->m].flag.battleground) ) // only NJ_ISSEN don't have slide effect in GVG
&& unit->movepos(src, mbl->x+x, mbl->y+y, 1, 1)
) {
clif->slide(src, src->x, src->y);
@@ -4011,7 +4015,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
sc_start(src,SC_HIDING,100,skill_lv,skill->get_time(skill_id,skill_lv));
break;
case NJ_KIRIKAGE:
- if( !map_flag_gvg2(src->m) && !maplist[src->m].flag.battleground ) {
+ if( !map_flag_gvg2(src->m) && !map->list[src->m].flag.battleground ) {
//You don't move on GVG grounds.
short x, y;
map->search_freecell(bl, 0, &x, &y, 1, 1, 0);
@@ -4284,7 +4288,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
}
break;
case LG_PINPOINTATTACK:
- if( !map_flag_gvg2(src->m) && !maplist[src->m].flag.battleground && unit->movepos(src, bl->x, bl->y, 1, 1) )
+ if( !map_flag_gvg2(src->m) && !map->list[src->m].flag.battleground && unit->movepos(src, bl->x, bl->y, 1, 1) )
clif->slide(src,bl->x,bl->y);
skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
break;
@@ -4309,7 +4313,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
break;
case SR_KNUCKLEARROW:
- if( !map_flag_gvg2(src->m) && !maplist[src->m].flag.battleground && unit->movepos(src, bl->x, bl->y, 1, 1) ) {
+ if( !map_flag_gvg2(src->m) && !map->list[src->m].flag.battleground && unit->movepos(src, bl->x, bl->y, 1, 1) ) {
clif->slide(src,bl->x,bl->y);
clif->fixpos(src); // Aegis send this packet too.
}
@@ -5035,7 +5039,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
break;
}
skill->area_temp[0] = 0;
- party_foreachsamemap(skill->area_sub,
+ 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);
@@ -5044,7 +5048,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
break;
}
skill->area_temp[0] = 5 - skill->area_temp[0]; // The actual penalty...
- if (skill->area_temp[0] > 0 && !maplist[src->m].flag.noexppenalty) { //Apply penalty
+ if (skill->area_temp[0] > 0 && !map->list[src->m].flag.noexppenalty) { //Apply penalty
sd->status.base_exp -= min(sd->status.base_exp, pc->nextbaseexp(sd) * skill->area_temp[0] * 2/1000); //0.2% penalty per each.
sd->status.job_exp -= min(sd->status.job_exp, pc->nextjobexp(sd) * skill->area_temp[0] * 2/1000);
clif->updatestatus(sd,SP_BASEEXP);
@@ -5060,7 +5064,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
break;
case ALL_RESURRECTION:
- if(sd && (map_flag_gvg2(bl->m) || maplist[bl->m].flag.battleground)) {
+ if(sd && (map_flag_gvg2(bl->m) || map->list[bl->m].flag.battleground)) {
//No reviving in WoE grounds!
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
break;
@@ -5072,7 +5076,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if (tsc && tsc->data[SC_HELLPOWER])
break;
- if (maplist[bl->m].flag.pvp && dstsd && dstsd->pvp_point < 0)
+ if (map->list[bl->m].flag.pvp && dstsd && dstsd->pvp_point < 0)
break;
switch(skill_lv){
@@ -5743,7 +5747,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
break;
case MO_KITRANSLATION:
- if(dstsd && (dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER) {
+ if(dstsd && ((dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER || (dstsd->class_&MAPID_UPPERMASK)!=MAPID_REBELLION)) {
pc->addspiritball(dstsd,skill->get_time(skill_id,skill_lv),5);
}
break;
@@ -5758,7 +5762,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case MO_ABSORBSPIRITS:
i = 0;
- if (dstsd && dstsd->spiritball && (sd == dstsd || map_flag_vs(src->m)) && (dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER)
+ 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;
pc->delspiritball(dstsd,dstsd->spiritball,0);
@@ -5893,14 +5897,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if( sd == NULL || sd->status.party_id == 0 || (flag & 1) )
clif->skill_nodamage(bl, bl, skill_id, skill_lv, sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
else if( sd )
- 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);
+ 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 MER_MAGNIFICAT:
if( mer != NULL )
{
clif->skill_nodamage(bl, bl, skill_id, skill_lv, sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
if( mer->master && mer->master->status.party_id != 0 && !(flag&1) )
- party_foreachsamemap(skill->area_sub, mer->master, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
+ party->foreachsamemap(skill->area_sub, mer->master, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id);
else if( mer->master && !(flag&1) )
clif->skill_nodamage(src, &mer->master->bl, skill_id, skill_lv, sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
}
@@ -5914,7 +5918,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_nodamage(bl,bl,skill_id,skill_lv,
sc_start2(bl,type,100,skill_lv,(src == bl)? 1:0,skill->get_time(skill_id,skill_lv)));
} else if (sd) {
- party_foreachsamemap(skill->area_sub,
+ 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);
@@ -6258,7 +6262,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case AL_TELEPORT:
if(sd) {
- if (maplist[bl->m].flag.noteleport && skill_lv <= 2) {
+ if (map->list[bl->m].flag.noteleport && skill_lv <= 2) {
clif->skill_mapinfomessage(sd,0);
break;
}
@@ -6631,8 +6635,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
int x,y, dir = unit->getdir(src);
//Fails on noteleport maps, except for GvG and BG maps [Skotlex]
- if( maplist[src->m].flag.noteleport
- && !(maplist[src->m].flag.battleground || map_flag_gvg2(src->m))
+ if( map->list[src->m].flag.noteleport
+ && !(map->list[src->m].flag.battleground || map_flag_gvg2(src->m))
) {
x = src->x;
y = src->y;
@@ -7448,7 +7452,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
for(i = 0; i < g->max_member; i++, j++) {
if (j>8) j=0;
if ((dstsd = g->member[i].sd) != NULL && sd != dstsd && !dstsd->state.autotrade && !pc_isdead(dstsd)) {
- if (maplist[dstsd->bl.m].flag.nowarp && !map_flag_gvg2(dstsd->bl.m))
+ if (map->list[dstsd->bl.m].flag.nowarp && !map_flag_gvg2(dstsd->bl.m))
continue;
if(map->getcell(src->m,src->x+dx[j],src->y+dy[j],CELL_CHKNOREACH))
dx[j] = dy[j] = 0;
@@ -7645,7 +7649,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
break;
}
- 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);
+ 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
clif->skill_nodamage(src,bl,skill_id,skill_lv,sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
@@ -7725,9 +7729,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
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);
+ 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
- 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);
+ 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));
}
@@ -7791,7 +7795,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
skill->area_temp[5] |= 0x200;
}
clif->skill_nodamage(src, bl, skill_id, skill_lv, 1);
- 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);
+ 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;
/**
@@ -7893,7 +7897,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if( !i )
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);
+ 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;
@@ -7901,7 +7905,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if( sd == NULL || sd->status.party_id == 0 || flag&1 )
clif->skill_nodamage(bl, bl, skill_id, skill_lv, sc_start4(bl, type, 100, skill_lv, 0, 0, 1, skill->get_time(skill_id, skill_lv)));
else if( sd )
- 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);
+ 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_CHEAL:
@@ -7919,7 +7923,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
}
}
else if( sd )
- 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);
+ 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_ORATIO:
@@ -7948,7 +7952,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_nodamage(bl, bl, skill_id, skill_lv,
sc_start(bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));
} else if( sd )
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv),
+ 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;
@@ -7965,7 +7969,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_nodamage(bl, bl, skill_id, skill_lv,
sc_start(bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));
} else if( sd )
- party_foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv),
+ 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;
@@ -8068,7 +8072,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
int rate = 45 + 5 * skill_lv;
if( rnd()%100 < rate ){
clif->skill_nodamage(src, bl, skill_id, skill_lv, 1);
- map->foreachinrange(skill->area_sub,bl,skill->get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill_castend_nodamage_id);
+ map->foreachinrange(skill->area_sub,bl,skill->get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_nodamage_id);
}else if( sd ) // Failure on Rate
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
}
@@ -8458,7 +8462,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
}
break;
case LG_INSPIRATION:
- if( sd && !maplist[sd->bl.m].flag.noexppenalty && sd->status.base_level != MAX_LEVEL ) {
+ if( sd && !map->list[sd->bl.m].flag.noexppenalty && sd->status.base_level != MAX_LEVEL ) {
sd->status.base_exp -= min(sd->status.base_exp, pc->nextbaseexp(sd) * 1 / 100); // 1% penalty.
sd->status.job_exp -= min(sd->status.job_exp, pc->nextjobexp(sd) * 1 / 100);
clif->updatestatus(sd,SP_BASEEXP);
@@ -8570,7 +8574,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv));
else if( sd ) { // Only shows effects on caster.
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
- 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);
+ 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;
@@ -8581,7 +8585,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
sc_start4(bl,type,100,skill_lv,6*skill_lv,(sd?pc->checkskill(sd,WM_LESSON):0),(sd?sd->status.job_level:0),skill->get_time(skill_id,skill_lv));
else if( sd ) { // Only shows effects on caster.
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
- 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);
+ 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;
@@ -8673,7 +8677,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
uint16 lv = skill_lv;
int count = skill->check_pc_partner(sd,skill_id,&lv,skill->get_splash(skill_id,skill_lv),1);
if( sc_start2(bl,type,100,skill_lv,count,skill->get_time(skill_id,skill_lv)) )
- 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);
+ 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);
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
}
@@ -8889,7 +8893,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if( sd->status.party_id == 0 || flag&1 )
skill->unitsetting(src,MG_SAFETYWALL,skill_lv,bl->x,bl->y,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);
+ 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 GN_CHANGEMATERIAL:
@@ -8921,12 +8925,17 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case GN_MANDRAGORA:
if( flag&1 ) {
- if ( clif->skill_nodamage(bl, src, skill_id, skill_lv,
- sc_start(bl, type, 25 + 10 * skill_lv, skill_lv, skill->get_time(skill_id, skill_lv))) )
- status_zap(bl, 0, status_get_max_sp(bl) * (25 + 5 * skill_lv) / 100);
- } else
- map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR,
- src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id);
+ int chance = 25 + 10 * skill_lv - (status_get_vit(bl) + status_get_luk(bl)) / 5;
+ if ( chance < 10 )
+ chance = 10;//Minimal chance is 10%.
+ if ( rand()%100 < chance ) {//Coded to both inflect the status and drain the target's SP only when successful. [Rytech]
+ sc_start(bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv));
+ status_zap(bl, 0, status_get_max_sp(bl) * (25 + 5 * skill_lv) / 100);
+ }
+ } else if ( sd ) {
+ map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR,src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id);
+ clif->skill_nodamage(bl, src, skill_id, skill_lv, 1);
+ }
break;
case GN_SLINGITEM:
@@ -9893,7 +9902,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
}
break;
case NJ_SHADOWJUMP:
- if( !map_flag_gvg2(src->m) && !maplist[src->m].flag.battleground ) { //You don't move on GVG grounds.
+ if( !map_flag_gvg2(src->m) && !map->list[src->m].flag.battleground ) { //You don't move on GVG grounds.
unit->movepos(src, x, y, 1, 0);
clif->slide(src,x,y);
}
@@ -10428,11 +10437,11 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_
unit_flag = skill->get_unit_flag(skill_id);
layout = skill->get_unit_layout(skill_id,skill_lv,src,x,y);
- if( maplist[src->m].unit_count ) {
- ARR_FIND(0, maplist[src->m].unit_count, i, maplist[src->m].units[i]->skill_id == skill_id );
+ if( map->list[src->m].unit_count ) {
+ ARR_FIND(0, map->list[src->m].unit_count, i, map->list[src->m].units[i]->skill_id == skill_id );
- if( i < maplist[src->m].unit_count ) {
- limit = limit * maplist[src->m].units[i]->modifier / 100;
+ if( i < map->list[src->m].unit_count ) {
+ limit = limit * map->list[src->m].units[i]->modifier / 100;
}
}
@@ -10529,7 +10538,7 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_
ARR_FIND(0, MAX_SKILL_ITEM_REQUIRE, i, req.itemid[i] && (req.itemid[i] == ITEMID_TRAP || req.itemid[i] == ITEMID_TRAP_ALLOY));
if( req.itemid[i] )
req_item = req.itemid[i];
- if( map_flag_gvg2(src->m) || maplist[src->m].flag.battleground )
+ if( map_flag_gvg2(src->m) || map->list[src->m].flag.battleground )
limit *= 4; // longer trap times in WOE [celest]
if( battle_config.vs_traps_bctall && map_flag_vs(src->m) && (src->type&battle_config.vs_traps_bctall) )
target = BCT_ALL;
@@ -11619,7 +11628,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
break;
case UNT_DIMENSIONDOOR:
- if( tsd && !maplist[bl->m].flag.noteleport )
+ if( tsd && !map->list[bl->m].flag.noteleport )
pc->randomwarp(tsd,3);
else if( bl->type == BL_MOB && battle_config.mob_warp&8 )
unit->warp(bl,-1,-1,-1,3);
@@ -12193,7 +12202,7 @@ int skill_check_pc_partner (struct map_session_data *sd, uint16 skill_id, uint16
c = 0;
memset (p_sd, 0, sizeof(p_sd));
if( is_chorus )
- i = party_foreachsamemap(skill->check_condition_char_sub,sd,AREA_SIZE,&sd->bl, &c, &p_sd, skill_id, *skill_lv);
+ i = party->foreachsamemap(skill->check_condition_char_sub,sd,AREA_SIZE,&sd->bl, &c, &p_sd, skill_id, *skill_lv);
else
i = map->foreachinrange(skill->check_condition_char_sub, &sd->bl, range, BL_PC, &sd->bl, &c, &p_sd, skill_id);
@@ -12625,7 +12634,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
break;
i = skill_id-SG_SUN_COMFORT;
if (sd->bl.m == sd->feel_map[i].m &&
- (battle_config.allow_skill_without_day || sg_info[i].day_func()))
+ (battle_config.allow_skill_without_day || pc->sg_info[i].day_func()))
break;
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 0;
@@ -13590,16 +13599,18 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
if( itemid_isgemstone(req.itemid[i]) && skill_id != HW_GANBANTEIN )
{
if( sd->special_state.no_gemstone )
- { //Make it substract 1 gem rather than skipping the cost.
- if( --req.amount[i] < 1 )
- req.itemid[i] = 0;
+ { // All gem skills except Hocus Pocus and Ganbantein can cast for free with Mistress card -helvetica
+ if( skill_id != SA_ABRACADABRA )
+ req.itemid[i] = req.amount[i] = 0;
+ else if( --req.amount[i] < 1 )
+ req.amount[i] = 1; // Hocus Pocus always use at least 1 gem
}
if(sc && sc->data[SC_INTOABYSS])
{
if( skill_id != SA_ABRACADABRA )
req.itemid[i] = req.amount[i] = 0;
else if( --req.amount[i] < 1 )
- req.amount[i] = 1; // Hocus Pocus allways use at least 1 gem
+ req.amount[i] = 1; // Hocus Pocus always use at least 1 gem
}
}
if( skill_id >= HT_SKIDTRAP && skill_id <= HT_TALKIEBOX && pc->checkskill(sd, RA_RESEARCHTRAP) > 0){
@@ -13798,8 +13809,8 @@ int skill_castfix_sc (struct block_list *bl, int time) {
//ShowInfo("Castime castfix_sc = %d\n",time);
return time;
}
-#ifdef RENEWAL_CAST
int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv) {
+#ifdef RENEWAL_CAST
struct status_change *sc = status->get_sc(bl);
struct map_session_data *sd = BL_CAST(BL_PC,bl);
int fixed = skill->get_fixed_cast(skill_id, skill_lv), fixcast_r = 0, varcast_r = 0, i = 0;
@@ -13913,10 +13924,9 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16
time = (1 - sqrt( ((float)(status_get_dex(bl)*2 + status_get_int(bl)) / battle_config.vcast_stat_scale) )) * time;
// underflow checking/capping
time = max(time, 0) + (1 - (float)min(fixcast_r, 100) / 100) * max(fixed,0);
-
+#endif
return (int)time;
}
-#endif
/*==========================================
* Does delay reductions based on dex/agi, sc data, item bonuses, ...
@@ -13980,7 +13990,7 @@ int skill_delay_fix (struct block_list *bl, uint16 skill_id, uint16 skill_lv) {
time /= 2;
break;
case AS_SONICBLOW:
- if (!map_flag_gvg2(bl->m) && !maplist[bl->m].flag.battleground && sc->data[SC_SOULLINK]->val2 == SL_ASSASIN)
+ if (!map_flag_gvg2(bl->m) && !map->list[bl->m].flag.battleground && sc->data[SC_SOULLINK]->val2 == SL_ASSASIN)
time /= 2;
break;
}
@@ -14508,7 +14518,7 @@ void skill_unitsetmapcell (struct skill_unit *src, uint16 skill_id, uint16 skill
for( y = src->bl.y - range; y <= src->bl.y + range; ++y )
for( x = src->bl.x - range; x <= src->bl.x + range; ++x )
- maplist[src->bl.m].setcell(src->bl.m, x, y, cell, flag);
+ map->list[src->bl.m].setcell(src->bl.m, x, y, cell, flag);
}
/*==========================================
@@ -15062,7 +15072,7 @@ struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int
map->setgatcell(su->bl.m,su->bl.x,su->bl.y,5);
clif->changemapcell(0,su->bl.m,su->bl.x,su->bl.y,5,AREA);
skill->unitsetmapcell(su,WZ_ICEWALL,group->skill_lv,CELL_ICEWALL,true);
- maplist[su->bl.m].icewall_num++;
+ map->list[su->bl.m].icewall_num++;
break;
case SA_LANDPROTECTOR:
skill->unitsetmapcell(su,SA_LANDPROTECTOR,group->skill_lv,CELL_LANDPROTECTOR,true);
@@ -15117,7 +15127,7 @@ int skill_delunit (struct skill_unit* su) {
map->setgatcell(su->bl.m,su->bl.x,su->bl.y,su->val2);
clif->changemapcell(0,su->bl.m,su->bl.x,su->bl.y,su->val2,ALL_SAMEMAP); // hack to avoid clientside cell bug
skill->unitsetmapcell(su,WZ_ICEWALL,group->skill_lv,CELL_ICEWALL,false);
- maplist[su->bl.m].icewall_num--;
+ map->list[su->bl.m].icewall_num--;
break;
case SA_LANDPROTECTOR:
skill->unitsetmapcell(su,SA_LANDPROTECTOR,group->skill_lv,CELL_LANDPROTECTOR,false);
@@ -15542,13 +15552,13 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) {
if(group->val1) {
sd = map->charid2sd(group->val1);
group->val1 = 0;
- if (sd && !maplist[sd->bl.m].flag.nowarp)
+ if (sd && !map->list[sd->bl.m].flag.nowarp)
pc->setpos(sd,map_id2index(su->bl.m),su->bl.x,su->bl.y,CLR_TELEPORT);
}
if(group->val2) {
sd = map->charid2sd(group->val2);
group->val2 = 0;
- if (sd && !maplist[sd->bl.m].flag.nowarp)
+ if (sd && !map->list[sd->bl.m].flag.nowarp)
pc->setpos(sd,map_id2index(su->bl.m),su->bl.x,su->bl.y,CLR_TELEPORT);
}
skill->delunit(su);
@@ -17986,11 +17996,11 @@ void skill_reload (void) {
//[Ind/Hercules] refresh index cache
for(c = 0; c < CLASS_COUNT; c++) {
for( i = 0; i < MAX_SKILL_TREE; i++ ) {
- if( skill_tree[c][i].id ) {
- skill_tree[c][i].idx = skill->get_index(skill_tree[c][i].id);
+ if( pc->skill_tree[c][i].id ) {
+ pc->skill_tree[c][i].idx = skill->get_index(pc->skill_tree[c][i].id);
for(k = 0; k < MAX_PC_SKILL_REQUIRE; k++) {
- if( skill_tree[c][i].need[k].id )
- skill_tree[c][i].need[k].idx = skill->get_index(skill_tree[c][i].need[k].id);
+ if( pc->skill_tree[c][i].need[k].id )
+ pc->skill_tree[c][i].need[k].idx = skill->get_index(pc->skill_tree[c][i].need[k].id);
}
}
}
@@ -18162,9 +18172,7 @@ void skill_defaults(void) {
skill->unit_ondamaged = skill_unit_ondamaged;
skill->cast_fix = skill_castfix;
skill->cast_fix_sc = skill_castfix_sc;
-#ifdef RENEWAL_CAST
skill->vf_cast_fix = skill_vfcastfix;
-#endif
skill->delay_fix = skill_delay_fix;
skill->check_condition_castbegin = skill_check_condition_castbegin;
skill->check_condition_castend = skill_check_condition_castend;
@@ -18228,9 +18236,7 @@ void skill_defaults(void) {
skill->check_condition_mob_master_sub = skill_check_condition_mob_master_sub;
skill->brandishspear_first = skill_brandishspear_first;
skill->brandishspear_dir = skill_brandishspear_dir;
-#ifdef RENEWAL_CAST
skill->get_fixed_cast = skill_get_fixed_cast;
-#endif
skill->sit_count = skill_sit_count;
skill->sit_in = skill_sit_in;
skill->sit_out = skill_sit_out;
diff --git a/src/map/skill.h b/src/map/skill.h
index 1609802f9..592721f1e 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1247,6 +1247,31 @@ enum e_skill {
ALL_RAY_OF_PROTECTION,
MC_CARTDECORATE,
+ RL_GLITTERING_GREED = 2551,
+ RL_RICHS_COIN,
+ RL_MASS_SPIRAL,
+ RL_BANISHING_BUSTER,
+ RL_B_TRAP,
+ RL_FLICKER,
+ RL_S_STORM,
+ RL_E_CHAIN,
+ RL_QD_SHOT,
+ RL_C_MARKER,
+ RL_FIREDANCE,
+ RL_H_MINE,
+ RL_P_ALTER,
+ RL_FALLEN_ANGEL,
+ RL_R_TRIP,
+ RL_D_TAIL,
+ RL_FIRE_RAIN,
+ RL_HEAT_BARREL,
+ RL_AM_BLAST,
+ RL_SLUGSHOT,
+ RL_HAMMER_OF_GOD,
+ RL_R_TRIP_PLUSATK,
+ RL_B_FLICKER_ATK,
+ RL_GLITTERING_GREED_ATK,
+
KO_YAMIKUMO = 3001,
KO_RIGHT,
KO_LEFT,
@@ -1868,9 +1893,7 @@ struct skill_interface {
int (*unit_ondamaged) (struct skill_unit *src,struct block_list *bl,int64 damage,unsigned int tick);
int (*cast_fix) ( struct block_list *bl, uint16 skill_id, uint16 skill_lv);
int (*cast_fix_sc) ( struct block_list *bl, int time);
-#ifdef RENEWAL_CAST
int (*vf_cast_fix) ( struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv);
-#endif
int (*delay_fix) ( struct block_list *bl, uint16 skill_id, uint16 skill_lv);
int (*check_condition_castbegin) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
int (*check_condition_castend) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
@@ -1934,9 +1957,7 @@ struct skill_interface {
int (*check_condition_mob_master_sub) (struct block_list *bl, va_list ap);
void (*brandishspear_first) (struct square *tc, uint8 dir, int16 x, int16 y);
void (*brandishspear_dir) (struct square* tc, uint8 dir, int are);
-#ifdef RENEWAL_CAST
int (*get_fixed_cast) ( uint16 skill_id ,uint16 skill_lv );
-#endif
int (*sit_count) (struct block_list *bl, va_list ap);
int (*sit_in) (struct block_list *bl, va_list ap);
int (*sit_out) (struct block_list *bl, va_list ap);
diff --git a/src/map/status.c b/src/map/status.c
index d8356264c..497d02bbf 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -40,39 +40,7 @@
#include <string.h>
#include <math.h>
-//Regen related flags.
-enum e_regen
-{
- RGN_HP = 0x01,
- RGN_SP = 0x02,
- RGN_SHP = 0x04,
- RGN_SSP = 0x08,
-};
-
-static int max_weight_base[CLASS_COUNT];
-static int hp_coefficient[CLASS_COUNT];
-static int hp_coefficient2[CLASS_COUNT];
-static int hp_sigma_val[CLASS_COUNT][MAX_LEVEL+1];
-static int sp_coefficient[CLASS_COUNT];
-#ifdef RENEWAL_ASPD
-static int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1];
-#else
-static int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE]; //[blackhole89]
-#endif
-
-// bonus values and upgrade chances for refining equipment
-static struct {
- int chance[MAX_REFINE]; // success chance
- int bonus[MAX_REFINE]; // cumulative fixed bonus damage
- int randombonus_max[MAX_REFINE]; // cumulative maximum random bonus damage
-} refine_info[REFINE_TYPE_MAX];
-
-static int atkmods[3][MAX_WEAPON_TYPE]; //ATK weapon modification for size (size_fix.txt)
-static char job_bonus[CLASS_COUNT][MAX_LEVEL];
-static sc_conf_type sc_conf[SC_MAX];
-
-static struct eri *sc_data_ers; //For sc_data entries
-static struct status_data dummy_status;
+struct status_interface status_s;
/**
* Returns the status change associated with a skill.
@@ -85,7 +53,7 @@ sc_type status_skill2sc(int skill_id) {
ShowError("status_skill2sc: Unsupported skill id %d\n", skill_id);
return SC_NONE;
}
- return SkillStatusChangeTable[idx];
+ return status->Skill2SCTable[idx];
}
/**
@@ -101,7 +69,7 @@ int status_sc2skill(sc_type sc)
return 0;
}
- return StatusSkillChangeTable[sc];
+ return status->SkillChangeTable[sc];
}
/**
@@ -116,7 +84,7 @@ unsigned int status_sc2scb_flag(sc_type sc)
return SCB_NONE;
}
- return StatusChangeFlagTable[sc];
+ return status->ChangeFlagTable[sc];
}
/**
@@ -131,12 +99,12 @@ int status_type2relevant_bl_types(int type)
return SI_BLANK;
}
- return StatusRelevantBLTypes[type];
+ return status->RelevantBLTypes[type];
}
#define add_sc(skill,sc) set_sc(skill,sc,SI_BLANK,SCB_NONE)
// indicates that the status displays a visual effect for the affected unit, and should be sent to the client for all supported units
-#define set_sc_with_vfx(skill, sc, icon, flag) set_sc((skill), (sc), (icon), (flag)); if((icon) < SI_MAX) StatusRelevantBLTypes[(icon)] |= BL_SCEFFECT
+#define set_sc_with_vfx(skill, sc, icon, flag) set_sc((skill), (sc), (icon), (flag)); if((icon) < SI_MAX) status->RelevantBLTypes[(icon)] |= BL_SCEFFECT
static void set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) {
uint16 idx;
@@ -149,31 +117,31 @@ static void set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) {
return;
}
- if( StatusSkillChangeTable[sc] == 0 )
- StatusSkillChangeTable[sc] = skill_id;
- if( StatusIconChangeTable[sc] == SI_BLANK )
- StatusIconChangeTable[sc] = icon;
- StatusChangeFlagTable[sc] |= flag;
+ if( status->SkillChangeTable[sc] == 0 )
+ status->SkillChangeTable[sc] = skill_id;
+ if( status->IconChangeTable[sc] == SI_BLANK )
+ status->IconChangeTable[sc] = icon;
+ status->ChangeFlagTable[sc] |= flag;
- if( SkillStatusChangeTable[idx] == SC_NONE )
- SkillStatusChangeTable[idx] = sc;
+ if( status->Skill2SCTable[idx] == SC_NONE )
+ status->Skill2SCTable[idx] = sc;
}
void initChangeTables(void) {
int i;
for (i = 0; i < SC_MAX; i++)
- StatusIconChangeTable[i] = SI_BLANK;
+ status->IconChangeTable[i] = SI_BLANK;
for (i = 0; i < MAX_SKILL; i++)
- SkillStatusChangeTable[i] = SC_NONE;
+ status->Skill2SCTable[i] = SC_NONE;
for (i = 0; i < SI_MAX; i++)
- StatusRelevantBLTypes[i] = BL_PC;
+ status->RelevantBLTypes[i] = BL_PC;
- memset(StatusSkillChangeTable, 0, sizeof(StatusSkillChangeTable));
- memset(StatusChangeFlagTable, 0, sizeof(StatusChangeFlagTable));
- memset(StatusDisplayType, 0, sizeof(StatusDisplayType));
+ memset(status->SkillChangeTable, 0, sizeof(status->SkillChangeTable));
+ memset(status->ChangeFlagTable, 0, sizeof(status->ChangeFlagTable));
+ memset(status->DisplayType, 0, sizeof(status->DisplayType));
//First we define the skill for common ailments. These are used in skill_additional_effect through sc cards. [Skotlex]
set_sc( NPC_PETRIFYATTACK , SC_STONE , SI_BLANK , SCB_DEF_ELE|SCB_DEF|SCB_MDEF );
@@ -780,303 +748,303 @@ void initChangeTables(void) {
set_sc_with_vfx( GN_ILLUSIONDOPING , SC_ILLUSIONDOPING , SI_ILLUSIONDOPING , SCB_HIT );
// Storing the target job rather than simply SC_SOULLINK simplifies code later on.
- SkillStatusChangeTable[SL_ALCHEMIST] = (sc_type)MAPID_ALCHEMIST,
- SkillStatusChangeTable[SL_MONK] = (sc_type)MAPID_MONK,
- SkillStatusChangeTable[SL_STAR] = (sc_type)MAPID_STAR_GLADIATOR,
- SkillStatusChangeTable[SL_SAGE] = (sc_type)MAPID_SAGE,
- SkillStatusChangeTable[SL_CRUSADER] = (sc_type)MAPID_CRUSADER,
- SkillStatusChangeTable[SL_SUPERNOVICE] = (sc_type)MAPID_SUPER_NOVICE,
- SkillStatusChangeTable[SL_KNIGHT] = (sc_type)MAPID_KNIGHT,
- SkillStatusChangeTable[SL_WIZARD] = (sc_type)MAPID_WIZARD,
- SkillStatusChangeTable[SL_PRIEST] = (sc_type)MAPID_PRIEST,
- SkillStatusChangeTable[SL_BARDDANCER] = (sc_type)MAPID_BARDDANCER,
- SkillStatusChangeTable[SL_ROGUE] = (sc_type)MAPID_ROGUE,
- SkillStatusChangeTable[SL_ASSASIN] = (sc_type)MAPID_ASSASSIN,
- SkillStatusChangeTable[SL_BLACKSMITH] = (sc_type)MAPID_BLACKSMITH,
- SkillStatusChangeTable[SL_HUNTER] = (sc_type)MAPID_HUNTER,
- SkillStatusChangeTable[SL_SOULLINKER] = (sc_type)MAPID_SOUL_LINKER,
-
- //Status that don't have a skill associated.
- StatusIconChangeTable[SC_WEIGHTOVER50] = SI_WEIGHTOVER50;
- StatusIconChangeTable[SC_WEIGHTOVER90] = SI_WEIGHTOVER90;
- StatusIconChangeTable[SC_ATTHASTE_POTION1] = SI_ATTHASTE_POTION1;
- StatusIconChangeTable[SC_ATTHASTE_POTION2] = SI_ATTHASTE_POTION2;
- StatusIconChangeTable[SC_ATTHASTE_POTION3] = SI_ATTHASTE_POTION3;
- StatusIconChangeTable[SC_ATTHASTE_INFINITY] = SI_ATTHASTE_INFINITY;
- StatusIconChangeTable[SC_MOVHASTE_HORSE] = SI_MOVHASTE_HORSE;
- StatusIconChangeTable[SC_MOVHASTE_INFINITY] = SI_MOVHASTE_INFINITY;
- StatusIconChangeTable[SC_CHASEWALK2] = SI_INCSTR;
- StatusIconChangeTable[SC_MIRACLE] = SI_SOULLINK;
- StatusIconChangeTable[SC_CLAIRVOYANCE] = SI_CLAIRVOYANCE;
- StatusIconChangeTable[SC_FOOD_STR] = SI_FOOD_STR;
- StatusIconChangeTable[SC_FOOD_AGI] = SI_FOOD_AGI;
- StatusIconChangeTable[SC_FOOD_VIT] = SI_FOOD_VIT;
- StatusIconChangeTable[SC_FOOD_INT] = SI_FOOD_INT;
- StatusIconChangeTable[SC_FOOD_DEX] = SI_FOOD_DEX;
- StatusIconChangeTable[SC_FOOD_LUK] = SI_FOOD_LUK;
- StatusIconChangeTable[SC_FOOD_BASICAVOIDANCE]= SI_FOOD_BASICAVOIDANCE;
- StatusIconChangeTable[SC_FOOD_BASICHIT] = SI_FOOD_BASICHIT;
- StatusIconChangeTable[SC_MANU_ATK] = SI_MANU_ATK;
- StatusIconChangeTable[SC_MANU_DEF] = SI_MANU_DEF;
- StatusIconChangeTable[SC_SPL_ATK] = SI_SPL_ATK;
- StatusIconChangeTable[SC_SPL_DEF] = SI_SPL_DEF;
- StatusIconChangeTable[SC_MANU_MATK] = SI_MANU_MATK;
- StatusIconChangeTable[SC_SPL_MATK] = SI_SPL_MATK;
- StatusIconChangeTable[SC_PLUSATTACKPOWER] = SI_PLUSATTACKPOWER;
- StatusIconChangeTable[SC_PLUSMAGICPOWER] = SI_PLUSMAGICPOWER;
+ status->Skill2SCTable[SL_ALCHEMIST] = (sc_type)MAPID_ALCHEMIST,
+ status->Skill2SCTable[SL_MONK] = (sc_type)MAPID_MONK,
+ status->Skill2SCTable[SL_STAR] = (sc_type)MAPID_STAR_GLADIATOR,
+ status->Skill2SCTable[SL_SAGE] = (sc_type)MAPID_SAGE,
+ status->Skill2SCTable[SL_CRUSADER] = (sc_type)MAPID_CRUSADER,
+ status->Skill2SCTable[SL_SUPERNOVICE] = (sc_type)MAPID_SUPER_NOVICE,
+ status->Skill2SCTable[SL_KNIGHT] = (sc_type)MAPID_KNIGHT,
+ status->Skill2SCTable[SL_WIZARD] = (sc_type)MAPID_WIZARD,
+ status->Skill2SCTable[SL_PRIEST] = (sc_type)MAPID_PRIEST,
+ status->Skill2SCTable[SL_BARDDANCER] = (sc_type)MAPID_BARDDANCER,
+ status->Skill2SCTable[SL_ROGUE] = (sc_type)MAPID_ROGUE,
+ status->Skill2SCTable[SL_ASSASIN] = (sc_type)MAPID_ASSASSIN,
+ status->Skill2SCTable[SL_BLACKSMITH] = (sc_type)MAPID_BLACKSMITH,
+ status->Skill2SCTable[SL_HUNTER] = (sc_type)MAPID_HUNTER,
+ status->Skill2SCTable[SL_SOULLINKER] = (sc_type)MAPID_SOUL_LINKER,
+
+ //Status that don't have a skill associated.
+ status->IconChangeTable[SC_WEIGHTOVER50] = SI_WEIGHTOVER50;
+ status->IconChangeTable[SC_WEIGHTOVER90] = SI_WEIGHTOVER90;
+ status->IconChangeTable[SC_ATTHASTE_POTION1] = SI_ATTHASTE_POTION1;
+ status->IconChangeTable[SC_ATTHASTE_POTION2] = SI_ATTHASTE_POTION2;
+ status->IconChangeTable[SC_ATTHASTE_POTION3] = SI_ATTHASTE_POTION3;
+ status->IconChangeTable[SC_ATTHASTE_INFINITY] = SI_ATTHASTE_INFINITY;
+ status->IconChangeTable[SC_MOVHASTE_HORSE] = SI_MOVHASTE_HORSE;
+ status->IconChangeTable[SC_MOVHASTE_INFINITY] = SI_MOVHASTE_INFINITY;
+ status->IconChangeTable[SC_CHASEWALK2] = SI_INCSTR;
+ status->IconChangeTable[SC_MIRACLE] = SI_SOULLINK;
+ status->IconChangeTable[SC_CLAIRVOYANCE] = SI_CLAIRVOYANCE;
+ status->IconChangeTable[SC_FOOD_STR] = SI_FOOD_STR;
+ status->IconChangeTable[SC_FOOD_AGI] = SI_FOOD_AGI;
+ status->IconChangeTable[SC_FOOD_VIT] = SI_FOOD_VIT;
+ status->IconChangeTable[SC_FOOD_INT] = SI_FOOD_INT;
+ status->IconChangeTable[SC_FOOD_DEX] = SI_FOOD_DEX;
+ status->IconChangeTable[SC_FOOD_LUK] = SI_FOOD_LUK;
+ status->IconChangeTable[SC_FOOD_BASICAVOIDANCE]= SI_FOOD_BASICAVOIDANCE;
+ status->IconChangeTable[SC_FOOD_BASICHIT] = SI_FOOD_BASICHIT;
+ status->IconChangeTable[SC_MANU_ATK] = SI_MANU_ATK;
+ status->IconChangeTable[SC_MANU_DEF] = SI_MANU_DEF;
+ status->IconChangeTable[SC_SPL_ATK] = SI_SPL_ATK;
+ status->IconChangeTable[SC_SPL_DEF] = SI_SPL_DEF;
+ status->IconChangeTable[SC_MANU_MATK] = SI_MANU_MATK;
+ status->IconChangeTable[SC_SPL_MATK] = SI_SPL_MATK;
+ status->IconChangeTable[SC_PLUSATTACKPOWER] = SI_PLUSATTACKPOWER;
+ status->IconChangeTable[SC_PLUSMAGICPOWER] = SI_PLUSMAGICPOWER;
//Cash Items
- StatusIconChangeTable[SC_FOOD_STR_CASH] = SI_FOOD_STR_CASH;
- StatusIconChangeTable[SC_FOOD_AGI_CASH] = SI_FOOD_AGI_CASH;
- StatusIconChangeTable[SC_FOOD_VIT_CASH] = SI_FOOD_VIT_CASH;
- StatusIconChangeTable[SC_FOOD_DEX_CASH] = SI_FOOD_DEX_CASH;
- StatusIconChangeTable[SC_FOOD_INT_CASH] = SI_FOOD_INT_CASH;
- StatusIconChangeTable[SC_FOOD_LUK_CASH] = SI_FOOD_LUK_CASH;
- StatusIconChangeTable[SC_CASH_PLUSEXP] = SI_CASH_PLUSEXP;
- StatusIconChangeTable[SC_CASH_RECEIVEITEM] = SI_CASH_RECEIVEITEM;
- StatusIconChangeTable[SC_CASH_PLUSONLYJOBEXP] = SI_CASH_PLUSONLYJOBEXP;
- StatusIconChangeTable[SC_CASH_DEATHPENALTY] = SI_CASH_DEATHPENALTY;
- StatusIconChangeTable[SC_CASH_BOSS_ALARM] = SI_CASH_BOSS_ALARM;
- StatusIconChangeTable[SC_PROTECT_DEF] = SI_PROTECT_DEF;
- StatusIconChangeTable[SC_PROTECT_MDEF] = SI_PROTECT_MDEF;
- StatusIconChangeTable[SC_CRITICALPERCENT] = SI_CRITICALPERCENT;
- StatusIconChangeTable[SC_PLUSAVOIDVALUE] = SI_PLUSAVOIDVALUE;
- StatusIconChangeTable[SC_HEALPLUS] = SI_HEALPLUS;
- StatusIconChangeTable[SC_S_LIFEPOTION] = SI_S_LIFEPOTION;
- StatusIconChangeTable[SC_L_LIFEPOTION] = SI_L_LIFEPOTION;
- StatusIconChangeTable[SC_ATKER_BLOOD] = SI_ATKER_BLOOD;
- StatusIconChangeTable[SC_TARGET_BLOOD] = SI_TARGET_BLOOD;
+ status->IconChangeTable[SC_FOOD_STR_CASH] = SI_FOOD_STR_CASH;
+ status->IconChangeTable[SC_FOOD_AGI_CASH] = SI_FOOD_AGI_CASH;
+ status->IconChangeTable[SC_FOOD_VIT_CASH] = SI_FOOD_VIT_CASH;
+ status->IconChangeTable[SC_FOOD_DEX_CASH] = SI_FOOD_DEX_CASH;
+ status->IconChangeTable[SC_FOOD_INT_CASH] = SI_FOOD_INT_CASH;
+ status->IconChangeTable[SC_FOOD_LUK_CASH] = SI_FOOD_LUK_CASH;
+ status->IconChangeTable[SC_CASH_PLUSEXP] = SI_CASH_PLUSEXP;
+ status->IconChangeTable[SC_CASH_RECEIVEITEM] = SI_CASH_RECEIVEITEM;
+ status->IconChangeTable[SC_CASH_PLUSONLYJOBEXP] = SI_CASH_PLUSONLYJOBEXP;
+ status->IconChangeTable[SC_CASH_DEATHPENALTY] = SI_CASH_DEATHPENALTY;
+ status->IconChangeTable[SC_CASH_BOSS_ALARM] = SI_CASH_BOSS_ALARM;
+ status->IconChangeTable[SC_PROTECT_DEF] = SI_PROTECT_DEF;
+ status->IconChangeTable[SC_PROTECT_MDEF] = SI_PROTECT_MDEF;
+ status->IconChangeTable[SC_CRITICALPERCENT] = SI_CRITICALPERCENT;
+ status->IconChangeTable[SC_PLUSAVOIDVALUE] = SI_PLUSAVOIDVALUE;
+ status->IconChangeTable[SC_HEALPLUS] = SI_HEALPLUS;
+ status->IconChangeTable[SC_S_LIFEPOTION] = SI_S_LIFEPOTION;
+ status->IconChangeTable[SC_L_LIFEPOTION] = SI_L_LIFEPOTION;
+ status->IconChangeTable[SC_ATKER_BLOOD] = SI_ATKER_BLOOD;
+ status->IconChangeTable[SC_TARGET_BLOOD] = SI_TARGET_BLOOD;
// Mercenary Bonus Effects
- StatusIconChangeTable[SC_MER_FLEE] = SI_MER_FLEE;
- StatusIconChangeTable[SC_MER_ATK] = SI_MER_ATK;
- StatusIconChangeTable[SC_MER_HP] = SI_MER_HP;
- StatusIconChangeTable[SC_MER_SP] = SI_MER_SP;
- StatusIconChangeTable[SC_MER_HIT] = SI_MER_HIT;
+ status->IconChangeTable[SC_MER_FLEE] = SI_MER_FLEE;
+ status->IconChangeTable[SC_MER_ATK] = SI_MER_ATK;
+ status->IconChangeTable[SC_MER_HP] = SI_MER_HP;
+ status->IconChangeTable[SC_MER_SP] = SI_MER_SP;
+ status->IconChangeTable[SC_MER_HIT] = SI_MER_HIT;
// Warlock Spheres
- StatusIconChangeTable[SC_SUMMON1] = SI_SPHERE_1;
- StatusIconChangeTable[SC_SUMMON2] = SI_SPHERE_2;
- StatusIconChangeTable[SC_SUMMON3] = SI_SPHERE_3;
- StatusIconChangeTable[SC_SUMMON4] = SI_SPHERE_4;
- StatusIconChangeTable[SC_SUMMON5] = SI_SPHERE_5;
+ status->IconChangeTable[SC_SUMMON1] = SI_SPHERE_1;
+ status->IconChangeTable[SC_SUMMON2] = SI_SPHERE_2;
+ status->IconChangeTable[SC_SUMMON3] = SI_SPHERE_3;
+ status->IconChangeTable[SC_SUMMON4] = SI_SPHERE_4;
+ status->IconChangeTable[SC_SUMMON5] = SI_SPHERE_5;
// Warlock Preserved spells
- StatusIconChangeTable[SC_SPELLBOOK1] = SI_SPELLBOOK1;
- StatusIconChangeTable[SC_SPELLBOOK2] = SI_SPELLBOOK2;
- StatusIconChangeTable[SC_SPELLBOOK3] = SI_SPELLBOOK3;
- StatusIconChangeTable[SC_SPELLBOOK4] = SI_SPELLBOOK4;
- StatusIconChangeTable[SC_SPELLBOOK5] = SI_SPELLBOOK5;
- StatusIconChangeTable[SC_SPELLBOOK6] = SI_SPELLBOOK6;
- StatusIconChangeTable[SC_SPELLBOOK7] = SI_SPELLBOOK7;
-
- StatusIconChangeTable[SC_NEUTRALBARRIER_MASTER] = SI_NEUTRALBARRIER_MASTER;
- StatusIconChangeTable[SC_STEALTHFIELD_MASTER] = SI_STEALTHFIELD_MASTER;
- StatusIconChangeTable[SC_OVERHEAT] = SI_OVERHEAT;
- StatusIconChangeTable[SC_OVERHEAT_LIMITPOINT] = SI_OVERHEAT_LIMITPOINT;
-
- StatusIconChangeTable[SC_HALLUCINATIONWALK_POSTDELAY] = SI_HALLUCINATIONWALK_POSTDELAY;
- StatusIconChangeTable[SC_TOXIN] = SI_TOXIN;
- StatusIconChangeTable[SC_PARALYSE] = SI_PARALYSE;
- StatusIconChangeTable[SC_VENOMBLEED] = SI_VENOMBLEED;
- StatusIconChangeTable[SC_MAGICMUSHROOM] = SI_MAGICMUSHROOM;
- StatusIconChangeTable[SC_DEATHHURT] = SI_DEATHHURT;
- StatusIconChangeTable[SC_PYREXIA] = SI_PYREXIA;
- StatusIconChangeTable[SC_OBLIVIONCURSE] = SI_OBLIVIONCURSE;
- StatusIconChangeTable[SC_LEECHESEND] = SI_LEECHESEND;
-
- StatusIconChangeTable[SC_SHIELDSPELL_DEF] = SI_SHIELDSPELL_DEF;
- StatusIconChangeTable[SC_SHIELDSPELL_MDEF] = SI_SHIELDSPELL_MDEF;
- StatusIconChangeTable[SC_SHIELDSPELL_REF] = SI_SHIELDSPELL_REF;
- StatusIconChangeTable[SC_BANDING_DEFENCE] = SI_BANDING_DEFENCE;
-
- StatusIconChangeTable[SC_GLOOMYDAY_SK] = SI_GLOOMYDAY;
-
- StatusIconChangeTable[SC_CURSEDCIRCLE_ATKER] = SI_CURSEDCIRCLE_ATKER;
-
- StatusIconChangeTable[SC_STOMACHACHE] = SI_STOMACHACHE;
- StatusIconChangeTable[SC_MYSTERIOUS_POWDER] = SI_MYSTERIOUS_POWDER;
- StatusIconChangeTable[SC_MELON_BOMB] = SI_MELON_BOMB;
- StatusIconChangeTable[SC_BANANA_BOMB] = SI_BANANA_BOMB;
- StatusIconChangeTable[SC_BANANA_BOMB_SITDOWN_POSTDELAY] = SI_BANANA_BOMB_SITDOWN_POSTDELAY;
+ status->IconChangeTable[SC_SPELLBOOK1] = SI_SPELLBOOK1;
+ status->IconChangeTable[SC_SPELLBOOK2] = SI_SPELLBOOK2;
+ status->IconChangeTable[SC_SPELLBOOK3] = SI_SPELLBOOK3;
+ status->IconChangeTable[SC_SPELLBOOK4] = SI_SPELLBOOK4;
+ status->IconChangeTable[SC_SPELLBOOK5] = SI_SPELLBOOK5;
+ status->IconChangeTable[SC_SPELLBOOK6] = SI_SPELLBOOK6;
+ status->IconChangeTable[SC_SPELLBOOK7] = SI_SPELLBOOK7;
+
+ status->IconChangeTable[SC_NEUTRALBARRIER_MASTER] = SI_NEUTRALBARRIER_MASTER;
+ status->IconChangeTable[SC_STEALTHFIELD_MASTER] = SI_STEALTHFIELD_MASTER;
+ status->IconChangeTable[SC_OVERHEAT] = SI_OVERHEAT;
+ status->IconChangeTable[SC_OVERHEAT_LIMITPOINT] = SI_OVERHEAT_LIMITPOINT;
+
+ status->IconChangeTable[SC_HALLUCINATIONWALK_POSTDELAY] = SI_HALLUCINATIONWALK_POSTDELAY;
+ status->IconChangeTable[SC_TOXIN] = SI_TOXIN;
+ status->IconChangeTable[SC_PARALYSE] = SI_PARALYSE;
+ status->IconChangeTable[SC_VENOMBLEED] = SI_VENOMBLEED;
+ status->IconChangeTable[SC_MAGICMUSHROOM] = SI_MAGICMUSHROOM;
+ status->IconChangeTable[SC_DEATHHURT] = SI_DEATHHURT;
+ status->IconChangeTable[SC_PYREXIA] = SI_PYREXIA;
+ status->IconChangeTable[SC_OBLIVIONCURSE] = SI_OBLIVIONCURSE;
+ status->IconChangeTable[SC_LEECHESEND] = SI_LEECHESEND;
+
+ status->IconChangeTable[SC_SHIELDSPELL_DEF] = SI_SHIELDSPELL_DEF;
+ status->IconChangeTable[SC_SHIELDSPELL_MDEF] = SI_SHIELDSPELL_MDEF;
+ status->IconChangeTable[SC_SHIELDSPELL_REF] = SI_SHIELDSPELL_REF;
+ status->IconChangeTable[SC_BANDING_DEFENCE] = SI_BANDING_DEFENCE;
+
+ status->IconChangeTable[SC_GLOOMYDAY_SK] = SI_GLOOMYDAY;
+
+ status->IconChangeTable[SC_CURSEDCIRCLE_ATKER] = SI_CURSEDCIRCLE_ATKER;
+
+ status->IconChangeTable[SC_STOMACHACHE] = SI_STOMACHACHE;
+ status->IconChangeTable[SC_MYSTERIOUS_POWDER] = SI_MYSTERIOUS_POWDER;
+ status->IconChangeTable[SC_MELON_BOMB] = SI_MELON_BOMB;
+ status->IconChangeTable[SC_BANANA_BOMB] = SI_BANANA_BOMB;
+ status->IconChangeTable[SC_BANANA_BOMB_SITDOWN_POSTDELAY] = SI_BANANA_BOMB_SITDOWN_POSTDELAY;
//Genetics New Food Items Status Icons
- StatusIconChangeTable[SC_SAVAGE_STEAK] = SI_SAVAGE_STEAK;
- StatusIconChangeTable[SC_COCKTAIL_WARG_BLOOD] = SI_COCKTAIL_WARG_BLOOD;
- StatusIconChangeTable[SC_MINOR_BBQ] = SI_MINOR_BBQ;
- StatusIconChangeTable[SC_SIROMA_ICE_TEA] = SI_SIROMA_ICE_TEA;
- StatusIconChangeTable[SC_DROCERA_HERB_STEAMED] = SI_DROCERA_HERB_STEAMED;
- StatusIconChangeTable[SC_PUTTI_TAILS_NOODLES] = SI_PUTTI_TAILS_NOODLES;
-
- StatusIconChangeTable[SC_BOOST500] |= SI_BOOST500;
- StatusIconChangeTable[SC_FULL_SWING_K] |= SI_FULL_SWING_K;
- StatusIconChangeTable[SC_MANA_PLUS] |= SI_MANA_PLUS;
- StatusIconChangeTable[SC_MUSTLE_M] |= SI_MUSTLE_M;
- StatusIconChangeTable[SC_LIFE_FORCE_F] |= SI_LIFE_FORCE_F;
- StatusIconChangeTable[SC_EXTRACT_WHITE_POTION_Z] |= SI_EXTRACT_WHITE_POTION_Z;
- StatusIconChangeTable[SC_VITATA_500] |= SI_VITATA_500;
- StatusIconChangeTable[SC_EXTRACT_SALAMINE_JUICE] |= SI_EXTRACT_SALAMINE_JUICE;
+ status->IconChangeTable[SC_SAVAGE_STEAK] = SI_SAVAGE_STEAK;
+ status->IconChangeTable[SC_COCKTAIL_WARG_BLOOD] = SI_COCKTAIL_WARG_BLOOD;
+ status->IconChangeTable[SC_MINOR_BBQ] = SI_MINOR_BBQ;
+ status->IconChangeTable[SC_SIROMA_ICE_TEA] = SI_SIROMA_ICE_TEA;
+ status->IconChangeTable[SC_DROCERA_HERB_STEAMED] = SI_DROCERA_HERB_STEAMED;
+ status->IconChangeTable[SC_PUTTI_TAILS_NOODLES] = SI_PUTTI_TAILS_NOODLES;
+
+ status->IconChangeTable[SC_BOOST500] |= SI_BOOST500;
+ status->IconChangeTable[SC_FULL_SWING_K] |= SI_FULL_SWING_K;
+ status->IconChangeTable[SC_MANA_PLUS] |= SI_MANA_PLUS;
+ status->IconChangeTable[SC_MUSTLE_M] |= SI_MUSTLE_M;
+ status->IconChangeTable[SC_LIFE_FORCE_F] |= SI_LIFE_FORCE_F;
+ status->IconChangeTable[SC_EXTRACT_WHITE_POTION_Z] |= SI_EXTRACT_WHITE_POTION_Z;
+ status->IconChangeTable[SC_VITATA_500] |= SI_VITATA_500;
+ status->IconChangeTable[SC_EXTRACT_SALAMINE_JUICE] |= SI_EXTRACT_SALAMINE_JUICE;
// Elemental Spirit's 'side' status change icons.
- StatusIconChangeTable[SC_CIRCLE_OF_FIRE] = SI_CIRCLE_OF_FIRE;
- StatusIconChangeTable[SC_FIRE_CLOAK] = SI_FIRE_CLOAK;
- StatusIconChangeTable[SC_WATER_SCREEN] = SI_WATER_SCREEN;
- StatusIconChangeTable[SC_WATER_DROP] = SI_WATER_DROP;
- StatusIconChangeTable[SC_WIND_STEP] = SI_WIND_STEP;
- StatusIconChangeTable[SC_WIND_CURTAIN] = SI_WIND_CURTAIN;
- StatusIconChangeTable[SC_SOLID_SKIN] = SI_SOLID_SKIN;
- StatusIconChangeTable[SC_STONE_SHIELD] = SI_STONE_SHIELD;
- StatusIconChangeTable[SC_PYROTECHNIC] = SI_PYROTECHNIC;
- StatusIconChangeTable[SC_HEATER] = SI_HEATER;
- StatusIconChangeTable[SC_TROPIC] = SI_TROPIC;
- StatusIconChangeTable[SC_AQUAPLAY] = SI_AQUAPLAY;
- StatusIconChangeTable[SC_COOLER] = SI_COOLER;
- StatusIconChangeTable[SC_CHILLY_AIR] = SI_CHILLY_AIR;
- StatusIconChangeTable[SC_GUST] = SI_GUST;
- StatusIconChangeTable[SC_BLAST] = SI_BLAST;
- StatusIconChangeTable[SC_WILD_STORM] = SI_WILD_STORM;
- StatusIconChangeTable[SC_PETROLOGY] = SI_PETROLOGY;
- StatusIconChangeTable[SC_CURSED_SOIL] = SI_CURSED_SOIL;
- StatusIconChangeTable[SC_UPHEAVAL] = SI_UPHEAVAL;
- StatusIconChangeTable[SC_PUSH_CART] = SI_ON_PUSH_CART;
- StatusIconChangeTable[SC_REBOUND] = SI_REBOUND;
- StatusIconChangeTable[SC_ALL_RIDING] = SI_ALL_RIDING;
- StatusIconChangeTable[SC_MONSTER_TRANSFORM] = SI_MONSTER_TRANSFORM;
+ status->IconChangeTable[SC_CIRCLE_OF_FIRE] = SI_CIRCLE_OF_FIRE;
+ status->IconChangeTable[SC_FIRE_CLOAK] = SI_FIRE_CLOAK;
+ status->IconChangeTable[SC_WATER_SCREEN] = SI_WATER_SCREEN;
+ status->IconChangeTable[SC_WATER_DROP] = SI_WATER_DROP;
+ status->IconChangeTable[SC_WIND_STEP] = SI_WIND_STEP;
+ status->IconChangeTable[SC_WIND_CURTAIN] = SI_WIND_CURTAIN;
+ status->IconChangeTable[SC_SOLID_SKIN] = SI_SOLID_SKIN;
+ status->IconChangeTable[SC_STONE_SHIELD] = SI_STONE_SHIELD;
+ status->IconChangeTable[SC_PYROTECHNIC] = SI_PYROTECHNIC;
+ status->IconChangeTable[SC_HEATER] = SI_HEATER;
+ status->IconChangeTable[SC_TROPIC] = SI_TROPIC;
+ status->IconChangeTable[SC_AQUAPLAY] = SI_AQUAPLAY;
+ status->IconChangeTable[SC_COOLER] = SI_COOLER;
+ status->IconChangeTable[SC_CHILLY_AIR] = SI_CHILLY_AIR;
+ status->IconChangeTable[SC_GUST] = SI_GUST;
+ status->IconChangeTable[SC_BLAST] = SI_BLAST;
+ status->IconChangeTable[SC_WILD_STORM] = SI_WILD_STORM;
+ status->IconChangeTable[SC_PETROLOGY] = SI_PETROLOGY;
+ status->IconChangeTable[SC_CURSED_SOIL] = SI_CURSED_SOIL;
+ status->IconChangeTable[SC_UPHEAVAL] = SI_UPHEAVAL;
+ status->IconChangeTable[SC_PUSH_CART] = SI_ON_PUSH_CART;
+ status->IconChangeTable[SC_REBOUND] = SI_REBOUND;
+ status->IconChangeTable[SC_ALL_RIDING] = SI_ALL_RIDING;
+ status->IconChangeTable[SC_MONSTER_TRANSFORM] = SI_MONSTER_TRANSFORM;
//Other SC which are not necessarily associated to skills.
- StatusChangeFlagTable[SC_ATTHASTE_POTION1] = SCB_ASPD;
- StatusChangeFlagTable[SC_ATTHASTE_POTION2] = SCB_ASPD;
- StatusChangeFlagTable[SC_ATTHASTE_POTION3] = SCB_ASPD;
- StatusChangeFlagTable[SC_ATTHASTE_INFINITY] = SCB_ASPD;
- StatusChangeFlagTable[SC_MOVHASTE_HORSE] = SCB_SPEED;
- StatusChangeFlagTable[SC_MOVHASTE_INFINITY] = SCB_SPEED;
- StatusChangeFlagTable[SC_PLUSATTACKPOWER] = SCB_BATK;
- StatusChangeFlagTable[SC_PLUSMAGICPOWER] = SCB_MATK;
- StatusChangeFlagTable[SC_INCALLSTATUS] |= SCB_STR|SCB_AGI|SCB_VIT|SCB_INT|SCB_DEX|SCB_LUK;
- StatusChangeFlagTable[SC_CHASEWALK2] |= SCB_STR;
- StatusChangeFlagTable[SC_INCAGI] |= SCB_AGI;
- StatusChangeFlagTable[SC_INCVIT] |= SCB_VIT;
- StatusChangeFlagTable[SC_INCINT] |= SCB_INT;
- StatusChangeFlagTable[SC_INCDEX] |= SCB_DEX;
- StatusChangeFlagTable[SC_INCLUK] |= SCB_LUK;
- StatusChangeFlagTable[SC_INCHIT] |= SCB_HIT;
- StatusChangeFlagTable[SC_INCHITRATE] |= SCB_HIT;
- StatusChangeFlagTable[SC_INCFLEE] |= SCB_FLEE;
- StatusChangeFlagTable[SC_INCFLEERATE] |= SCB_FLEE;
- StatusChangeFlagTable[SC_CRITICALPERCENT] |= SCB_CRI;
- StatusChangeFlagTable[SC_INCASPDRATE] |= SCB_ASPD;
- StatusChangeFlagTable[SC_PLUSAVOIDVALUE] |= SCB_FLEE2;
- StatusChangeFlagTable[SC_INCMHPRATE] |= SCB_MAXHP;
- StatusChangeFlagTable[SC_INCMSPRATE] |= SCB_MAXSP;
- StatusChangeFlagTable[SC_INCMHP] |= SCB_MAXHP;
- StatusChangeFlagTable[SC_INCMSP] |= SCB_MAXSP;
- StatusChangeFlagTable[SC_INCATKRATE] |= SCB_BATK|SCB_WATK;
- StatusChangeFlagTable[SC_INCMATKRATE] |= SCB_MATK;
- StatusChangeFlagTable[SC_INCDEFRATE] |= SCB_DEF;
- StatusChangeFlagTable[SC_FOOD_STR] |= SCB_STR;
- StatusChangeFlagTable[SC_FOOD_AGI] |= SCB_AGI;
- StatusChangeFlagTable[SC_FOOD_VIT] |= SCB_VIT;
- StatusChangeFlagTable[SC_FOOD_INT] |= SCB_INT;
- StatusChangeFlagTable[SC_FOOD_DEX] |= SCB_DEX;
- StatusChangeFlagTable[SC_FOOD_LUK] |= SCB_LUK;
- StatusChangeFlagTable[SC_FOOD_BASICHIT] |= SCB_HIT;
- StatusChangeFlagTable[SC_FOOD_BASICAVOIDANCE] |= SCB_FLEE;
- StatusChangeFlagTable[SC_BATKFOOD] |= SCB_BATK;
- StatusChangeFlagTable[SC_WATKFOOD] |= SCB_WATK;
- StatusChangeFlagTable[SC_MATKFOOD] |= SCB_MATK;
- StatusChangeFlagTable[SC_ARMORPROPERTY] |= SCB_ALL;
- StatusChangeFlagTable[SC_ARMOR_RESIST] |= SCB_ALL;
- StatusChangeFlagTable[SC_ATKER_BLOOD] |= SCB_ALL;
- StatusChangeFlagTable[SC_WALKSPEED] |= SCB_SPEED;
- StatusChangeFlagTable[SC_ITEMSCRIPT] |= SCB_ALL;
+ status->ChangeFlagTable[SC_ATTHASTE_POTION1] = SCB_ASPD;
+ status->ChangeFlagTable[SC_ATTHASTE_POTION2] = SCB_ASPD;
+ status->ChangeFlagTable[SC_ATTHASTE_POTION3] = SCB_ASPD;
+ status->ChangeFlagTable[SC_ATTHASTE_INFINITY] = SCB_ASPD;
+ status->ChangeFlagTable[SC_MOVHASTE_HORSE] = SCB_SPEED;
+ status->ChangeFlagTable[SC_MOVHASTE_INFINITY] = SCB_SPEED;
+ status->ChangeFlagTable[SC_PLUSATTACKPOWER] = SCB_BATK;
+ status->ChangeFlagTable[SC_PLUSMAGICPOWER] = SCB_MATK;
+ status->ChangeFlagTable[SC_INCALLSTATUS] |= SCB_STR|SCB_AGI|SCB_VIT|SCB_INT|SCB_DEX|SCB_LUK;
+ status->ChangeFlagTable[SC_CHASEWALK2] |= SCB_STR;
+ status->ChangeFlagTable[SC_INCAGI] |= SCB_AGI;
+ status->ChangeFlagTable[SC_INCVIT] |= SCB_VIT;
+ status->ChangeFlagTable[SC_INCINT] |= SCB_INT;
+ status->ChangeFlagTable[SC_INCDEX] |= SCB_DEX;
+ status->ChangeFlagTable[SC_INCLUK] |= SCB_LUK;
+ status->ChangeFlagTable[SC_INCHIT] |= SCB_HIT;
+ status->ChangeFlagTable[SC_INCHITRATE] |= SCB_HIT;
+ status->ChangeFlagTable[SC_INCFLEE] |= SCB_FLEE;
+ status->ChangeFlagTable[SC_INCFLEERATE] |= SCB_FLEE;
+ status->ChangeFlagTable[SC_CRITICALPERCENT] |= SCB_CRI;
+ status->ChangeFlagTable[SC_INCASPDRATE] |= SCB_ASPD;
+ status->ChangeFlagTable[SC_PLUSAVOIDVALUE] |= SCB_FLEE2;
+ status->ChangeFlagTable[SC_INCMHPRATE] |= SCB_MAXHP;
+ status->ChangeFlagTable[SC_INCMSPRATE] |= SCB_MAXSP;
+ status->ChangeFlagTable[SC_INCMHP] |= SCB_MAXHP;
+ status->ChangeFlagTable[SC_INCMSP] |= SCB_MAXSP;
+ status->ChangeFlagTable[SC_INCATKRATE] |= SCB_BATK|SCB_WATK;
+ status->ChangeFlagTable[SC_INCMATKRATE] |= SCB_MATK;
+ status->ChangeFlagTable[SC_INCDEFRATE] |= SCB_DEF;
+ status->ChangeFlagTable[SC_FOOD_STR] |= SCB_STR;
+ status->ChangeFlagTable[SC_FOOD_AGI] |= SCB_AGI;
+ status->ChangeFlagTable[SC_FOOD_VIT] |= SCB_VIT;
+ status->ChangeFlagTable[SC_FOOD_INT] |= SCB_INT;
+ status->ChangeFlagTable[SC_FOOD_DEX] |= SCB_DEX;
+ status->ChangeFlagTable[SC_FOOD_LUK] |= SCB_LUK;
+ status->ChangeFlagTable[SC_FOOD_BASICHIT] |= SCB_HIT;
+ status->ChangeFlagTable[SC_FOOD_BASICAVOIDANCE] |= SCB_FLEE;
+ status->ChangeFlagTable[SC_BATKFOOD] |= SCB_BATK;
+ status->ChangeFlagTable[SC_WATKFOOD] |= SCB_WATK;
+ status->ChangeFlagTable[SC_MATKFOOD] |= SCB_MATK;
+ status->ChangeFlagTable[SC_ARMORPROPERTY] |= SCB_ALL;
+ status->ChangeFlagTable[SC_ARMOR_RESIST] |= SCB_ALL;
+ status->ChangeFlagTable[SC_ATKER_BLOOD] |= SCB_ALL;
+ status->ChangeFlagTable[SC_WALKSPEED] |= SCB_SPEED;
+ status->ChangeFlagTable[SC_ITEMSCRIPT] |= SCB_ALL;
// Cash Items
- StatusChangeFlagTable[SC_FOOD_STR_CASH] = SCB_STR;
- StatusChangeFlagTable[SC_FOOD_AGI_CASH] = SCB_AGI;
- StatusChangeFlagTable[SC_FOOD_VIT_CASH] = SCB_VIT;
- StatusChangeFlagTable[SC_FOOD_DEX_CASH] = SCB_DEX;
- StatusChangeFlagTable[SC_FOOD_INT_CASH] = SCB_INT;
- StatusChangeFlagTable[SC_FOOD_LUK_CASH] = SCB_LUK;
+ status->ChangeFlagTable[SC_FOOD_STR_CASH] = SCB_STR;
+ status->ChangeFlagTable[SC_FOOD_AGI_CASH] = SCB_AGI;
+ status->ChangeFlagTable[SC_FOOD_VIT_CASH] = SCB_VIT;
+ status->ChangeFlagTable[SC_FOOD_DEX_CASH] = SCB_DEX;
+ status->ChangeFlagTable[SC_FOOD_INT_CASH] = SCB_INT;
+ status->ChangeFlagTable[SC_FOOD_LUK_CASH] = SCB_LUK;
// Mercenary Bonus Effects
- StatusChangeFlagTable[SC_MER_FLEE] |= SCB_FLEE;
- StatusChangeFlagTable[SC_MER_ATK] |= SCB_WATK;
- StatusChangeFlagTable[SC_MER_HP] |= SCB_MAXHP;
- StatusChangeFlagTable[SC_MER_SP] |= SCB_MAXSP;
- StatusChangeFlagTable[SC_MER_HIT] |= SCB_HIT;
+ status->ChangeFlagTable[SC_MER_FLEE] |= SCB_FLEE;
+ status->ChangeFlagTable[SC_MER_ATK] |= SCB_WATK;
+ status->ChangeFlagTable[SC_MER_HP] |= SCB_MAXHP;
+ status->ChangeFlagTable[SC_MER_SP] |= SCB_MAXSP;
+ status->ChangeFlagTable[SC_MER_HIT] |= SCB_HIT;
// Guillotine Cross Poison Effects
- StatusChangeFlagTable[SC_PARALYSE] |= SCB_ASPD|SCB_FLEE|SCB_SPEED;
- StatusChangeFlagTable[SC_DEATHHURT] |= SCB_REGEN;
- StatusChangeFlagTable[SC_VENOMBLEED] |= SCB_MAXHP;
- StatusChangeFlagTable[SC_OBLIVIONCURSE] |= SCB_REGEN;
-
- StatusChangeFlagTable[SC_SAVAGE_STEAK] |= SCB_STR;
- StatusChangeFlagTable[SC_COCKTAIL_WARG_BLOOD] |= SCB_INT;
- StatusChangeFlagTable[SC_MINOR_BBQ] |= SCB_VIT;
- StatusChangeFlagTable[SC_SIROMA_ICE_TEA] |= SCB_DEX;
- StatusChangeFlagTable[SC_DROCERA_HERB_STEAMED] |= SCB_AGI;
- StatusChangeFlagTable[SC_PUTTI_TAILS_NOODLES] |= SCB_LUK;
- StatusChangeFlagTable[SC_BOOST500] |= SCB_ASPD;
- StatusChangeFlagTable[SC_FULL_SWING_K] |= SCB_BATK;
- StatusChangeFlagTable[SC_MANA_PLUS] |= SCB_MATK;
- StatusChangeFlagTable[SC_MUSTLE_M] |= SCB_MAXHP;
- StatusChangeFlagTable[SC_LIFE_FORCE_F] |= SCB_MAXSP;
- StatusChangeFlagTable[SC_EXTRACT_WHITE_POTION_Z] |= SCB_REGEN;
- StatusChangeFlagTable[SC_VITATA_500] |= SCB_REGEN;
- StatusChangeFlagTable[SC_EXTRACT_SALAMINE_JUICE] |= SCB_ASPD;
- StatusChangeFlagTable[SC_REBOUND] |= SCB_SPEED|SCB_REGEN;
-
- StatusChangeFlagTable[SC_ALL_RIDING] = SCB_SPEED;
- StatusChangeFlagTable[SC_WEDDING] = SCB_SPEED;
-
-
- /* StatusDisplayType Table [Ind/Hercules] */
- StatusDisplayType[SC_ALL_RIDING] = true;
- StatusDisplayType[SC_PUSH_CART] = true;
- StatusDisplayType[SC_SUMMON1] = true;
- StatusDisplayType[SC_SUMMON2] = true;
- StatusDisplayType[SC_SUMMON3] = true;
- StatusDisplayType[SC_SUMMON4] = true;
- StatusDisplayType[SC_SUMMON5] = true;
- StatusDisplayType[SC_CAMOUFLAGE] = true;
- StatusDisplayType[SC_DUPLELIGHT] = true;
- StatusDisplayType[SC_ORATIO] = true;
- StatusDisplayType[SC_FROSTMISTY] = true;
- StatusDisplayType[SC_VENOMIMPRESS] = true;
- StatusDisplayType[SC_HALLUCINATIONWALK] = true;
- StatusDisplayType[SC_ROLLINGCUTTER] = true;
- StatusDisplayType[SC_BANDING] = true;
- StatusDisplayType[SC_COLD] = true;
- StatusDisplayType[SC_DEEP_SLEEP] = true;
- StatusDisplayType[SC_CURSEDCIRCLE_ATKER]= true;
- StatusDisplayType[SC_CURSEDCIRCLE_TARGET]= true;
- StatusDisplayType[SC_BLOOD_SUCKER] = true;
- StatusDisplayType[SC__SHADOWFORM] = true;
- StatusDisplayType[SC__MANHOLE] = true;
- StatusDisplayType[SC_MONSTER_TRANSFORM] = true;
+ status->ChangeFlagTable[SC_PARALYSE] |= SCB_ASPD|SCB_FLEE|SCB_SPEED;
+ status->ChangeFlagTable[SC_DEATHHURT] |= SCB_REGEN;
+ status->ChangeFlagTable[SC_VENOMBLEED] |= SCB_MAXHP;
+ status->ChangeFlagTable[SC_OBLIVIONCURSE] |= SCB_REGEN;
+
+ status->ChangeFlagTable[SC_SAVAGE_STEAK] |= SCB_STR;
+ status->ChangeFlagTable[SC_COCKTAIL_WARG_BLOOD] |= SCB_INT;
+ status->ChangeFlagTable[SC_MINOR_BBQ] |= SCB_VIT;
+ status->ChangeFlagTable[SC_SIROMA_ICE_TEA] |= SCB_DEX;
+ status->ChangeFlagTable[SC_DROCERA_HERB_STEAMED] |= SCB_AGI;
+ status->ChangeFlagTable[SC_PUTTI_TAILS_NOODLES] |= SCB_LUK;
+ status->ChangeFlagTable[SC_BOOST500] |= SCB_ASPD;
+ status->ChangeFlagTable[SC_FULL_SWING_K] |= SCB_BATK;
+ status->ChangeFlagTable[SC_MANA_PLUS] |= SCB_MATK;
+ status->ChangeFlagTable[SC_MUSTLE_M] |= SCB_MAXHP;
+ status->ChangeFlagTable[SC_LIFE_FORCE_F] |= SCB_MAXSP;
+ status->ChangeFlagTable[SC_EXTRACT_WHITE_POTION_Z] |= SCB_REGEN;
+ status->ChangeFlagTable[SC_VITATA_500] |= SCB_REGEN;
+ status->ChangeFlagTable[SC_EXTRACT_SALAMINE_JUICE] |= SCB_ASPD;
+ status->ChangeFlagTable[SC_REBOUND] |= SCB_SPEED|SCB_REGEN;
+
+ status->ChangeFlagTable[SC_ALL_RIDING] = SCB_SPEED;
+ status->ChangeFlagTable[SC_WEDDING] = SCB_SPEED;
+
+
+ /* status->DisplayType Table [Ind/Hercules] */
+ status->DisplayType[SC_ALL_RIDING] = true;
+ status->DisplayType[SC_PUSH_CART] = true;
+ status->DisplayType[SC_SUMMON1] = true;
+ status->DisplayType[SC_SUMMON2] = true;
+ status->DisplayType[SC_SUMMON3] = true;
+ status->DisplayType[SC_SUMMON4] = true;
+ status->DisplayType[SC_SUMMON5] = true;
+ status->DisplayType[SC_CAMOUFLAGE] = true;
+ status->DisplayType[SC_DUPLELIGHT] = true;
+ status->DisplayType[SC_ORATIO] = true;
+ status->DisplayType[SC_FROSTMISTY] = true;
+ status->DisplayType[SC_VENOMIMPRESS] = true;
+ status->DisplayType[SC_HALLUCINATIONWALK] = true;
+ status->DisplayType[SC_ROLLINGCUTTER] = true;
+ status->DisplayType[SC_BANDING] = true;
+ status->DisplayType[SC_COLD] = true;
+ status->DisplayType[SC_DEEP_SLEEP] = true;
+ status->DisplayType[SC_CURSEDCIRCLE_ATKER]= true;
+ status->DisplayType[SC_CURSEDCIRCLE_TARGET]= true;
+ status->DisplayType[SC_BLOOD_SUCKER] = true;
+ status->DisplayType[SC__SHADOWFORM] = true;
+ status->DisplayType[SC__MANHOLE] = true;
+ status->DisplayType[SC_MONSTER_TRANSFORM] = true;
#ifdef RENEWAL_EDP
// renewal EDP increases your weapon atk
- StatusChangeFlagTable[SC_EDP] |= SCB_WATK;
+ status->ChangeFlagTable[SC_EDP] |= SCB_WATK;
#endif
if( !battle_config.display_hallucination ) //Disable Hallucination.
- StatusIconChangeTable[SC_ILLUSION] = SI_BLANK;
+ status->IconChangeTable[SC_ILLUSION] = SI_BLANK;
}
-static void initDummyData(void)
+void initDummyData(void)
{
- memset(&dummy_status, 0, sizeof(dummy_status));
- dummy_status.hp =
- dummy_status.max_hp =
- dummy_status.max_sp =
- dummy_status.str =
- dummy_status.agi =
- dummy_status.vit =
- dummy_status.int_ =
- dummy_status.dex =
- dummy_status.luk =
- dummy_status.hit = 1;
- dummy_status.speed = 2000;
- dummy_status.adelay = 4000;
- dummy_status.amotion = 2000;
- dummy_status.dmotion = 2000;
- dummy_status.ele_lv = 1; //Min elemental level.
- dummy_status.mode = MD_CANMOVE;
+ memset(&status->dummy, 0, sizeof(status->dummy));
+ status->dummy.hp =
+ status->dummy.max_hp =
+ status->dummy.max_sp =
+ status->dummy.str =
+ status->dummy.agi =
+ status->dummy.vit =
+ status->dummy.int_ =
+ status->dummy.dex =
+ status->dummy.luk =
+ status->dummy.hit = 1;
+ status->dummy.speed = 2000;
+ status->dummy.adelay = 4000;
+ status->dummy.amotion = 2000;
+ status->dummy.dmotion = 2000;
+ status->dummy.ele_lv = 1; //Min elemental level.
+ status->dummy.mode = MD_CANMOVE;
}
@@ -1093,7 +1061,7 @@ int status_set_hp(struct block_list *bl, unsigned int hp, int flag) {
struct status_data *st;
if (hp < 1) return 0;
st = status->get_status_data(bl);
- if (st == &dummy_status)
+ if (st == &status->dummy)
return 0;
if (hp > st->max_hp) hp = st->max_hp;
@@ -1110,7 +1078,7 @@ int status_set_sp(struct block_list *bl, unsigned int sp, int flag) {
struct status_data *st;
st = status->get_status_data(bl);
- if (st == &dummy_status)
+ if (st == &status->dummy)
return 0;
if (sp > st->max_sp) sp = st->max_sp;
@@ -1157,7 +1125,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp,
return skill->unit_ondamaged((struct skill_unit *)target, src, hp, timer->gettick());
st = status->get_status_data(target);
- if( st == &dummy_status )
+ if( st == &status->dummy )
return 0;
if ((unsigned int)hp >= st->hp) {
@@ -1204,7 +1172,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp,
if ((sce=sc->data[SC_ENDURE]) && !sce->val4 && !sc->data[SC_LKCONCENTRATION]) {
//Endure count is only reduced by non-players on non-gvg maps.
//val4 signals infinite endure. [Skotlex]
- if (src && src->type != BL_PC && !map_flag_gvg2(target->m) && !maplist[target->m].flag.battleground && --(sce->val2) < 0)
+ if (src && src->type != BL_PC && !map_flag_gvg2(target->m) && !map->list[target->m].flag.battleground && --(sce->val2) < 0)
status_change_end(target, SC_ENDURE, INVALID_TIMER);
}
if ((sce=sc->data[SC_GRAVITATION]) && sce->val3 == BCT_SELF) {
@@ -1361,7 +1329,7 @@ int status_heal(struct block_list *bl,int64 in_hp,int64 in_sp, int flag) {
st = status->get_status_data(bl);
- if (st == &dummy_status || !st->hp)
+ if (st == &status->dummy || !st->hp)
return 0;
/* here onwards we consider it a 32-type, the client does not support higher and from here onwards the value doesn't get thru percentage modifiers */
@@ -1496,7 +1464,7 @@ int status_revive(struct block_list *bl, unsigned char per_hp, unsigned char per
if (!status->isdead(bl)) return 0;
st = status->get_status_data(bl);
- if (st == &dummy_status)
+ if (st == &status->dummy)
return 0; //Invalid target.
hp = (int64)st->max_hp * per_hp/100;
@@ -1543,7 +1511,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin
struct status_change *sc=NULL, *tsc;
int hide_flag;
- st = src ? status->get_status_data(src) : &dummy_status;
+ st = src ? status->get_status_data(src) : &status->dummy;
if (src && src->type != BL_PC && status->isdead(src))
return 0;
@@ -1564,12 +1532,12 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin
if( src && !(src->type == BL_PC && ((TBL_PC*)src)->skillitem)) { // Items that cast skills using 'itemskill' will not be handled by map_zone_db.
int i;
- for(i = 0; i < maplist[src->m].zone->disabled_skills_count; i++) {
- if( skill_id == maplist[src->m].zone->disabled_skills[i]->nameid && (maplist[src->m].zone->disabled_skills[i]->type&src->type) ) {
+ for(i = 0; i < map->list[src->m].zone->disabled_skills_count; i++) {
+ if( skill_id == map->list[src->m].zone->disabled_skills[i]->nameid && (map->list[src->m].zone->disabled_skills[i]->type&src->type) ) {
if( src->type == BL_PC )
clif->msg((TBL_PC*)src, SKILL_CANT_USE_AREA); // This skill cannot be used within this area
- else if( src->type == BL_MOB && maplist[src->m].zone->disabled_skills[i]->subtype != MZS_NONE ) {
- if( (st->mode&MD_BOSS) && !(maplist[src->m].zone->disabled_skills[i]->subtype&MZS_BOSS) )
+ else if( src->type == BL_MOB && map->list[src->m].zone->disabled_skills[i]->subtype != MZS_NONE ) {
+ if( (st->mode&MD_BOSS) && !(map->list[src->m].zone->disabled_skills[i]->subtype&MZS_BOSS) )
break;
}
return 0;
@@ -1864,21 +1832,21 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st)
}
amotion = ( sd->status.weapon < MAX_WEAPON_TYPE && mod < 0 )
- ? (aspd_base[pc->class2idx(sd->status.class_)][sd->status.weapon]) // single weapon
- : ((aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2] // dual-wield
- + aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2]) * 6 / 10 + 10 * mod
- - aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2]
- + aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1]);
+ ? (status->aspd_base[pc->class2idx(sd->status.class_)][sd->status.weapon]) // single weapon
+ : ((status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2] // dual-wield
+ + status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2]) * 6 / 10 + 10 * mod
+ - status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2]
+ + status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1]);
if ( sd->status.shield )
- amotion += ( 2000 - aspd_base[pc->class2idx(sd->status.class_)][W_FIST] ) +
- ( aspd_base[pc->class2idx(sd->status.class_)][MAX_WEAPON_TYPE] - 2000 );
+ amotion += ( 2000 - status->aspd_base[pc->class2idx(sd->status.class_)][W_FIST] ) +
+ ( status->aspd_base[pc->class2idx(sd->status.class_)][MAX_WEAPON_TYPE] - 2000 );
#else
// base weapon delay
amotion = (sd->status.weapon < MAX_WEAPON_TYPE)
- ? (aspd_base[pc->class2idx(sd->status.class_)][sd->status.weapon]) // single weapon
- : (aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1] + aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2])*7/10; // dual-wield
+ ? (status->aspd_base[pc->class2idx(sd->status.class_)][sd->status.weapon]) // single weapon
+ : (status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1] + status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2])*7/10; // dual-wield
// percentual delay reduction from stats
amotion -= amotion * (4*st->agi + st->dex)/1000;
@@ -1889,7 +1857,7 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st)
return amotion;
}
-static unsigned short status_base_atk(const struct block_list *bl, const struct status_data *st) {
+unsigned short status_base_atk(const struct block_list *bl, const struct status_data *st) {
int flag = 0, str, dex,
#ifdef RENEWAL
rstr,
@@ -1943,9 +1911,14 @@ static unsigned short status_base_atk(const struct block_list *bl, const struct
static inline unsigned short status_base_matk_min(const struct status_data *st){ return st->int_+(st->int_/7)*(st->int_/7); }
static inline unsigned short status_base_matk_max(const struct status_data *st){ return st->int_+(st->int_/5)*(st->int_/5); }
+
+unsigned short status_base_matk(const struct status_data *st, int level) {
#ifdef RENEWAL
-unsigned short status_base_matk(const struct status_data *st, int level){ return st->int_+(st->int_/2)+(st->dex/5)+(st->luk/3)+(level/4); }
+ return st->int_+(st->int_/2)+(st->dex/5)+(st->luk/3)+(level/4);
+#else
+ return 0;
#endif
+}
//Fills in the misc data that can be calculated from the other status info (except for level)
void status_calc_misc(struct block_list *bl, struct status_data *st, int level) {
@@ -1982,10 +1955,10 @@ void status_calc_misc(struct block_list *bl, struct status_data *st, int level)
st->flee2 = 0;
if (st->batk) {
- int temp = st->batk + status_base_atk(bl, st);
+ int temp = st->batk + status->base_atk(bl, st);
st->batk = cap_value(temp, 0, USHRT_MAX);
} else
- st->batk = status_base_atk(bl, st);
+ st->batk = status->base_atk(bl, st);
if (st->cri)
switch (bl->type) {
case BL_MOB:
@@ -2152,9 +2125,9 @@ int status_calc_mob_(struct mob_data* md, bool first) {
if(flag&4)
{ // Strengthen Guardians - custom value +10% / lv
struct guild_castle *gc;
- gc=guild->mapname2gc(maplist[md->bl.m].name);
+ gc=guild->mapname2gc(map->list[md->bl.m].name);
if (!gc)
- ShowError("status_calc_mob: No castle set at map %s\n", maplist[md->bl.m].name);
+ ShowError("status_calc_mob: No castle set at map %s\n", map->list[md->bl.m].name);
else
if(gc->castle_id < 24 || md->class_ == MOBID_EMPERIUM) {
#ifdef RENEWAL
@@ -2249,23 +2222,23 @@ int status_calc_pet_(struct pet_data *pd, bool first)
}
/// Helper function for status_base_pc_maxhp(), used to pre-calculate the hp_sigma_val[] array
-static void status_calc_sigma(void)
+void status_calc_sigma(void)
{
int i,j;
for(i = 0; i < CLASS_COUNT; i++)
{
unsigned int k = 0;
- hp_sigma_val[i][0] = hp_sigma_val[i][1] = 0;
+ status->hp_sigma_val[i][0] = status->hp_sigma_val[i][1] = 0;
for(j = 2; j <= MAX_LEVEL; j++)
{
- k += (hp_coefficient[i]*j + 50) / 100;
- hp_sigma_val[i][j] = k;
+ k += (status->hp_coefficient[i]*j + 50) / 100;
+ status->hp_sigma_val[i][j] = k;
if (k >= INT_MAX)
break; //Overflow protection. [Skotlex]
}
for(; j <= MAX_LEVEL; j++)
- hp_sigma_val[i][j] = INT_MAX;
+ status->hp_sigma_val[i][j] = INT_MAX;
}
}
@@ -2274,11 +2247,11 @@ static void status_calc_sigma(void)
/// f(0) = 35 | f(x+1) = f(x) + A + (x + B)*C/D
/// which reduces to something close to
/// f(x) = 35 + x*(A + B*C/D) + sum(i=2..x){ i*C/D }
-static unsigned int status_base_pc_maxhp(struct map_session_data *sd, struct status_data *st) {
+unsigned int status_base_pc_maxhp(struct map_session_data *sd, struct status_data *st) {
uint64 val = pc->class2idx(sd->status.class_);
- val = 35 + sd->status.base_level*(int64)hp_coefficient2[val]/100 + hp_sigma_val[val][sd->status.base_level];
+ val = 35 + sd->status.base_level*(int64)status->hp_coefficient2[val]/100 + status->hp_sigma_val[val][sd->status.base_level];
- if((sd->class_&MAPID_UPPERMASK) == MAPID_NINJA || (sd->class_&MAPID_UPPERMASK) == MAPID_GUNSLINGER)
+ if((sd->class_&MAPID_UPPERMASK) == MAPID_NINJA || (sd->class_&MAPID_UPPERMASK) == MAPID_GUNSLINGER || (sd->class_&MAPID_UPPERMASK) == MAPID_REBELLION)
val += 100; //Since their HP can't be approximated well enough without this.
if((sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->famerank(sd->status.char_id, MAPID_TAEKWON))
val *= 3; //Triple max HP for top ranking Taekwons over level 90.
@@ -2291,13 +2264,13 @@ static unsigned int status_base_pc_maxhp(struct map_session_data *sd, struct sta
val += val * 25/100; //Trans classes get a 25% hp bonus
else if (sd->class_&JOBL_BABY)
val -= val * 30/100; //Baby classes get a 30% hp penalty
- return (unsigned int)val;
+ return (unsigned int)cap_value(val,0,UINT_MAX);
}
-static unsigned int status_base_pc_maxsp(struct map_session_data* sd, struct status_data *st) {
+unsigned int status_base_pc_maxsp(struct map_session_data* sd, struct status_data *st) {
uint64 val;
- val = 10 + sd->status.base_level*(int64)sp_coefficient[pc->class2idx(sd->status.class_)]/100;
+ val = 10 + sd->status.base_level*(int64)status->sp_coefficient[pc->class2idx(sd->status.class_)]/100;
val += val * st->int_/100;
if (sd->class_&JOBL_UPPER)
@@ -2307,7 +2280,7 @@ static unsigned int status_base_pc_maxsp(struct map_session_data* sd, struct sta
if ((sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->famerank(sd->status.char_id, MAPID_TAEKWON))
val *= 3; //Triple max SP for top ranking Taekwons over level 90.
- return (unsigned int)val;
+ return (unsigned int)cap_value(val,0,UINT_MAX);
}
//Calculates player data from scratch without counting SC adjustments.
@@ -2332,7 +2305,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first) {
pc->calc_skilltree(sd); // SkillTree calculation
- sd->max_weight = max_weight_base[pc->class2idx(sd->status.class_)]+sd->status.str*300;
+ sd->max_weight = status->max_weight_base[pc->class2idx(sd->status.class_)]+sd->status.str*300;
if(first) {
//Load Hp/SP from char-received data.
@@ -2482,13 +2455,13 @@ int status_calc_pc_(struct map_session_data* sd, bool first) {
if(!sd->inventory_data[index])
continue;
- for(k = 0; k < maplist[sd->bl.m].zone->disabled_items_count; k++) {
- if( maplist[sd->bl.m].zone->disabled_items[k] == sd->inventory_data[index]->nameid ) {
+ for(k = 0; k < map->list[sd->bl.m].zone->disabled_items_count; k++) {
+ if( map->list[sd->bl.m].zone->disabled_items[k] == sd->inventory_data[index]->nameid ) {
break;
}
}
- if( k < maplist[sd->bl.m].zone->disabled_items_count )
+ if( k < map->list[sd->bl.m].zone->disabled_items_count )
continue;
bstatus->def += sd->inventory_data[index]->def;
@@ -2519,18 +2492,18 @@ int status_calc_pc_(struct map_session_data* sd, bool first) {
}
wa->atk += sd->inventory_data[index]->atk;
if ( (r = sd->status.inventory[index].refine) )
- wa->atk2 = refine_info[wlv].bonus[r-1] / 100;
+ wa->atk2 = status->refine_info[wlv].bonus[r-1] / 100;
#ifdef RENEWAL
wa->matk += sd->inventory_data[index]->matk;
wa->wlv = wlv;
if( r && sd->weapontype1 != W_BOW ) // renewal magic attack refine bonus
- wa->matk += refine_info[wlv].bonus[r-1] / 100;
+ wa->matk += status->refine_info[wlv].bonus[r-1] / 100;
#endif
//Overrefine bonus.
if (r)
- wd->overrefine = refine_info[wlv].randombonus_max[r-1] / 100;
+ wd->overrefine = status->refine_info[wlv].randombonus_max[r-1] / 100;
wa->range += sd->inventory_data[index]->range;
if(sd->inventory_data[index]->script) {
@@ -2558,7 +2531,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first) {
else if(sd->inventory_data[index]->type == IT_ARMOR) {
int r;
if ( (r = sd->status.inventory[index].refine) )
- refinedef += refine_info[REFINE_TYPE_ARMOR].bonus[r-1];
+ refinedef += status->refine_info[REFINE_TYPE_ARMOR].bonus[r-1];
if(sd->inventory_data[index]->script) {
if( i == EQI_HAND_L ) //Shield
sd->state.lr_flag = 3;
@@ -2627,13 +2600,13 @@ int status_calc_pc_(struct map_session_data* sd, bool first) {
if(!data)
continue;
- for(k = 0; k < maplist[sd->bl.m].zone->disabled_items_count; k++) {
- if( maplist[sd->bl.m].zone->disabled_items[k] == data->nameid ) {
+ for(k = 0; k < map->list[sd->bl.m].zone->disabled_items_count; k++) {
+ if( map->list[sd->bl.m].zone->disabled_items[k] == data->nameid ) {
break;
}
}
- if( k < maplist[sd->bl.m].zone->disabled_items_count )
+ if( k < map->list[sd->bl.m].zone->disabled_items_count )
continue;
if(first && data->equip_script) {//Execute equip-script on login
@@ -2682,12 +2655,12 @@ int status_calc_pc_(struct map_session_data* sd, bool first) {
sd->bonus.splash_range += sd->bonus.splash_add_range;
// Damage modifiers from weapon type
- sd->right_weapon.atkmods[0] = atkmods[0][sd->weapontype1];
- sd->right_weapon.atkmods[1] = atkmods[1][sd->weapontype1];
- sd->right_weapon.atkmods[2] = atkmods[2][sd->weapontype1];
- sd->left_weapon.atkmods[0] = atkmods[0][sd->weapontype2];
- sd->left_weapon.atkmods[1] = atkmods[1][sd->weapontype2];
- sd->left_weapon.atkmods[2] = atkmods[2][sd->weapontype2];
+ sd->right_weapon.atkmods[0] = status->atkmods[0][sd->weapontype1];
+ sd->right_weapon.atkmods[1] = status->atkmods[1][sd->weapontype1];
+ sd->right_weapon.atkmods[2] = status->atkmods[2][sd->weapontype1];
+ sd->left_weapon.atkmods[0] = status->atkmods[0][sd->weapontype2];
+ sd->left_weapon.atkmods[1] = status->atkmods[1][sd->weapontype2];
+ sd->left_weapon.atkmods[2] = status->atkmods[2][sd->weapontype2];
if( (pc_isriding(sd) || pc_isridingdragon(sd)) &&
(sd->status.weapon==W_1HSPEAR || sd->status.weapon==W_2HSPEAR))
@@ -2702,15 +2675,15 @@ int status_calc_pc_(struct map_session_data* sd, bool first) {
// Job bonuses
index = pc->class2idx(sd->status.class_);
for(i=0;i<(int)sd->status.job_level && i<MAX_LEVEL;i++){
- if(!job_bonus[index][i])
+ if(!status->job_bonus[index][i])
continue;
- switch(job_bonus[index][i]) {
- case 1: bstatus->str++; break;
- case 2: bstatus->agi++; break;
- case 3: bstatus->vit++; break;
- case 4: bstatus->int_++; break;
- case 5: bstatus->dex++; break;
- case 6: bstatus->luk++; break;
+ switch(status->job_bonus[index][i]) {
+ case 1: bstatus->str++; break;
+ case 2: bstatus->agi++; break;
+ case 3: bstatus->vit++; break;
+ case 4: bstatus->int_++; break;
+ case 5: bstatus->dex++; break;
+ case 6: bstatus->luk++; break;
}
}
@@ -2764,7 +2737,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first) {
// Basic MaxHP value
//We hold the standard Max HP here to make it faster to recalculate on vit changes.
- sd->status.max_hp = status_base_pc_maxhp(sd,bstatus);
+ sd->status.max_hp = status->base_pc_maxhp(sd,bstatus);
//This is done to handle underflows from negative Max HP bonuses
i64 = sd->status.max_hp + (int)bstatus->max_hp;
bstatus->max_hp = (unsigned int)cap_value(i64, 0, INT_MAX);
@@ -2789,7 +2762,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first) {
// ----- SP MAX CALCULATION -----
// Basic MaxSP value
- sd->status.max_sp = status_base_pc_maxsp(sd,bstatus);
+ sd->status.max_sp = status->base_pc_maxsp(sd,bstatus);
//This is done to handle underflows from negative Max SP bonuses
i64 = sd->status.max_sp + (int)bstatus->max_sp;
bstatus->max_sp = (unsigned int)cap_value(i64, 0, INT_MAX);
@@ -2952,7 +2925,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first) {
// Unlike other stats, ASPD rate modifiers from skills/SCs/items/etc are first all added together, then the final modifier is applied
// Basic ASPD value
- i = status_base_amotion_pc(sd,bstatus);
+ i = status->base_amotion_pc(sd,bstatus);
bstatus->amotion = cap_value(i,((sd->class_&JOBL_THIRD) ? battle_config.max_third_aspd : battle_config.max_aspd),2000);
// Relative modifiers from passive skills
@@ -3313,35 +3286,6 @@ int status_calc_npc_(struct npc_data *nd, bool first) {
return 0;
}
-static unsigned short status_calc_str(struct block_list *,struct status_change *,int);
-static unsigned short status_calc_agi(struct block_list *,struct status_change *,int);
-static unsigned short status_calc_vit(struct block_list *,struct status_change *,int);
-static unsigned short status_calc_int(struct block_list *,struct status_change *,int);
-static unsigned short status_calc_dex(struct block_list *,struct status_change *,int);
-static unsigned short status_calc_luk(struct block_list *,struct status_change *,int);
-static unsigned short status_calc_watk(struct block_list *,struct status_change *,int,bool);
-static unsigned short status_calc_matk(struct block_list *,struct status_change *,int,bool);
-static signed short status_calc_hit(struct block_list *,struct status_change *,int,bool);
-static signed short status_calc_critical(struct block_list *,struct status_change *,int,bool);
-static signed short status_calc_flee(struct block_list *,struct status_change *,int,bool);
-static signed short status_calc_flee2(struct block_list *,struct status_change *,int,bool);
-static unsigned short status_calc_speed(struct block_list *,struct status_change *,int);
-static short status_calc_aspd_rate(struct block_list *,struct status_change *,int);
-static unsigned short status_calc_dmotion(struct block_list *bl, struct status_change *sc, int dmotion);
-#ifdef RENEWAL_ASPD
-static short status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag);
-#endif
-static short status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, int);
-static unsigned int status_calc_maxhp(struct block_list *,struct status_change *, uint64);
-static unsigned int status_calc_maxsp(struct block_list *,struct status_change *,unsigned int);
-static unsigned char status_calc_element(struct block_list *bl, struct status_change *sc, int element);
-static unsigned char status_calc_element_lv(struct block_list *bl, struct status_change *sc, int lv);
-static unsigned short status_calc_mode(struct block_list *bl, struct status_change *sc, int mode);
-#ifdef RENEWAL
-static unsigned short status_calc_ematk(struct block_list *,struct status_change *,int);
-#else
-static unsigned short status_calc_batk(struct block_list *,struct status_change *,int,bool);
-#endif
//Calculates base regen values.
void status_calc_regen(struct block_list *bl, struct status_data *st, struct regen_data *regen) {
@@ -3543,14 +3487,14 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
}
if(flag&SCB_STR) {
- st->str = status_calc_str(bl, sc, bst->str);
+ st->str = status->calc_str(bl, sc, bst->str);
flag|=SCB_BATK;
if( bl->type&BL_HOM )
flag |= SCB_WATK;
}
if(flag&SCB_AGI) {
- st->agi = status_calc_agi(bl, sc, bst->agi);
+ st->agi = status->calc_agi(bl, sc, bst->agi);
flag|=SCB_FLEE
#ifdef RENEWAL
|SCB_DEF2
@@ -3561,7 +3505,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
}
if(flag&SCB_VIT) {
- st->vit = status_calc_vit(bl, sc, bst->vit);
+ st->vit = status->calc_vit(bl, sc, bst->vit);
flag|=SCB_DEF2|SCB_MDEF2;
if( bl->type&(BL_PC|BL_HOM|BL_MER|BL_ELEM) )
flag |= SCB_MAXHP;
@@ -3570,7 +3514,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
}
if(flag&SCB_INT) {
- st->int_ = status_calc_int(bl, sc, bst->int_);
+ st->int_ = status->calc_int(bl, sc, bst->int_);
flag|=SCB_MATK|SCB_MDEF2;
if( bl->type&(BL_PC|BL_HOM|BL_MER|BL_ELEM) )
flag |= SCB_MAXSP;
@@ -3579,7 +3523,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
}
if(flag&SCB_DEX) {
- st->dex = status_calc_dex(bl, sc, bst->dex);
+ st->dex = status->calc_dex(bl, sc, bst->dex);
flag|=SCB_BATK|SCB_HIT
#ifdef RENEWAL
|SCB_MATK|SCB_MDEF2
@@ -3592,7 +3536,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
}
if(flag&SCB_LUK) {
- st->luk = status_calc_luk(bl, sc, bst->luk);
+ st->luk = status->calc_luk(bl, sc, bst->luk);
flag|=SCB_BATK|SCB_CRI|SCB_FLEE2
#ifdef RENEWAL
|SCB_MATK|SCB_HIT|SCB_FLEE
@@ -3601,8 +3545,8 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
}
if(flag&SCB_BATK && bst->batk) {
- st->batk = status_base_atk(bl,st);
- temp = bst->batk - status_base_atk(bl,bst);
+ st->batk = status->base_atk(bl,st);
+ temp = bst->batk - status->base_atk(bl,bst);
if (temp) {
temp += st->batk;
st->batk = cap_value(temp, 0, USHRT_MAX);
@@ -3611,18 +3555,18 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
}
if(flag&SCB_WATK) {
- st->rhw.atk = status_calc_watk(bl, sc, bst->rhw.atk, true);
+ st->rhw.atk = status->calc_watk(bl, sc, bst->rhw.atk, true);
if (!sd) //Should not affect weapon refine bonus
- st->rhw.atk2 = status_calc_watk(bl, sc, bst->rhw.atk2, true);
+ st->rhw.atk2 = status->calc_watk(bl, sc, bst->rhw.atk2, true);
if(bst->lhw.atk) {
if (sd) {
sd->state.lr_flag = 1;
- st->lhw.atk = status_calc_watk(bl, sc, bst->lhw.atk, true);
+ st->lhw.atk = status->calc_watk(bl, sc, bst->lhw.atk, true);
sd->state.lr_flag = 0;
} else {
- st->lhw.atk = status_calc_watk(bl, sc, bst->lhw.atk, true);
- st->lhw.atk2 = status_calc_watk(bl, sc, bst->lhw.atk2, true);
+ st->lhw.atk = status->calc_watk(bl, sc, bst->lhw.atk, true);
+ st->lhw.atk2 = status->calc_watk(bl, sc, bst->lhw.atk2, true);
}
}
@@ -3640,9 +3584,9 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
&& st->luk == bst->luk
#endif
)
- st->hit = status_calc_hit(bl, sc, bst->hit, true);
+ st->hit = status->calc_hit(bl, sc, bst->hit, true);
else
- st->hit = status_calc_hit(bl, sc, bst->hit + (st->dex - bst->dex)
+ st->hit = status->calc_hit(bl, sc, bst->hit + (st->dex - bst->dex)
#ifdef RENEWAL
+ (st->luk/3 - bst->luk/3)
#endif
@@ -3655,9 +3599,9 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
&& st->luk == bst->luk
#endif
)
- st->flee = status_calc_flee(bl, sc, bst->flee, true);
+ st->flee = status->calc_flee(bl, sc, bst->flee, true);
else
- st->flee = status_calc_flee(bl, sc, bst->flee +(st->agi - bst->agi)
+ st->flee = status->calc_flee(bl, sc, bst->flee +(st->agi - bst->agi)
#ifdef RENEWAL
+ (st->luk/5 - bst->luk/5)
#endif
@@ -3714,7 +3658,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
if(flag&SCB_SPEED) {
struct unit_data *ud = unit->bl2ud(bl);
- st->speed = status_calc_speed(bl, sc, bst->speed);
+ st->speed = status->calc_speed(bl, sc, bst->speed);
//Re-walk to adjust speed (we do not check if walktimer != INVALID_TIMER
//because if you step on something while walking, the moment this
@@ -3733,9 +3677,9 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
if(flag&SCB_CRI && bst->cri) {
if (st->luk == bst->luk)
- st->cri = status_calc_critical(bl, sc, bst->cri, true);
+ st->cri = status->calc_critical(bl, sc, bst->cri, true);
else
- st->cri = status_calc_critical(bl, sc, bst->cri + 3*(st->luk - bst->luk), true);
+ st->cri = status->calc_critical(bl, sc, bst->cri + 3*(st->luk - bst->luk), true);
/**
* after status_calc_critical so the bonus is applied despite if you have or not a sc bugreport:5240
**/
@@ -3746,9 +3690,9 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
if(flag&SCB_FLEE2 && bst->flee2) {
if (st->luk == bst->luk)
- st->flee2 = status_calc_flee2(bl, sc, bst->flee2, true);
+ st->flee2 = status->calc_flee2(bl, sc, bst->flee2, true);
else
- st->flee2 = status_calc_flee2(bl, sc, bst->flee2 +(st->luk - bst->luk), true);
+ st->flee2 = status->calc_flee2(bl, sc, bst->flee2 +(st->luk - bst->luk), true);
}
if(flag&SCB_ATK_ELE) {
@@ -3759,12 +3703,12 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
}
if(flag&SCB_DEF_ELE) {
- st->def_ele = status_calc_element(bl, sc, bst->def_ele);
- st->ele_lv = status_calc_element_lv(bl, sc, bst->ele_lv);
+ st->def_ele = status->calc_element(bl, sc, bst->def_ele);
+ st->ele_lv = status->calc_element_lv(bl, sc, bst->ele_lv);
}
if(flag&SCB_MODE) {
- st->mode = status_calc_mode(bl, sc, bst->mode);
+ st->mode = status->calc_mode(bl, sc, bst->mode);
//Since mode changed, reset their state.
if (!(st->mode&MD_CANATTACK))
unit->stop_attack(bl);
@@ -3779,15 +3723,15 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
if(flag&SCB_MAXHP) {
if( bl->type&BL_PC ) {
- st->max_hp = status_base_pc_maxhp(sd,st);
+ st->max_hp = status->base_pc_maxhp(sd,st);
st->max_hp += bst->max_hp - sd->status.max_hp;
- st->max_hp = status_calc_maxhp(bl, sc, st->max_hp);
+ st->max_hp = status->calc_maxhp(bl, sc, st->max_hp);
if( st->max_hp > (unsigned int)battle_config.max_hp )
st->max_hp = (unsigned int)battle_config.max_hp;
} else {
- st->max_hp = status_calc_maxhp(bl, sc, bst->max_hp);
+ st->max_hp = status->calc_maxhp(bl, sc, bst->max_hp);
}
if( st->hp > st->max_hp ) {
@@ -3799,15 +3743,15 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
if(flag&SCB_MAXSP) {
if( bl->type&BL_PC ) {
- st->max_sp = status_base_pc_maxsp(sd,st);
+ st->max_sp = status->base_pc_maxsp(sd,st);
st->max_sp += bst->max_sp - sd->status.max_sp;
- st->max_sp = status_calc_maxsp(&sd->bl, &sd->sc, st->max_sp);
+ st->max_sp = status->calc_maxsp(&sd->bl, &sd->sc, st->max_sp);
if( st->max_sp > (unsigned int)battle_config.max_sp )
st->max_sp = (unsigned int)battle_config.max_sp;
} else {
- st->max_sp = status_calc_maxsp(bl, sc, bst->max_sp);
+ st->max_sp = status->calc_maxsp(bl, sc, bst->max_sp);
}
if( st->sp > st->max_sp ) {
@@ -3823,46 +3767,46 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
if(flag&SCB_ASPD) {
int amotion;
if( bl->type&BL_PC ) {
- amotion = status_base_amotion_pc(sd,st);
+ amotion = status->base_amotion_pc(sd,st);
#ifndef RENEWAL_ASPD
- st->aspd_rate = status_calc_aspd_rate(bl, sc, bst->aspd_rate);
+ st->aspd_rate = status->calc_aspd_rate(bl, sc, bst->aspd_rate);
if(st->aspd_rate != 1000)
amotion = amotion*st->aspd_rate/1000;
#else
// aspd = baseaspd + floor(sqrt((agi^2/2) + (dex^2/5))/4 + (potskillbonus*agi/200))
- amotion -= (int)(sqrt( (pow(st->agi, 2) / 2) + (pow(st->dex, 2) / 5) ) / 4 + ((float)status_calc_aspd(bl, sc, 1) * st->agi / 200)) * 10;
+ amotion -= (int)(sqrt( (pow(st->agi, 2) / 2) + (pow(st->dex, 2) / 5) ) / 4 + ((float)status->calc_aspd(bl, sc, 1) * st->agi / 200)) * 10;
- if( (status_calc_aspd(bl, sc, 2) + st->aspd_rate2) != 0 ) // RE ASPD percertage modifier
+ if( (status->calc_aspd(bl, sc, 2) + st->aspd_rate2) != 0 ) // RE ASPD percertage modifier
amotion -= (( amotion - ((sd->class_&JOBL_THIRD) ? battle_config.max_third_aspd : battle_config.max_aspd) )
- * (status_calc_aspd(bl, sc, 2) + st->aspd_rate2) / 10 + 5) / 10;
+ * (status->calc_aspd(bl, sc, 2) + st->aspd_rate2) / 10 + 5) / 10;
if(st->aspd_rate != 1000) // absolute percentage modifier
amotion = ( 200 - (200-amotion/10) * st->aspd_rate / 1000 ) * 10;
#endif
- amotion = status_calc_fix_aspd(bl, sc, amotion);
+ amotion = status->calc_fix_aspd(bl, sc, amotion);
st->amotion = cap_value(amotion,((sd->class_&JOBL_THIRD) ? battle_config.max_third_aspd : battle_config.max_aspd),2000);
st->adelay = 2*st->amotion;
} else if( bl->type&BL_HOM ) {
amotion = (1000 - 4*st->agi - st->dex) * ((TBL_HOM*)bl)->homunculusDB->baseASPD/1000;
- st->aspd_rate = status_calc_aspd_rate(bl, sc, bst->aspd_rate);
+ st->aspd_rate = status->calc_aspd_rate(bl, sc, bst->aspd_rate);
if(st->aspd_rate != 1000)
amotion = amotion*st->aspd_rate/1000;
- amotion = status_calc_fix_aspd(bl, sc, amotion);
+ amotion = status->calc_fix_aspd(bl, sc, amotion);
st->amotion = cap_value(amotion,battle_config.max_aspd,2000);
st->adelay = st->amotion;
} else { // mercenary and mobs
amotion = bst->amotion;
- st->aspd_rate = status_calc_aspd_rate(bl, sc, bst->aspd_rate);
+ st->aspd_rate = status->calc_aspd_rate(bl, sc, bst->aspd_rate);
if(st->aspd_rate != 1000)
amotion = amotion*st->aspd_rate/1000;
- amotion = status_calc_fix_aspd(bl, sc, amotion);
+ amotion = status->calc_fix_aspd(bl, sc, amotion);
st->amotion = cap_value(amotion, battle_config.monster_max_aspd, 2000);
temp = bst->adelay*st->aspd_rate/1000;
@@ -3874,21 +3818,21 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
int dmotion;
if( bl->type&BL_PC ) {
if (bst->agi == st->agi)
- st->dmotion = status_calc_dmotion(bl, sc, bst->dmotion);
+ st->dmotion = status->calc_dmotion(bl, sc, bst->dmotion);
else {
dmotion = 800-st->agi*4;
st->dmotion = cap_value(dmotion, 400, 800);
if(battle_config.pc_damage_delay_rate != 100)
st->dmotion = st->dmotion*battle_config.pc_damage_delay_rate/100;
//It's safe to ignore bst->dmotion since no bonus affects it.
- st->dmotion = status_calc_dmotion(bl, sc, st->dmotion);
+ st->dmotion = status->calc_dmotion(bl, sc, st->dmotion);
}
} else if( bl->type&BL_HOM ) {
dmotion = 800-st->agi*4;
st->dmotion = cap_value(dmotion, 400, 800);
- st->dmotion = status_calc_dmotion(bl, sc, bst->dmotion);
+ st->dmotion = status->calc_dmotion(bl, sc, bst->dmotion);
} else { // mercenary and mobs
- st->dmotion = status_calc_dmotion(bl, sc, bst->dmotion);
+ st->dmotion = status->calc_dmotion(bl, sc, bst->dmotion);
}
}
@@ -3923,7 +3867,7 @@ void status_calc_bl_(struct block_list *bl, enum scb_flag flag, bool first) {
case BL_HOM: status->calc_homunculus_(BL_CAST(BL_HOM,bl), first); break;
case BL_MER: status->calc_mercenary_(BL_CAST(BL_MER,bl), first); break;
case BL_ELEM: status->calc_elemental_(BL_CAST(BL_ELEM,bl), first); break;
- case BL_NPC: status_calc_npc_(BL_CAST(BL_NPC,bl), first); break;
+ case BL_NPC: status->calc_npc_(BL_CAST(BL_NPC,bl), first); break;
}
}
@@ -3933,7 +3877,7 @@ void status_calc_bl_(struct block_list *bl, enum scb_flag flag, bool first) {
if( first && bl->type == BL_MOB )
return; // assume there will be no statuses active
- status_calc_bl_main(bl, flag);
+ status->calc_bl_main(bl, flag);
if( first && bl->type == BL_HOM )
return; // client update handled by caller
@@ -4076,7 +4020,7 @@ void status_calc_bl_(struct block_list *bl, enum scb_flag flag, bool first) {
/*==========================================
* Apply shared stat mods from status changes [DracoRPG]
*------------------------------------------*/
-static unsigned short status_calc_str(struct block_list *bl, struct status_change *sc, int str)
+unsigned short status_calc_str(struct block_list *bl, struct status_change *sc, int str)
{
if(!sc || !sc->count)
return cap_value(str,0,USHRT_MAX);
@@ -4133,7 +4077,7 @@ static unsigned short status_calc_str(struct block_list *bl, struct status_chang
return (unsigned short)cap_value(str,0,USHRT_MAX);
}
-static unsigned short status_calc_agi(struct block_list *bl, struct status_change *sc, int agi)
+unsigned short status_calc_agi(struct block_list *bl, struct status_change *sc, int agi)
{
if(!sc || !sc->count)
return cap_value(agi,0,USHRT_MAX);
@@ -4191,7 +4135,7 @@ static unsigned short status_calc_agi(struct block_list *bl, struct status_chang
return (unsigned short)cap_value(agi,0,USHRT_MAX);
}
-static unsigned short status_calc_vit(struct block_list *bl, struct status_change *sc, int vit)
+unsigned short status_calc_vit(struct block_list *bl, struct status_change *sc, int vit)
{
if(!sc || !sc->count)
return cap_value(vit,0,USHRT_MAX);
@@ -4239,7 +4183,7 @@ static unsigned short status_calc_vit(struct block_list *bl, struct status_chang
return (unsigned short)cap_value(vit,0,USHRT_MAX);
}
-static unsigned short status_calc_int(struct block_list *bl, struct status_change *sc, int int_)
+unsigned short status_calc_int(struct block_list *bl, struct status_change *sc, int int_)
{
if(!sc || !sc->count)
return cap_value(int_,0,USHRT_MAX);
@@ -4277,7 +4221,7 @@ static unsigned short status_calc_int(struct block_list *bl, struct status_chang
if(sc->data[SC_MARIONETTE])
int_ += ((sc->data[SC_MARIONETTE]->val4)>>16)&0xFF;
if(sc->data[SC_MANDRAGORA])
- int_ -= 5 + 5 * sc->data[SC_MANDRAGORA]->val1;
+ int_ -= 4 * sc->data[SC_MANDRAGORA]->val1;
if(sc->data[SC_COCKTAIL_WARG_BLOOD])
int_ += sc->data[SC_COCKTAIL_WARG_BLOOD]->val1;
if(sc->data[SC_INSPIRATION])
@@ -4297,7 +4241,7 @@ static unsigned short status_calc_int(struct block_list *bl, struct status_chang
return (unsigned short)cap_value(int_,0,USHRT_MAX);
}
-static unsigned short status_calc_dex(struct block_list *bl, struct status_change *sc, int dex)
+unsigned short status_calc_dex(struct block_list *bl, struct status_change *sc, int dex)
{
if(!sc || !sc->count)
return cap_value(dex,0,USHRT_MAX);
@@ -4357,7 +4301,7 @@ static unsigned short status_calc_dex(struct block_list *bl, struct status_chang
return (unsigned short)cap_value(dex,0,USHRT_MAX);
}
-static unsigned short status_calc_luk(struct block_list *bl, struct status_change *sc, int luk)
+unsigned short status_calc_luk(struct block_list *bl, struct status_change *sc, int luk)
{
if(!sc || !sc->count)
return cap_value(luk,0,USHRT_MAX);
@@ -4406,11 +4350,7 @@ static unsigned short status_calc_luk(struct block_list *bl, struct status_chang
return (unsigned short)cap_value(luk,0,USHRT_MAX);
}
-#ifdef RENEWAL
unsigned short status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable)
-#else
-static unsigned short status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable)
-#endif
{
if(!sc || !sc->count)
return cap_value(batk,0,USHRT_MAX);
@@ -4490,7 +4430,7 @@ static unsigned short status_calc_batk(struct block_list *bl, struct status_chan
return (unsigned short)cap_value(batk,0,USHRT_MAX);
}
-static unsigned short status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable)
+unsigned short status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable)
{
if(!sc || !sc->count)
return cap_value(watk,0,USHRT_MAX);
@@ -4579,9 +4519,8 @@ static unsigned short status_calc_watk(struct block_list *bl, struct status_chan
return (unsigned short)cap_value(watk,0,USHRT_MAX);
}
+unsigned short status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) {
#ifdef RENEWAL
-static unsigned short status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk)
-{
if (!sc || !sc->count)
return cap_value(matk,0,USHRT_MAX);
@@ -4604,9 +4543,11 @@ static unsigned short status_calc_ematk(struct block_list *bl, struct status_cha
if(sc->data[SC_IZAYOI])
matk += 25 * sc->data[SC_IZAYOI]->val1;
return (unsigned short)cap_value(matk,0,USHRT_MAX);
-}
+#else
+ return 0;
#endif
-static unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable)
+}
+unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable)
{
if(!sc || !sc->count)
return cap_value(matk,0,USHRT_MAX);
@@ -4655,7 +4596,7 @@ static unsigned short status_calc_matk(struct block_list *bl, struct status_chan
return (unsigned short)cap_value(matk,0,USHRT_MAX);
}
-static signed short status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) {
+signed short status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) {
if(!sc || !sc->count)
return cap_value(critical,10,SHRT_MAX);
@@ -4690,7 +4631,7 @@ static signed short status_calc_critical(struct block_list *bl, struct status_ch
return (short)cap_value(critical,10,SHRT_MAX);
}
-static signed short status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable)
+signed short status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable)
{
if(!sc || !sc->count)
@@ -4736,11 +4677,11 @@ static signed short status_calc_hit(struct block_list *bl, struct status_change
return (short)cap_value(hit,1,SHRT_MAX);
}
-static signed short status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) {
+signed short status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) {
if( bl->type == BL_PC ) {
if( map_flag_gvg2(bl->m) )
flee -= flee * battle_config.gvg_flee_penalty/100;
- else if( maplist[bl->m].flag.battleground )
+ else if( map->list[bl->m].flag.battleground )
flee -= flee * battle_config.bg_flee_penalty/100;
}
@@ -4821,7 +4762,7 @@ static signed short status_calc_flee(struct block_list *bl, struct status_change
return (short)cap_value(flee,1,SHRT_MAX);
}
-static signed short status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable)
+signed short status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable)
{
if(!sc || !sc->count)
return cap_value(flee2,10,SHRT_MAX);
@@ -5082,7 +5023,7 @@ signed short status_calc_mdef2(struct block_list *bl, struct status_change *sc,
#endif
}
-static unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc, int speed)
+unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc, int speed)
{
TBL_PC* sd = BL_CAST(BL_PC, bl);
int speed_rate;
@@ -5267,11 +5208,10 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
return (short)cap_value(speed,10,USHRT_MAX);
}
-#ifdef RENEWAL_ASPD
// flag&1 - fixed value [malufett]
// flag&2 - percentage value
-static short status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag)
-{
+short status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag) {
+#ifdef RENEWAL_ASPD
int i, pots = 0, skills1 = 0, skills2 = 0;
if(!sc || !sc->count)
@@ -5383,10 +5323,12 @@ static short status_calc_aspd(struct block_list *bl, struct status_change *sc, s
}
}
return ( flag&1? (skills1 + pots) : skills2 );
-}
+#else
+ return 0;
#endif
+}
-static short status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, int aspd) {
+short status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, int aspd) {
if (!sc || !sc->count)
return cap_value(aspd, 0, 2000);
@@ -5406,7 +5348,7 @@ static short status_calc_fix_aspd(struct block_list *bl, struct status_change *s
/// Calculates an object's ASPD modifier (alters the base amotion value).
/// Note that the scale of aspd_rate is 1000 = 100%.
-static short status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int aspd_rate)
+short status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int aspd_rate)
{
int i;
@@ -5543,8 +5485,8 @@ static short status_calc_aspd_rate(struct block_list *bl, struct status_change *
return (short)cap_value(aspd_rate,0,SHRT_MAX);
}
-static unsigned short status_calc_dmotion(struct block_list *bl, struct status_change *sc, int dmotion) {
- if( !sc || !sc->count || map_flag_gvg2(bl->m) || maplist[bl->m].flag.battleground )
+unsigned short status_calc_dmotion(struct block_list *bl, struct status_change *sc, int dmotion) {
+ if( !sc || !sc->count || map_flag_gvg2(bl->m) || map->list[bl->m].flag.battleground )
return cap_value(dmotion,0,USHRT_MAX);
/**
* It has been confirmed on official servers that MvP mobs have no dmotion even without endure
@@ -5557,7 +5499,7 @@ static unsigned short status_calc_dmotion(struct block_list *bl, struct status_c
return (unsigned short)cap_value(dmotion,0,USHRT_MAX);
}
-static unsigned int status_calc_maxhp(struct block_list *bl, struct status_change *sc, uint64 maxhp)
+unsigned int status_calc_maxhp(struct block_list *bl, struct status_change *sc, uint64 maxhp)
{
if(!sc || !sc->count)
return (unsigned int)cap_value(maxhp,1,UINT_MAX);
@@ -5618,7 +5560,7 @@ static unsigned int status_calc_maxhp(struct block_list *bl, struct status_chang
return (unsigned int)cap_value(maxhp,1,UINT_MAX);
}
-static unsigned int status_calc_maxsp(struct block_list *bl, struct status_change *sc, unsigned int maxsp)
+unsigned int status_calc_maxsp(struct block_list *bl, struct status_change *sc, unsigned int maxsp)
{
if(!sc || !sc->count)
return cap_value(maxsp,1,UINT_MAX);
@@ -5641,7 +5583,7 @@ static unsigned int status_calc_maxsp(struct block_list *bl, struct status_chang
return cap_value(maxsp,1,UINT_MAX);
}
-static unsigned char status_calc_element(struct block_list *bl, struct status_change *sc, int element)
+unsigned char status_calc_element(struct block_list *bl, struct status_change *sc, int element)
{
if(!sc || !sc->count)
return element;
@@ -5662,7 +5604,7 @@ static unsigned char status_calc_element(struct block_list *bl, struct status_ch
return (unsigned char)cap_value(element,0,UCHAR_MAX);
}
-static unsigned char status_calc_element_lv(struct block_list *bl, struct status_change *sc, int lv)
+unsigned char status_calc_element_lv(struct block_list *bl, struct status_change *sc, int lv)
{
if(!sc || !sc->count)
return lv;
@@ -5719,7 +5661,7 @@ unsigned char status_calc_attack_element(struct block_list *bl, struct status_ch
return (unsigned char)cap_value(element,0,UCHAR_MAX);
}
-static unsigned short status_calc_mode(struct block_list *bl, struct status_change *sc, int mode)
+unsigned short status_calc_mode(struct block_list *bl, struct status_change *sc, int mode)
{
if(!sc || !sc->count)
return mode;
@@ -5737,11 +5679,11 @@ static unsigned short status_calc_mode(struct block_list *bl, struct status_chan
const char* status_get_name(struct block_list *bl) {
nullpo_ret(bl);
switch (bl->type) {
- case BL_PC: return ((TBL_PC *)bl)->fakename[0] != '\0' ? ((TBL_PC*)bl)->fakename : ((TBL_PC*)bl)->status.name;
- case BL_MOB: return ((TBL_MOB*)bl)->name;
- case BL_PET: return ((TBL_PET*)bl)->pet.name;
- case BL_HOM: return ((TBL_HOM*)bl)->homunculus.name;
- case BL_NPC: return ((TBL_NPC*)bl)->name;
+ case BL_PC: return ((TBL_PC *)bl)->fakename[0] != '\0' ? ((TBL_PC*)bl)->fakename : ((TBL_PC*)bl)->status.name;
+ case BL_MOB: return ((TBL_MOB*)bl)->name;
+ case BL_PET: return ((TBL_PET*)bl)->pet.name;
+ case BL_HOM: return ((TBL_HOM*)bl)->homunculus.name;
+ case BL_NPC: return ((TBL_NPC*)bl)->name;
}
return "Unknown";
}
@@ -5755,13 +5697,13 @@ const char* status_get_name(struct block_list *bl) {
int status_get_class(struct block_list *bl) {
nullpo_ret(bl);
switch( bl->type ) {
- case BL_PC: return ((TBL_PC*)bl)->status.class_;
- case BL_MOB: return ((TBL_MOB*)bl)->vd->class_; //Class used on all code should be the view class of the mob.
- case BL_PET: return ((TBL_PET*)bl)->pet.class_;
- case BL_HOM: return ((TBL_HOM*)bl)->homunculus.class_;
- case BL_MER: return ((TBL_MER*)bl)->mercenary.class_;
- case BL_NPC: return ((TBL_NPC*)bl)->class_;
- case BL_ELEM: return ((TBL_ELEM*)bl)->elemental.class_;
+ case BL_PC: return ((TBL_PC*)bl)->status.class_;
+ case BL_MOB: return ((TBL_MOB*)bl)->vd->class_; //Class used on all code should be the view class of the mob.
+ case BL_PET: return ((TBL_PET*)bl)->pet.class_;
+ case BL_HOM: return ((TBL_HOM*)bl)->homunculus.class_;
+ case BL_MER: return ((TBL_MER*)bl)->mercenary.class_;
+ case BL_NPC: return ((TBL_NPC*)bl)->class_;
+ case BL_ELEM: return ((TBL_ELEM*)bl)->elemental.class_;
}
return 0;
}
@@ -5774,13 +5716,13 @@ int status_get_class(struct block_list *bl) {
int status_get_lv(struct block_list *bl) {
nullpo_ret(bl);
switch (bl->type) {
- case BL_PC: return ((TBL_PC*)bl)->status.base_level;
- case BL_MOB: return ((TBL_MOB*)bl)->level;
- case BL_PET: return ((TBL_PET*)bl)->pet.level;
- case BL_HOM: return ((TBL_HOM*)bl)->homunculus.level;
- case BL_MER: return ((TBL_MER*)bl)->db->lv;
- case BL_ELEM: return ((TBL_ELEM*)bl)->db->lv;
- case BL_NPC: return ((TBL_NPC*)bl)->level;
+ case BL_PC: return ((TBL_PC*)bl)->status.base_level;
+ case BL_MOB: return ((TBL_MOB*)bl)->level;
+ case BL_PET: return ((TBL_PET*)bl)->pet.level;
+ case BL_HOM: return ((TBL_HOM*)bl)->homunculus.level;
+ case BL_MER: return ((TBL_MER*)bl)->db->lv;
+ case BL_ELEM: return ((TBL_ELEM*)bl)->db->lv;
+ case BL_NPC: return ((TBL_NPC*)bl)->level;
}
return 1;
}
@@ -5789,29 +5731,29 @@ struct regen_data *status_get_regen_data(struct block_list *bl)
{
nullpo_retr(NULL, bl);
switch (bl->type) {
- case BL_PC: return &((TBL_PC*)bl)->regen;
- case BL_HOM: return &((TBL_HOM*)bl)->regen;
- case BL_MER: return &((TBL_MER*)bl)->regen;
- case BL_ELEM: return &((TBL_ELEM*)bl)->regen;
- default:
- return NULL;
+ case BL_PC: return &((TBL_PC*)bl)->regen;
+ case BL_HOM: return &((TBL_HOM*)bl)->regen;
+ case BL_MER: return &((TBL_MER*)bl)->regen;
+ case BL_ELEM: return &((TBL_ELEM*)bl)->regen;
+ default:
+ return NULL;
}
}
struct status_data *status_get_status_data(struct block_list *bl)
{
- nullpo_retr(&dummy_status, bl);
+ nullpo_retr(&status->dummy, bl);
switch (bl->type) {
- case BL_PC: return &((TBL_PC*)bl)->battle_status;
- case BL_MOB: return &((TBL_MOB*)bl)->status;
- case BL_PET: return &((TBL_PET*)bl)->status;
- case BL_HOM: return &((TBL_HOM*)bl)->battle_status;
- case BL_MER: return &((TBL_MER*)bl)->battle_status;
- case BL_ELEM: return &((TBL_ELEM*)bl)->battle_status;
- case BL_NPC: return ((mob->db_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : &dummy_status);
- default:
- return &dummy_status;
+ case BL_PC: return &((TBL_PC*)bl)->battle_status;
+ case BL_MOB: return &((TBL_MOB*)bl)->status;
+ case BL_PET: return &((TBL_PET*)bl)->status;
+ case BL_HOM: return &((TBL_HOM*)bl)->battle_status;
+ case BL_MER: return &((TBL_MER*)bl)->battle_status;
+ case BL_ELEM: return &((TBL_ELEM*)bl)->battle_status;
+ case BL_NPC: return ((mob->db_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : &status->dummy);
+ default:
+ return &status->dummy;
}
}
@@ -5819,15 +5761,15 @@ struct status_data *status_get_base_status(struct block_list *bl)
{
nullpo_retr(NULL, bl);
switch (bl->type) {
- case BL_PC: return &((TBL_PC*)bl)->base_status;
- case BL_MOB: return ((TBL_MOB*)bl)->base_status ? ((TBL_MOB*)bl)->base_status : &((TBL_MOB*)bl)->db->status;
- case BL_PET: return &((TBL_PET*)bl)->db->status;
- case BL_HOM: return &((TBL_HOM*)bl)->base_status;
- case BL_MER: return &((TBL_MER*)bl)->base_status;
- case BL_ELEM: return &((TBL_ELEM*)bl)->base_status;
- case BL_NPC: return ((mob->db_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : NULL);
- default:
- return NULL;
+ case BL_PC: return &((TBL_PC*)bl)->base_status;
+ case BL_MOB: return ((TBL_MOB*)bl)->base_status ? ((TBL_MOB*)bl)->base_status : &((TBL_MOB*)bl)->db->status;
+ case BL_PET: return &((TBL_PET*)bl)->db->status;
+ case BL_HOM: return &((TBL_HOM*)bl)->base_status;
+ case BL_MER: return &((TBL_MER*)bl)->base_status;
+ case BL_ELEM: return &((TBL_ELEM*)bl)->base_status;
+ case BL_NPC: return ((mob->db_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : NULL);
+ default:
+ return NULL;
}
}
defType status_get_def(struct block_list *bl) {
@@ -6004,13 +5946,13 @@ struct view_data* status_get_viewdata(struct block_list *bl)
{
nullpo_retr(NULL, bl);
switch (bl->type) {
- case BL_PC: return &((TBL_PC*)bl)->vd;
- case BL_MOB: return ((TBL_MOB*)bl)->vd;
- case BL_PET: return &((TBL_PET*)bl)->vd;
- case BL_NPC: return ((TBL_NPC*)bl)->vd;
- case BL_HOM: return ((TBL_HOM*)bl)->vd;
- case BL_MER: return ((TBL_MER*)bl)->vd;
- case BL_ELEM: return ((TBL_ELEM*)bl)->vd;
+ case BL_PC: return &((TBL_PC*)bl)->vd;
+ case BL_MOB: return ((TBL_MOB*)bl)->vd;
+ case BL_PET: return &((TBL_PET*)bl)->vd;
+ case BL_NPC: return ((TBL_NPC*)bl)->vd;
+ case BL_HOM: return ((TBL_HOM*)bl)->vd;
+ case BL_MER: return ((TBL_MER*)bl)->vd;
+ case BL_ELEM: return ((TBL_ELEM*)bl)->vd;
}
return NULL;
}
@@ -6039,24 +5981,24 @@ void status_set_viewdata(struct block_list *bl, int class_)
if (pcdb_checkid(class_)) {
if (sd->sc.option&OPTION_RIDING) {
switch (class_) { //Adapt class to a Mounted one.
- case JOB_KNIGHT:
- class_ = JOB_KNIGHT2;
- break;
- case JOB_CRUSADER:
- class_ = JOB_CRUSADER2;
- break;
- case JOB_LORD_KNIGHT:
- class_ = JOB_LORD_KNIGHT2;
- break;
- case JOB_PALADIN:
- class_ = JOB_PALADIN2;
- break;
- case JOB_BABY_KNIGHT:
- class_ = JOB_BABY_KNIGHT2;
- break;
- case JOB_BABY_CRUSADER:
- class_ = JOB_BABY_CRUSADER2;
- break;
+ case JOB_KNIGHT:
+ class_ = JOB_KNIGHT2;
+ break;
+ case JOB_CRUSADER:
+ class_ = JOB_CRUSADER2;
+ break;
+ case JOB_LORD_KNIGHT:
+ class_ = JOB_LORD_KNIGHT2;
+ break;
+ case JOB_PALADIN:
+ class_ = JOB_PALADIN2;
+ break;
+ case JOB_BABY_KNIGHT:
+ class_ = JOB_BABY_KNIGHT2;
+ break;
+ case JOB_BABY_CRUSADER:
+ class_ = JOB_BABY_CRUSADER2;
+ break;
}
}
sd->vd.class_ = class_;
@@ -6328,9 +6270,6 @@ int status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int ti
tick -= 1000 * ((status->get_lv(bl) / 10) + ((sd?sd->status.job_level:0) / 5));
tick = max(tick,10000);
break;
- case SC_MANDRAGORA:
- sc_def = (st->vit+st->luk)/5;
- break;
case SC_KYOUGAKU:
tick -= 1000 * status_get_int(bl) / 20;
break;
@@ -6458,7 +6397,7 @@ void status_display_add(struct map_session_data *sd, enum sc_type type, int dval
return;
}
- entry = ers_alloc(pc_sc_display_ers, struct sc_display_entry);
+ entry = ers_alloc(pc->sc_display_ers, struct sc_display_entry);
entry->type = type;
entry->val1 = dval1;
@@ -6479,7 +6418,7 @@ void status_display_remove(struct map_session_data *sd, enum sc_type type) {
if( i != sd->sc_display_count ) {
int cursor;
- ers_free(pc_sc_display_ers, sd->sc_display[i]);
+ ers_free(pc->sc_display_ers, sd->sc_display[i]);
sd->sc_display[i] = NULL;
/* the all-mighty compact-o-matic */
@@ -7277,7 +7216,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
}
vd = status->get_viewdata(bl);
- calc_flag = StatusChangeFlagTable[type];
+ calc_flag = status->ChangeFlagTable[type];
if(!(flag&4)) { //&4 - Do not parse val settings when loading SCs
switch(type) {
case SC_DEC_AGI:
@@ -7286,7 +7225,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
break;
case SC_ENDURE:
val2 = 7; // Hit-count [Celest]
- if( !(flag&1) && (bl->type&(BL_PC|BL_MER)) && !map_flag_gvg(bl->m) && !maplist[bl->m].flag.battleground && !val4 ) {
+ if( !(flag&1) && (bl->type&(BL_PC|BL_MER)) && !map_flag_gvg(bl->m) && !map->list[bl->m].flag.battleground && !val4 ) {
struct map_session_data *tsd;
if( sd ) {
int i;
@@ -7581,7 +7520,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
if (sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_ROGUE)
val3 -= 40;
val4 = 10+val1*2; //SP cost.
- if (map_flag_gvg(bl->m) || maplist[bl->m].flag.battleground) val4 *= 5;
+ if (map_flag_gvg(bl->m) || map->list[bl->m].flag.battleground) val4 *= 5;
break;
case SC_CLOAKING:
if (!sd) //Monsters should be able to walk with no penalties. [Skotlex]
@@ -7779,7 +7718,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
// Inherits Status From Source
const enum sc_type types[] = { SC_AUTOGUARD, SC_DEFENDER, SC_REFLECTSHIELD, SC_ENDURE };
enum sc_type type2;
- int i = (map_flag_gvg(bl->m) || maplist[bl->m].flag.battleground)?2:3;
+ int i = (map_flag_gvg(bl->m) || map->list[bl->m].flag.battleground)?2:3;
while( i >= 0 ) {
type2 = types[i];
if( d_sc->data[type2] )
@@ -8732,7 +8671,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val_flag |= 1;
break;
default:
- if( calc_flag == SCB_NONE && StatusSkillChangeTable[type] == 0 && StatusIconChangeTable[type] == 0 )
+ if( calc_flag == SCB_NONE && status->SkillChangeTable[type] == 0 && status->IconChangeTable[type] == 0 )
{ //Status change with no calc, no icon, and no skill associated...?
ShowError("UnknownStatusChange [%d]\n", type);
return 0;
@@ -8768,7 +8707,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
}
/* [Ind/Hercules] */
- if( sd && StatusDisplayType[type] ) {
+ if( sd && status->DisplayType[type] ) {
int dval1 = 0, dval2 = 0, dval3 = 0;
switch( type ) {
case SC_ALL_RIDING:
@@ -8778,7 +8717,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
dval1 = val1;
break;
}
- status_display_add(sd,type,dval1,dval2,dval3);
+ status->display_add(sd,type,dval1,dval2,dval3);
}
//Those that make you stop attacking/walking....
@@ -9036,8 +8975,8 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
calc_flag&=~SCB_DYE;
}
- if( !(flag&4 && StatusDisplayType[type]) )
- clif->status_change(bl,StatusIconChangeTable[type],1,tick,(val_flag&1)?val1:1,(val_flag&2)?val2:0,(val_flag&4)?val3:0);
+ if( !(flag&4 && status->DisplayType[type]) )
+ clif->status_change(bl,status->IconChangeTable[type],1,tick,(val_flag&1)?val1:1,(val_flag&2)?val2:0,(val_flag&4)?val3:0);
/**
* used as temporary storage for scs with interval ticks, so that the actual duration is sent to the client first.
@@ -9051,7 +8990,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
timer->delete(sce->timer, status->change_timer);
} else {// new sc
++(sc->count);
- sce = sc->data[type] = ers_alloc(sc_data_ers, struct status_change_entry);
+ sce = sc->data[type] = ers_alloc(status->data_ers, struct status_change_entry);
}
sce->val1 = val1;
sce->val2 = val2;
@@ -9204,7 +9143,7 @@ int status_change_clear(struct block_list* bl, int type) {
(sc->count)--;
if (sc->data[i]->timer != INVALID_TIMER)
timer->delete(sc->data[i]->timer, status->change_timer);
- ers_free(sc_data_ers, sc->data[i]);
+ ers_free(status->data_ers, sc->data[i]);
sc->data[i] = NULL;
}
}
@@ -9278,12 +9217,12 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
sc->data[type] = NULL;
- if( sd && StatusDisplayType[type] ) {
- status_display_remove(sd,type);
+ if( sd && status->DisplayType[type] ) {
+ status->display_remove(sd,type);
}
vd = status->get_viewdata(bl);
- calc_flag = StatusChangeFlagTable[type];
+ calc_flag = status->ChangeFlagTable[type];
switch(type) {
case SC_GRANITIC_ARMOR:
{
@@ -9886,7 +9825,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
}
//On Aegis, when turning off a status change, first goes the sc packet, then the option packet.
- clif->sc_end(bl,bl->id,AREA,StatusIconChangeTable[type]);
+ clif->sc_end(bl,bl->id,AREA,status->IconChangeTable[type]);
if( opt_flag&8 ) //bugreport:681
clif->changeoption2(bl);
@@ -9910,7 +9849,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
if(opt_flag&2 && sd && map->getcell(bl->m,bl->x,bl->y,CELL_CHKNPC))
npc->touch_areanpc(sd,bl->m,bl->x,bl->y); //Trigger on-touch event.
- ers_free(sc_data_ers, sce);
+ ers_free(status->data_ers, sce);
return 1;
}
@@ -10059,7 +9998,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) {
sc->opt1 = OPT1_STONE;
clif->changeoption(bl);
sc_timer_next(1000+tick, status->change_timer, bl->id, data );
- status_calc_bl(bl, StatusChangeFlagTable[type]);
+ status_calc_bl(bl, status->ChangeFlagTable[type]);
return 0;
}
if(--(sce->val3) > 0) {
@@ -10833,8 +10772,8 @@ int status_change_timer_sub(struct block_list* bl, va_list ap) {
int status_get_total_def(struct block_list *src) { return status->get_status_data(src)->def2 + (short)status->get_def(src); }
int status_get_total_mdef(struct block_list *src) { return status->get_status_data(src)->mdef2 + (short)status_get_mdef(src); }
-#ifdef RENEWAL
int status_get_weapon_atk(struct block_list *bl, struct weapon_atk *watk, int flag) {
+#ifdef RENEWAL
int min = 0, max = 0, dstr;
float strdex_bonus, variance;
struct status_change *sc = status->get_sc(bl);
@@ -10865,11 +10804,13 @@ int status_get_weapon_atk(struct block_list *bl, struct weapon_atk *watk, int fl
if( bl->type == BL_PC && ((TBL_PC*)bl)->right_weapon.overrefine > 0 && !(flag&2) )
max += rnd()%((TBL_PC*)bl)->right_weapon.overrefine + 1;
- max = status_calc_watk(bl, sc, max, false);
+ max = status->calc_watk(bl, sc, max, false);
return max;
-}
+#else
+ return 0;
#endif
+}
#define GETRANDMATK(st) do {\
if( (st)->matk_max > (st)->matk_min ) \
@@ -10911,7 +10852,7 @@ int status_get_matk(struct block_list *bl, int flag) {
if( sd && sd->bonus.ematk > 0 && flag != 3 )
st->matk_min += sd->bonus.ematk;
if( flag != 3 )
- st->matk_min = status_calc_ematk(bl, sc, st->matk_min);
+ st->matk_min = status->calc_ematk(bl, sc, st->matk_min);
st->matk_max = st->matk_min;
@@ -10949,8 +10890,8 @@ int status_get_matk(struct block_list *bl, int flag) {
if( flag ) // get unmodified from sc matk
GETRANDMATK(st);
- st->matk_min = status_calc_matk(bl, sc, st->matk_min, true);
- st->matk_max = status_calc_matk(bl, sc, st->matk_max, true);
+ st->matk_min = status->calc_matk(bl, sc, st->matk_min, true);
+ st->matk_max = status->calc_matk(bl, sc, st->matk_max, true);
return 0;
}
@@ -11106,8 +11047,7 @@ int status_change_spread( struct block_list *src, struct block_list *bl ) {
}
//Natural regen related stuff.
-static unsigned int natural_heal_prev_tick,natural_heal_diff_tick;
-static int status_natural_heal(struct block_list* bl, va_list args) {
+int status_natural_heal(struct block_list* bl, va_list args) {
struct regen_data *regen;
struct status_data *st;
struct status_change *sc;
@@ -11140,9 +11080,9 @@ static int status_natural_heal(struct block_list* bl, va_list args) {
if (sd) {
if (sd->hp_loss.value || sd->sp_loss.value)
- pc->bleeding(sd, natural_heal_diff_tick);
+ pc->bleeding(sd, status->natural_heal_diff_tick);
if (sd->hp_regen.value || sd->sp_regen.value)
- pc->regen(sd, natural_heal_diff_tick);
+ pc->regen(sd, status->natural_heal_diff_tick);
}
if (flag&(RGN_SHP|RGN_SSP)
@@ -11154,7 +11094,7 @@ static int status_natural_heal(struct block_list* bl, va_list args) {
sregen = regen->ssregen;
if(flag&(RGN_SHP)) {
//Sitting HP regen
- val = natural_heal_diff_tick * sregen->rate.hp;
+ val = status->natural_heal_diff_tick * sregen->rate.hp;
if (regen->state.overweight)
val>>=1; //Half as fast when overweight.
sregen->tick.hp += val;
@@ -11169,7 +11109,7 @@ static int status_natural_heal(struct block_list* bl, va_list args) {
}
if(flag&(RGN_SSP)) {
//Sitting SP regen
- val = natural_heal_diff_tick * sregen->rate.sp;
+ val = status->natural_heal_diff_tick * sregen->rate.sp;
if (regen->state.overweight)
val>>=1; //Half as fast when overweight.
sregen->tick.sp += val;
@@ -11208,7 +11148,7 @@ static int status_natural_heal(struct block_list* bl, va_list args) {
//Natural Hp regen
if (flag&RGN_HP) {
- rate = natural_heal_diff_tick*(regen->rate.hp+bonus);
+ rate = status->natural_heal_diff_tick*(regen->rate.hp+bonus);
if (ud && ud->walktimer != INVALID_TIMER)
rate/=2;
// Homun HP regen fix (they should regen as if they were sitting (twice as fast)
@@ -11229,7 +11169,7 @@ static int status_natural_heal(struct block_list* bl, va_list args) {
//Natural SP regen
if(flag&RGN_SP) {
- rate = natural_heal_diff_tick*(regen->rate.sp+bonus);
+ rate = status->natural_heal_diff_tick*(regen->rate.sp+bonus);
// Homun SP regen fix (they should regen as if they were sitting (twice as fast)
if(bl->type==BL_HOM) rate *=2;
@@ -11254,7 +11194,7 @@ static int status_natural_heal(struct block_list* bl, va_list args) {
if(flag&RGN_SHP) {
//Skill HP regen
- sregen->tick.hp += natural_heal_diff_tick * sregen->rate.hp;
+ sregen->tick.hp += status->natural_heal_diff_tick * sregen->rate.hp;
while(sregen->tick.hp >= (unsigned int)battle_config.natural_heal_skill_interval) {
sregen->tick.hp -= battle_config.natural_heal_skill_interval;
@@ -11264,7 +11204,7 @@ static int status_natural_heal(struct block_list* bl, va_list args) {
}
if(flag&RGN_SSP) {
//Skill SP regen
- sregen->tick.sp += natural_heal_diff_tick * sregen->rate.sp;
+ sregen->tick.sp += status->natural_heal_diff_tick * sregen->rate.sp;
while(sregen->tick.sp >= (unsigned int)battle_config.natural_heal_skill_interval) {
val = sregen->sp;
if (sd && sd->state.doridori) {
@@ -11291,10 +11231,10 @@ static int status_natural_heal(struct block_list* bl, va_list args) {
}
//Natural heal main timer.
-static int status_natural_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
- natural_heal_diff_tick = DIFF_TICK(tick,natural_heal_prev_tick);
- map->map_foreachregen(status_natural_heal);
- natural_heal_prev_tick = tick;
+int status_natural_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ status->natural_heal_diff_tick = DIFF_TICK(tick,status->natural_heal_prev_tick);
+ map->foreachregen(status->natural_heal);
+ status->natural_heal_prev_tick = tick;
return 0;
}
@@ -11309,7 +11249,7 @@ int status_get_refine_chance(enum refine_type wlv, int refine) {
if ( refine < 0 || refine >= MAX_REFINE)
return 0;
- return refine_info[wlv].chance[refine];
+ return status->refine_info[wlv].chance[refine];
}
int status_get_sc_type(sc_type type) {
@@ -11317,7 +11257,7 @@ int status_get_sc_type(sc_type type) {
if( type <= SC_NONE || type >= SC_MAX )
return 0;
- return sc_conf[type];
+ return status->sc_conf[type];
}
/*------------------------------------------
@@ -11327,7 +11267,7 @@ int status_get_sc_type(sc_type type) {
* size_fix.txt - size adjustment table for weapons
* refine_db.txt - refining data table
*------------------------------------------*/
-static bool status_readdb_job1(char* fields[], int columns, int current)
+bool status_readdb_job1(char* fields[], int columns, int current)
{// Job-specific values (weight, HP, SP, ASPD)
int idx, class_;
unsigned int i;
@@ -11341,22 +11281,22 @@ static bool status_readdb_job1(char* fields[], int columns, int current)
}
idx = pc->class2idx(class_);
- max_weight_base[idx] = atoi(fields[1]);
- hp_coefficient[idx] = atoi(fields[2]);
- hp_coefficient2[idx] = atoi(fields[3]);
- sp_coefficient[idx] = atoi(fields[4]);
+ status->max_weight_base[idx] = atoi(fields[1]);
+ status->hp_coefficient[idx] = atoi(fields[2]);
+ status->hp_coefficient2[idx] = atoi(fields[3]);
+ status->sp_coefficient[idx] = atoi(fields[4]);
#ifdef RENEWAL_ASPD
for(i = 0; i <= MAX_WEAPON_TYPE; i++)
#else
for(i = 0; i < MAX_WEAPON_TYPE; i++)
#endif
{
- aspd_base[idx][i] = atoi(fields[i+5]);
+ status->aspd_base[idx][i] = atoi(fields[i+5]);
}
return true;
}
-static bool status_readdb_job2(char* fields[], int columns, int current)
+bool status_readdb_job2(char* fields[], int columns, int current)
{
int idx, class_, i;
@@ -11371,23 +11311,23 @@ static bool status_readdb_job2(char* fields[], int columns, int current)
for(i = 1; i < columns; i++)
{
- job_bonus[idx][i-1] = atoi(fields[i]);
+ status->job_bonus[idx][i-1] = atoi(fields[i]);
}
return true;
}
-static bool status_readdb_sizefix(char* fields[], int columns, int current)
+bool status_readdb_sizefix(char* fields[], int columns, int current)
{
unsigned int i;
for(i = 0; i < MAX_WEAPON_TYPE; i++)
{
- atkmods[current][i] = atoi(fields[i]);
+ status->atkmods[current][i] = atoi(fields[i]);
}
return true;
}
-static bool status_readdb_refine(char* fields[], int columns, int current)
+bool status_readdb_refine(char* fields[], int columns, int current)
{
int i, bonus_per_level, random_bonus, random_bonus_start_level;
@@ -11409,19 +11349,19 @@ static bool status_readdb_refine(char* fields[], int columns, int current)
*delim = '\0';
- refine_info[current].chance[i] = atoi(fields[4+i]);
+ status->refine_info[current].chance[i] = atoi(fields[4+i]);
if (i >= random_bonus_start_level - 1)
- refine_info[current].randombonus_max[i] = random_bonus * (i - random_bonus_start_level + 2);
+ status->refine_info[current].randombonus_max[i] = random_bonus * (i - random_bonus_start_level + 2);
- refine_info[current].bonus[i] = bonus_per_level + atoi(delim+1);
+ status->refine_info[current].bonus[i] = bonus_per_level + atoi(delim+1);
if (i > 0)
- refine_info[current].bonus[i] += refine_info[current].bonus[i-1];
+ status->refine_info[current].bonus[i] += status->refine_info[current].bonus[i-1];
}
return true;
}
-static bool status_readdb_scconfig(char* fields[], int columns, int current) {
+bool status_readdb_scconfig(char* fields[], int columns, int current) {
int val = 0;
char* type = fields[0];
@@ -11430,46 +11370,44 @@ static bool status_readdb_scconfig(char* fields[], int columns, int current) {
return false;
}
- sc_conf[val] = (int)strtol(fields[1], NULL, 0);
+ status->sc_conf[val] = (int)strtol(fields[1], NULL, 0);
return true;
}
-/*
-* Read status db
-* job1.txt
-* job2.txt
-* size_fixe.txt
-* refine_db.txt
-*/
+/**
+ * Read status db
+ * job1.txt
+ * job2.txt
+ * size_fixe.txt
+ * refine_db.txt
+ **/
int status_readdb(void)
{
int i, j;
// initialize databases to default
//
-
- // reset job_db1.txt data
- memset(max_weight_base, 0, sizeof(max_weight_base));
- memset(hp_coefficient, 0, sizeof(hp_coefficient));
- memset(hp_coefficient2, 0, sizeof(hp_coefficient2));
- memset(sp_coefficient, 0, sizeof(sp_coefficient));
- memset(aspd_base, 0, sizeof(aspd_base));
- // reset job_db2.txt data
- memset(job_bonus,0,sizeof(job_bonus)); // Job-specific stats bonus
-
+ if( runflag == MAPSERVER_ST_RUNNING ) {//not necessary during boot
+ // reset job_db1.txt data
+ memset(status->max_weight_base, 0, sizeof(status->max_weight_base));
+ memset(status->hp_coefficient, 0, sizeof(status->hp_coefficient));
+ memset(status->hp_coefficient2, 0, sizeof(status->hp_coefficient2));
+ memset(status->sp_coefficient, 0, sizeof(status->sp_coefficient));
+ memset(status->aspd_base, 0, sizeof(status->aspd_base));
+ // reset job_db2.txt data
+ memset(status->job_bonus,0,sizeof(status->job_bonus)); // Job-specific stats bonus
+ }
// size_fix.txt
- for(i=0;i<ARRAYLENGTH(atkmods);i++)
- for(j=0;j<MAX_WEAPON_TYPE;j++)
- atkmods[i][j]=100;
+ for(i = 0; i < ARRAYLENGTH(status->atkmods); i++)
+ for(j = 0; j < MAX_WEAPON_TYPE; j++)
+ status->atkmods[i][j] = 100;
// refine_db.txt
- for(i=0;i<ARRAYLENGTH(refine_info);i++)
- {
- for(j=0;j<MAX_REFINE; j++)
- {
- refine_info[i].chance[j] = 100;
- refine_info[i].bonus[j] = 0;
- refine_info[i].randombonus_max[j] = 0;
+ for(i=0;i<ARRAYLENGTH(status->refine_info);i++) {
+ for(j=0;j<MAX_REFINE; j++) {
+ status->refine_info[i].chance[j] = 100;
+ status->refine_info[i].bonus[j] = 0;
+ status->refine_info[i].randombonus_max[j] = 0;
}
}
@@ -11478,14 +11416,14 @@ int status_readdb(void)
#ifdef RENEWAL_ASPD
- sv->readdb(map->db_path, "re/job_db1.txt", ',', 6+MAX_WEAPON_TYPE, 6+MAX_WEAPON_TYPE, -1, &status_readdb_job1);
+ sv->readdb(map->db_path, "re/job_db1.txt", ',', 6+MAX_WEAPON_TYPE, 6+MAX_WEAPON_TYPE, -1, status->readdb_job1);
#else
- sv->readdb(map->db_path, "pre-re/job_db1.txt", ',', 5+MAX_WEAPON_TYPE, 5+MAX_WEAPON_TYPE, -1, &status_readdb_job1);
+ sv->readdb(map->db_path, "pre-re/job_db1.txt", ',', 5+MAX_WEAPON_TYPE, 5+MAX_WEAPON_TYPE, -1, status->readdb_job1);
#endif
- sv->readdb(map->db_path, "job_db2.txt", ',', 1, 1+MAX_LEVEL, -1, &status_readdb_job2);
- sv->readdb(map->db_path, "size_fix.txt", ',', MAX_WEAPON_TYPE, MAX_WEAPON_TYPE, ARRAYLENGTH(atkmods), &status_readdb_sizefix);
- sv->readdb(map->db_path, DBPATH"refine_db.txt", ',', 4+MAX_REFINE, 4+MAX_REFINE, ARRAYLENGTH(refine_info), &status_readdb_refine);
- sv->readdb(map->db_path, "sc_config.txt", ',', 2, 2, SC_MAX, &status_readdb_scconfig);
+ sv->readdb(map->db_path, "job_db2.txt", ',', 1, 1+MAX_LEVEL, -1, status->readdb_job2);
+ sv->readdb(map->db_path, "size_fix.txt", ',', MAX_WEAPON_TYPE, MAX_WEAPON_TYPE, ARRAYLENGTH(status->atkmods), status->readdb_sizefix);
+ sv->readdb(map->db_path, DBPATH"refine_db.txt", ',', 4+MAX_REFINE, 4+MAX_REFINE, ARRAYLENGTH(status->refine_info), status->readdb_refine);
+ sv->readdb(map->db_path, "sc_config.txt", ',', 2, 2, SC_MAX, status->readdb_scconfig);
return 0;
}
@@ -11495,19 +11433,19 @@ int status_readdb(void)
*------------------------------------------*/
int do_init_status(void) {
timer->add_func_list(status->change_timer,"status_change_timer");
- timer->add_func_list(kaahi_heal_timer,"kaahi_heal_timer");
- timer->add_func_list(status_natural_heal_timer,"status_natural_heal_timer");
- initChangeTables();
- initDummyData();
+ timer->add_func_list(status->kaahi_heal_timer,"status_kaahi_heal_timer");
+ timer->add_func_list(status->natural_heal_timer,"status_natural_heal_timer");
+ status->initChangeTables();
+ status->initDummyData();
status->readdb();
- status_calc_sigma();
- natural_heal_prev_tick = timer->gettick();
- sc_data_ers = ers_new(sizeof(struct status_change_entry),"status.c::sc_data_ers",ERS_OPT_NONE);
- timer->add_interval(natural_heal_prev_tick + NATURAL_HEAL_INTERVAL, status_natural_heal_timer, 0, 0, NATURAL_HEAL_INTERVAL);
+ status->calc_sigma();
+ status->natural_heal_prev_tick = timer->gettick();
+ status->data_ers = ers_new(sizeof(struct status_change_entry),"status.c::data_ers",ERS_OPT_NONE);
+ timer->add_interval(status->natural_heal_prev_tick + NATURAL_HEAL_INTERVAL, status->natural_heal_timer, 0, 0, NATURAL_HEAL_INTERVAL);
return 0;
}
void do_final_status(void) {
- ers_destroy(sc_data_ers);
+ ers_destroy(status->data_ers);
}
/*=====================================
@@ -11519,14 +11457,34 @@ void status_defaults(void) {
status = &status_s;
/* vars */
-
- status->current_equip_item_index = 0; //Contains inventory index of an equipped item. To pass it into the EQUP_SCRIPT [Lupus]
- status->current_equip_card_id = 0; //To prevent card-stacking (from jA) [Skotlex]
//we need it for new cards 15 Feb 2005, to check if the combo cards are insrerted into the CURRENT weapon only
//to avoid cards exploits
+ status->current_equip_item_index = 0; //Contains inventory index of an equipped item. To pass it into the EQUP_SCRIPT [Lupus]
+ status->current_equip_card_id = 0; //To prevent card-stacking (from jA) [Skotlex]
+ memset(status->max_weight_base,0,sizeof(status->max_weight_base)
+ + sizeof(status->hp_coefficient)
+ + sizeof(status->hp_coefficient2)
+ + sizeof(status->hp_sigma_val)
+ + sizeof(status->sp_coefficient)
+ + sizeof(status->aspd_base)
+ + sizeof(status->Skill2SCTable)
+ + sizeof(status->IconChangeTable)
+ + sizeof(status->ChangeFlagTable)
+ + sizeof(status->SkillChangeTable)
+ + sizeof(status->RelevantBLTypes)
+ + sizeof(status->DisplayType)
+ + sizeof(status->refine_info)
+ + sizeof(status->atkmods)
+ + sizeof(status->job_bonus)
+ + sizeof(status->sc_conf)
+ );
+
+ status->data_ers = NULL;
+ memset(&status->dummy, 0, sizeof(status->dummy));
+ status->natural_heal_prev_tick = 0;
+ status->natural_heal_diff_tick = 0;
/* funcs */
-
status->get_refine_chance = status_get_refine_chance;
// for looking up associated data
status->skill2sc = status_skill2sc;
@@ -11600,10 +11558,8 @@ void status_defaults(void) {
status->calc_mdef = status_calc_mdef;
status->calc_mdef2 = status_calc_mdef2;
status->calc_batk = status_calc_batk;
-#ifdef RENEWAL
status->base_matk = status_base_matk;
status->get_weapon_atk = status_get_weapon_atk;
-#endif
status->get_total_mdef = status_get_total_mdef;
status->get_total_def = status_get_total_def;
@@ -11612,4 +11568,46 @@ void status_defaults(void) {
status->readdb = status_readdb;
status->init = do_init_status;
status->final = do_final_status;
+
+ status->initChangeTables = initChangeTables;
+ status->initDummyData = initDummyData;
+ status->base_amotion_pc = status_base_amotion_pc;
+ status->base_atk = status_base_atk;
+ status->calc_sigma = status_calc_sigma;
+ status->base_pc_maxhp = status_base_pc_maxhp;
+ status->base_pc_maxsp = status_base_pc_maxsp;
+ status->calc_npc_ = status_calc_npc_;
+ status->calc_str = status_calc_str;
+ status->calc_agi = status_calc_agi;
+ status->calc_vit = status_calc_vit;
+ status->calc_int = status_calc_int;
+ status->calc_dex = status_calc_dex;
+ status->calc_luk = status_calc_luk;
+ status->calc_watk = status_calc_watk;
+ status->calc_matk = status_calc_matk;
+ status->calc_hit = status_calc_hit;
+ status->calc_critical = status_calc_critical;
+ status->calc_flee = status_calc_flee;
+ status->calc_flee2 = status_calc_flee2;
+ status->calc_speed = status_calc_speed;
+ status->calc_aspd_rate = status_calc_aspd_rate;
+ status->calc_dmotion = status_calc_dmotion;
+ status->calc_aspd = status_calc_aspd;
+ status->calc_fix_aspd = status_calc_fix_aspd;
+ status->calc_maxhp = status_calc_maxhp;
+ status->calc_maxsp = status_calc_maxsp;
+ status->calc_element = status_calc_element;
+ status->calc_element_lv = status_calc_element_lv;
+ status->calc_mode = status_calc_mode;
+ status->calc_ematk = status_calc_ematk;
+ status->calc_bl_main = status_calc_bl_main;
+ status->display_add = status_display_add;
+ status->display_remove = status_display_remove;
+ status->natural_heal = status_natural_heal;
+ status->natural_heal_timer = status_natural_heal_timer;
+ status->readdb_job1 = status_readdb_job1;
+ status->readdb_job2 = status_readdb_job2;
+ status->readdb_sizefix = status_readdb_sizefix;
+ status->readdb_refine = status_readdb_refine;
+ status->readdb_scconfig = status_readdb_scconfig;
}
diff --git a/src/map/status.h b/src/map/status.h
index 16a9be081..c7518a213 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -1,8 +1,12 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
+
#ifndef _STATUS_H_
#define _STATUS_H_
+#include "../common/mmo.h"
+
struct block_list;
struct mob_data;
struct pet_data;
@@ -1580,6 +1584,14 @@ enum scb_flag
SCB_ALL = 0x3FFFFFFF
};
+//Regen related flags.
+enum e_regen {
+ RGN_HP = 0x01,
+ RGN_SP = 0x02,
+ RGN_SHP = 0x04,
+ RGN_SSP = 0x08,
+};
+
//Define to determine who gets HP/SP consumed on doing skills/etc. [Skotlex]
#define BL_CONSUME (BL_PC|BL_HOM|BL_MER|BL_ELEM)
//Define to determine who has regen
@@ -1598,15 +1610,7 @@ typedef struct weapon_atk {
unsigned short matk;
unsigned char wlv;
#endif
-}weapon_atk;
-
-sc_type SkillStatusChangeTable[MAX_SKILL]; // skill -> status
-int StatusIconChangeTable[SC_MAX]; // status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated)
-unsigned int StatusChangeFlagTable[SC_MAX]; // status -> flags
-int StatusSkillChangeTable[SC_MAX]; // status -> skill
-int StatusRelevantBLTypes[SI_MAX]; // "icon" -> enum bl_type (for clif->status_change to identify for which bl types to send packets)
-bool StatusDisplayType[SC_MAX];
-
+} weapon_atk;
//For holding basic status (which can be modified by status changes)
struct status_data {
@@ -1780,6 +1784,13 @@ struct status_change {
#define status_calc_elemental(ed, first) status->calc_bl_(&(ed)->bl, SCB_ALL, first)
#define status_calc_npc(nd, first) status->calc_bl_(&(nd)->bl, SCB_ALL, first)
+// bonus values and upgrade chances for refining equipment
+struct s_refine_info {
+ int chance[MAX_REFINE]; // success chance
+ int bonus[MAX_REFINE]; // cumulative fixed bonus damage
+ int randombonus_max[MAX_REFINE]; // cumulative maximum random bonus damage
+};
+
/*=====================================
* Interface : status.h
* Generated by HerculesInterfaceMaker
@@ -1788,12 +1799,38 @@ struct status_change {
struct status_interface {
/* vars */
-
int current_equip_item_index;
int current_equip_card_id;
-
+ /* */
+ int max_weight_base[CLASS_COUNT];
+ int hp_coefficient[CLASS_COUNT];
+ int hp_coefficient2[CLASS_COUNT];
+ int hp_sigma_val[CLASS_COUNT][MAX_LEVEL+1];
+ int sp_coefficient[CLASS_COUNT];
+#ifdef RENEWAL_ASPD
+ int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1];
+#else
+ int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE]; //[blackhole89]
+#endif
+ sc_type Skill2SCTable[MAX_SKILL]; // skill -> status
+ int IconChangeTable[SC_MAX]; // status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated)
+ unsigned int ChangeFlagTable[SC_MAX]; // status -> flags
+ int SkillChangeTable[SC_MAX]; // status -> skill
+ int RelevantBLTypes[SI_MAX]; // "icon" -> enum bl_type (for clif->status_change to identify for which bl types to send packets)
+ bool DisplayType[SC_MAX];
+ /* */
+ struct s_refine_info refine_info[REFINE_TYPE_MAX];
+ /* */
+ int atkmods[3][MAX_WEAPON_TYPE];//ATK weapon modification for size (size_fix.txt)
+ char job_bonus[CLASS_COUNT][MAX_LEVEL];
+ sc_conf_type sc_conf[SC_MAX];
+ struct eri *data_ers; //For sc_data entries
+ struct status_data dummy;
+ unsigned int natural_heal_prev_tick,natural_heal_diff_tick;
+ /* */
+ int (*init) (void);
+ void (*final) (void);
/* funcs */
-
int (*get_refine_chance) (enum refine_type wlv, int refine);
// for looking up associated data
sc_type (*skill2sc) (int skill_id);
@@ -1801,7 +1838,6 @@ struct status_interface {
unsigned int (*sc2scb_flag) (sc_type sc);
int (*type2relevant_bl_types) (int type);
int (*get_sc_type) (sc_type idx);
-
int (*damage) (struct block_list *src,struct block_list *target,int64 hp,int64 sp, int walkdelay, int flag);
//Define for standard HP/SP skill-related cost triggers (mobs require no HP/SP to use skills)
int (*charge) (struct block_list* bl, int64 hp, int64 sp);
@@ -1811,7 +1847,6 @@ struct status_interface {
int (*set_sp) (struct block_list *bl, unsigned int sp, int flag);
int (*heal) (struct block_list *bl,int64 hp,int64 sp, int flag);
int (*revive) (struct block_list *bl, unsigned char per_hp, unsigned char per_sp);
-
struct regen_data * (*get_regen_data) (struct block_list *bl);
struct status_data * (*get_status_data) (struct block_list *bl);
struct status_data * (*get_base_status) (struct block_list *bl);
@@ -1826,17 +1861,13 @@ struct status_interface {
int (*get_emblem_id) (struct block_list *bl);
int (*get_mexp) (struct block_list *bl);
int (*get_race2) (struct block_list *bl);
-
struct view_data * (*get_viewdata) (struct block_list *bl);
void (*set_viewdata) (struct block_list *bl, int class_);
void (*change_init) (struct block_list *bl);
struct status_change * (*get_sc) (struct block_list *bl);
-
int (*isdead) (struct block_list *bl);
int (*isimmune) (struct block_list *bl);
-
int (*get_sc_def) (struct block_list *bl, enum sc_type type, int rate, int tick, int flag);
-
int (*change_start) (struct block_list* bl,enum sc_type type,int rate,int val1,int val2,int val3,int val4,int tick,int flag);
int (*change_end_) (struct block_list* bl, enum sc_type type, int tid, const char* file, int line);
int (*kaahi_heal_timer) (int tid, unsigned int tick, int id, intptr_t data);
@@ -1844,7 +1875,6 @@ struct status_interface {
int (*change_timer_sub) (struct block_list* bl, va_list ap);
int (*change_clear) (struct block_list* bl, int type);
int (*change_clear_buffs) (struct block_list* bl, int type);
-
void (*calc_bl_) (struct block_list *bl, enum scb_flag flag, bool first);
int (*calc_mob_) (struct mob_data* md, bool first);
int (*calc_pet_) (struct pet_data* pd, bool first);
@@ -1852,35 +1882,66 @@ struct status_interface {
int (*calc_homunculus_) (struct homun_data *hd, bool first);
int (*calc_mercenary_) (struct mercenary_data *md, bool first);
int (*calc_elemental_) (struct elemental_data *ed, bool first);
-
void (*calc_misc) (struct block_list *bl, struct status_data *status, 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]
int (*check_visibility) (struct block_list *src, struct block_list *target); //[Skotlex]
-
int (*change_spread) (struct block_list *src, struct block_list *bl);
-
- defType (*calc_def) (struct block_list *bl, struct status_change *sc, int, bool);
- short (*calc_def2) (struct block_list *, struct status_change *, int, bool);
- defType (*calc_mdef) (struct block_list *bl, struct status_change *sc, int, bool);
- short (*calc_mdef2) (struct block_list *, struct status_change *, int, bool);
- unsigned short (*calc_batk) (struct block_list *, struct status_change *, int, bool);
-
-#ifdef RENEWAL
+ defType (*calc_def) (struct block_list *bl, struct status_change *sc, int def, bool viewable);
+ short (*calc_def2) (struct block_list *bl, struct status_change *sc, int def2, bool viewable);
+ defType (*calc_mdef) (struct block_list *bl, struct status_change *sc, int mdef, bool viewable);
+ short (*calc_mdef2) (struct block_list *bl, struct status_change *sc, int mdef2, bool viewable);
+ unsigned short (*calc_batk)(struct block_list *bl, struct status_change *sc, int batk, bool viewable);
unsigned short (*base_matk) (const struct status_data *st, int level);
int (*get_weapon_atk) (struct block_list *src, struct weapon_atk *watk, int flag);
-#endif
int (*get_total_mdef) (struct block_list *src);
int (*get_total_def) (struct block_list *src);
-
int (*get_matk) (struct block_list *src, int flag);
-
int (*readdb) (void);
- int (*init) (void);
- void (*final) (void);
-} status_s;
+
+ void (*initChangeTables) (void);
+ void (*initDummyData) (void);
+ int (*base_amotion_pc) (struct map_session_data *sd, struct status_data *st);
+ unsigned short (*base_atk) (const struct block_list *bl, const struct status_data *st);
+ void (*calc_sigma) (void);
+ unsigned int (*base_pc_maxhp) (struct map_session_data *sd, struct status_data *st);
+ unsigned int (*base_pc_maxsp) (struct map_session_data *sd, struct status_data *st);
+ int (*calc_npc_) (struct npc_data *nd, bool first);
+ unsigned short (*calc_str) (struct block_list *bl, struct status_change *sc, int str);
+ unsigned short (*calc_agi) (struct block_list *bl, struct status_change *sc, int agi);
+ unsigned short (*calc_vit) (struct block_list *bl, struct status_change *sc, int vit);
+ unsigned short (*calc_int) (struct block_list *bl, struct status_change *sc, int int_);
+ unsigned short (*calc_dex) (struct block_list *bl, struct status_change *sc, int dex);
+ unsigned short (*calc_luk) (struct block_list *bl, struct status_change *sc, int luk);
+ unsigned short (*calc_watk) (struct block_list *bl, struct status_change *sc, int watk, bool viewable);
+ unsigned short (*calc_matk) (struct block_list *bl, struct status_change *sc, int matk, bool viewable);
+ signed short (*calc_hit) (struct block_list *bl, struct status_change *sc, int hit, bool viewable);
+ signed short (*calc_critical) (struct block_list *bl, struct status_change *sc, int critical, bool viewable);
+ signed short (*calc_flee) (struct block_list *bl, struct status_change *sc, int flee, bool viewable);
+ signed short (*calc_flee2) (struct block_list *bl, struct status_change *sc, int flee2, bool viewable);
+ unsigned short (*calc_speed) (struct block_list *bl, struct status_change *sc, int speed);
+ short (*calc_aspd_rate) (struct block_list *bl, struct status_change *sc, int aspd_rate);
+ unsigned short (*calc_dmotion) (struct block_list *bl, struct status_change *sc, int dmotion);
+ short (*calc_aspd) (struct block_list *bl, struct status_change *sc, short flag);
+ short (*calc_fix_aspd) (struct block_list *bl, struct status_change *sc, int aspd);
+ unsigned int (*calc_maxhp) (struct block_list *bl, struct status_change *sc, uint64 maxhp);
+ unsigned int (*calc_maxsp) (struct block_list *bl, struct status_change *sc, unsigned int maxsp);
+ unsigned char (*calc_element) (struct block_list *bl, struct status_change *sc, int element);
+ unsigned char (*calc_element_lv) (struct block_list *bl, struct status_change *sc, int lv);
+ unsigned short (*calc_mode) (struct block_list *bl, struct status_change *sc, int mode);
+ unsigned short (*calc_ematk) (struct block_list *bl, struct status_change *sc, int matk);
+ void (*calc_bl_main) (struct block_list *bl, int flag);
+ void (*display_add) (struct map_session_data *sd, enum sc_type type, int dval1, int dval2, int dval3);
+ void (*display_remove) (struct map_session_data *sd, enum sc_type type);
+ int (*natural_heal) (struct block_list *bl, va_list args);
+ int (*natural_heal_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ bool (*readdb_job1) (char *fields[], int columns, int current);
+ bool (*readdb_job2) (char *fields[], int columns, int current);
+ bool (*readdb_sizefix) (char *fields[], int columns, int current);
+ bool (*readdb_refine) (char *fields[], int columns, int current);
+ bool (*readdb_scconfig) (char *fields[], int columns, int current);
+};
struct status_interface *status;
diff --git a/src/map/storage.c b/src/map/storage.c
index 041c2cd72..cc1100d28 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -30,7 +30,7 @@ struct guild_storage_interface gstorage_s;
/*==========================================
* Sort items in the warehouse
*------------------------------------------*/
-static int storage_comp_item(const void *_i1, const void *_i2)
+int storage_comp_item(const void *_i1, const void *_i2)
{
struct item *i1 = (struct item *)_i1;
struct item *i2 = (struct item *)_i2;
@@ -45,33 +45,21 @@ static int storage_comp_item(const void *_i1, const void *_i2)
}
//Sort item by storage_comp_item (nameid)
-static void storage_sortitem(struct item* items, unsigned int size)
+void storage_sortitem(struct item* items, unsigned int size)
{
nullpo_retv(items);
if( battle_config.client_sort_storage )
{
- qsort(items, size, sizeof(struct item), storage_comp_item);
+ qsort(items, size, sizeof(struct item), storage->comp_item);
}
}
-/*==========================================
- * Init/Terminate
- *------------------------------------------*/
-/* ##TODO not really init_storage but init_gstorage, should rename/move */
-int do_init_storage(void) { // Called from map.c::do_init()
- gstorage->db = idb_alloc(DB_OPT_RELEASE_DATA);
- return 1;
-}
-void do_final_storage(void) { // by [MC Cameri]
- gstorage->db->destroy(gstorage->db,NULL);
-}
-
/**
* Parses storage and saves 'dirty' ones upon reconnect. [Skotlex]
* @see DBApply
*/
-static int storage_reconnect_sub(DBKey key, DBData *data, va_list ap)
+int storage_reconnect_sub(DBKey key, DBData *data, va_list ap)
{
struct guild_storage *stor = DB->data2ptr(data);
if (stor->dirty && stor->storage_status == 0) //Save closed storages.
@@ -82,7 +70,7 @@ static int storage_reconnect_sub(DBKey key, DBData *data, va_list ap)
//Function to be invoked upon server reconnection to char. To save all 'dirty' storages [Skotlex]
void do_reconnect_storage(void) {
- gstorage->db->foreach(gstorage->db, storage_reconnect_sub);
+ gstorage->db->foreach(gstorage->db, storage->reconnect_sub);
}
/*==========================================
@@ -104,7 +92,7 @@ int storage_storageopen(struct map_session_data *sd)
}
sd->state.storage_flag = 1;
- storage_sortitem(sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
+ storage->sortitem(sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
clif->storagelist(sd, sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
clif->updatestorageamount(sd, sd->status.storage.storage_amount, MAX_STORAGE);
return 0;
@@ -208,8 +196,7 @@ int storage_delitem(struct map_session_data* sd, int n, int amount)
* 0 : fail
* 1 : success
*------------------------------------------*/
-int storage_storageadd(struct map_session_data* sd, int index, int amount)
-{
+int storage_storageadd(struct map_session_data* sd, int index, int amount) {
nullpo_ret(sd);
if( sd->status.storage.storage_amount > MAX_STORAGE )
@@ -226,6 +213,8 @@ int storage_storageadd(struct map_session_data* sd, int index, int amount)
if( storage->additem(sd,&sd->status.inventory[index],amount) == 0 )
pc->delitem(sd,index,amount,0,4,LOG_TYPE_STORAGE);
+ else
+ clif->dropitem(sd, index,0);
return 1;
}
@@ -347,7 +336,7 @@ void storage_storage_quit(struct map_session_data* sd, int flag) {
/**
* @see DBCreateData
*/
-static DBData create_guildstorage(DBKey key, va_list args)
+DBData create_guildstorage(DBKey key, va_list args)
{
struct guild_storage *gs = NULL;
gs = (struct guild_storage *) aCalloc(sizeof(struct guild_storage), 1);
@@ -359,7 +348,7 @@ struct guild_storage *guild2storage(int guild_id)
{
struct guild_storage *gs = NULL;
if(guild->search(guild_id) != NULL)
- gs = idb_ensure(gstorage->db,guild_id,create_guildstorage);
+ gs = idb_ensure(gstorage->db,guild_id,gstorage->create);
return gs;
}
@@ -409,7 +398,7 @@ int storage_guild_storageopen(struct map_session_data* sd)
gstor->storage_status = 1;
sd->state.storage_flag = 2;
- storage_sortitem(gstor->items, ARRAYLENGTH(gstor->items));
+ storage->sortitem(gstor->items, ARRAYLENGTH(gstor->items));
clif->storagelist(sd, gstor->items, ARRAYLENGTH(gstor->items));
clif->updatestorageamount(sd, gstor->storage_amount, MAX_GUILD_STORAGE);
return 0;
@@ -728,13 +717,16 @@ int storage_guild_storage_quit(struct map_session_data* sd, int flag) {
return 0;
}
+void do_init_gstorage(void) {
+ gstorage->db = idb_alloc(DB_OPT_RELEASE_DATA);
+}
+void do_final_gstorage(void) {
+ db_destroy(gstorage->db);
+}
void storage_defaults(void) {
storage = &storage_s;
/* */
- storage->init = do_init_storage;
- storage->final = do_final_storage;
- /* */
storage->reconnect = do_reconnect_storage;
/* */
storage->delitem = storage_delitem;
@@ -746,10 +738,17 @@ void storage_defaults(void) {
storage->gettocart = storage_storagegettocart;
storage->close = storage_storageclose;
storage->pc_quit = storage_storage_quit;
+ storage->comp_item = storage_comp_item;
+ storage->sortitem = storage_sortitem;
+ storage->reconnect_sub = storage_reconnect_sub;
}
void gstorage_defaults(void) {
gstorage = &gstorage_s;
+ /* */
+ gstorage->init = do_init_gstorage;
+ gstorage->final = do_final_gstorage;
+ /* */
gstorage->id2storage = guild2storage;
gstorage->id2storage2 = guild2storage2;
gstorage->delete = guild_storage_delete;
@@ -764,4 +763,5 @@ void gstorage_defaults(void) {
gstorage->pc_quit = storage_guild_storage_quit;
gstorage->save = storage_guild_storagesave;
gstorage->saved = storage_guild_storagesaved;
+ gstorage->create = create_guildstorage;
}
diff --git a/src/map/storage.h b/src/map/storage.h
index 83243a622..9258e0265 100644
--- a/src/map/storage.h
+++ b/src/map/storage.h
@@ -12,8 +12,6 @@ struct map_session_data;
struct DBMap;
struct storage_interface {
- int (*init) (void);
- void (*final) (void);
/* */
void (*reconnect) (void);
/* */
@@ -26,6 +24,9 @@ struct storage_interface {
int (*gettocart) (struct map_session_data *sd,int index,int amount);
void (*close) (struct map_session_data *sd);
void (*pc_quit) (struct map_session_data *sd, int flag);
+ int (*comp_item) (const void *_i1, const void *_i2);
+ void (*sortitem) (struct item* items, unsigned int size);
+ int (*reconnect_sub) (DBKey key, DBData *data, va_list ap);
};
struct storage_interface *storage;
@@ -34,6 +35,10 @@ struct guild_storage_interface {
/* */
struct guild_storage *(*id2storage) (int guild_id);
struct guild_storage *(*id2storage2) (int guild_id);
+ /* */
+ void (*init) (void);
+ void (*final) (void);
+ /* */
int (*delete) (int guild_id);
int (*open) (struct map_session_data *sd);
int (*additem) (struct map_session_data *sd,struct guild_storage *stor,struct item *item_data,int amount);
@@ -46,6 +51,7 @@ struct guild_storage_interface {
int (*pc_quit) (struct map_session_data *sd,int flag);
int (*save) (int account_id, int guild_id, int flag);
int (*saved) (int guild_id); //Ack from char server that guild store was saved.
+ DBData (*create) (DBKey key, va_list args);
};
struct guild_storage_interface *gstorage;
diff --git a/src/map/trade.c b/src/map/trade.c
index e137f7105..8dd30371b 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -1,13 +1,15 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#include "../common/nullpo.h"
#include "../common/socket.h"
+
+#include "trade.h"
#include "clif.h"
#include "itemdb.h"
#include "map.h"
#include "path.h"
-#include "trade.h"
#include "pc.h"
#include "npc.h"
#include "battle.h"
@@ -20,10 +22,6 @@
#include <stdio.h>
#include <string.h>
-
-//Max distance from traders to enable a trade to take place.
-#define TRADE_DISTANCE 2
-
struct trade_interface trade_s;
/*==========================================
@@ -33,7 +31,7 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta
{
nullpo_retv(sd);
- if (maplist[sd->bl.m].flag.notrade) {
+ if (map->list[sd->bl.m].flag.notrade) {
clif->message (sd->fd, msg_txt(272));
return; //Can't trade in notrade mapflag maps.
}
@@ -517,7 +515,7 @@ void trade_tradecommit(struct map_session_data *sd) {
return;
if ((tsd = map->id2sd(sd->trade_partner)) == NULL) {
- trade_tradecancel(sd);
+ trade->cancel(sd);
return;
}
diff --git a/src/map/trade.h b/src/map/trade.h
index e8ac4a8c4..d0b900504 100644
--- a/src/map/trade.h
+++ b/src/map/trade.h
@@ -5,6 +5,9 @@
#ifndef _TRADE_H_
#define _TRADE_H_
+//Max distance from traders to enable a trade to take place.
+#define TRADE_DISTANCE 2
+
struct map_session_data;
struct trade_interface {
diff --git a/src/map/unit.c b/src/map/unit.c
index 9d6f107e3..a7aca10b9 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -792,13 +792,13 @@ int unit_warp(struct block_list *bl,short m,short x,short y,clr_type type)
switch (bl->type) {
case BL_MOB:
- if (maplist[bl->m].flag.monster_noteleport && ((TBL_MOB*)bl)->master_id == 0)
+ if (map->list[bl->m].flag.monster_noteleport && ((TBL_MOB*)bl)->master_id == 0)
return 1;
- if (m != bl->m && maplist[m].flag.nobranch && battle_config.mob_warp&4 && !(((TBL_MOB *)bl)->master_id))
+ if (m != bl->m && map->list[m].flag.nobranch && battle_config.mob_warp&4 && !(((TBL_MOB *)bl)->master_id))
return 1;
break;
case BL_PC:
- if (maplist[bl->m].flag.noteleport)
+ if (map->list[bl->m].flag.noteleport)
return 1;
break;
}
@@ -806,17 +806,17 @@ int unit_warp(struct block_list *bl,short m,short x,short y,clr_type type)
if (x<0 || y<0) {
//Random map position.
if (!map->search_freecell(NULL, m, &x, &y, -1, -1, 1)) {
- ShowWarning("unit_warp failed. Unit Id:%d/Type:%d, target position map %d (%s) at [%d,%d]\n", bl->id, bl->type, m, maplist[m].name, x, y);
+ ShowWarning("unit_warp failed. Unit Id:%d/Type:%d, target position map %d (%s) at [%d,%d]\n", bl->id, bl->type, m, map->list[m].name, x, y);
return 2;
}
} else if (map->getcell(m,x,y,CELL_CHKNOREACH)) {
//Invalid target cell
- ShowWarning("unit_warp: Specified non-walkable target cell: %d (%s) at [%d,%d]\n", m, maplist[m].name, x,y);
+ ShowWarning("unit_warp: Specified non-walkable target cell: %d (%s) at [%d,%d]\n", m, map->list[m].name, x,y);
if (!map->search_freecell(NULL, m, &x, &y, 4, 4, 1)) {
//Can't find a nearby cell
- ShowWarning("unit_warp failed. Unit Id:%d/Type:%d, target position map %d (%s) at [%d,%d]\n", bl->id, bl->type, m, maplist[m].name, x, y);
+ ShowWarning("unit_warp failed. Unit Id:%d/Type:%d, target position map %d (%s) at [%d,%d]\n", bl->id, bl->type, m, map->list[m].name, x, y);
return 2;
}
}
@@ -1955,7 +1955,7 @@ int unit_skillcastcancel(struct block_list *bl,int type)
return 0;
if (sd && (sd->special_state.no_castcancel2 ||
- ((sd->sc.data[SC_UNLIMITED_HUMMING_VOICE] || sd->special_state.no_castcancel) && !map_flag_gvg(bl->m) && !maplist[bl->m].flag.battleground))) //fixed flags being read the wrong way around [blackhole89]
+ ((sd->sc.data[SC_UNLIMITED_HUMMING_VOICE] || sd->special_state.no_castcancel) && !map_flag_gvg(bl->m) && !map->list[bl->m].flag.battleground))) //fixed flags being read the wrong way around [blackhole89]
return 0;
}
@@ -2174,7 +2174,7 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i
guild->send_dot_remove(sd);
bg->send_dot_remove(sd);
- if( maplist[bl->m].users <= 0 || sd->state.debug_remove_map ) {
+ if( map->list[bl->m].users <= 0 || sd->state.debug_remove_map ) {
// this is only place where map users is decreased, if the mobs were removed too soon then this function was executed too many times [FlavioJS]
if( sd->debug_file == NULL || !(sd->state.debug_remove_map) ) {
sd->debug_file = "";
@@ -2188,17 +2188,17 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i
" Please report this!!!\n",
sd->status.account_id, sd->status.char_id,
sd->state.active, sd->state.connect_new, sd->state.rewarp, sd->state.changemap, sd->state.debug_remove_map,
- maplist[bl->m].name, maplist[bl->m].users,
+ map->list[bl->m].name, map->list[bl->m].users,
sd->debug_file, sd->debug_line, sd->debug_func, file, line, func);
- } else if (--maplist[bl->m].users == 0 && battle_config.dynamic_mobs) //[Skotlex]
+ } else if (--map->list[bl->m].users == 0 && battle_config.dynamic_mobs) //[Skotlex]
map->removemobs(bl->m);
if( !(sd->sc.option&OPTION_INVISIBLE) ) {
// decrement the number of active pvp players on the map
- --maplist[bl->m].users_pvp;
+ --map->list[bl->m].users_pvp;
}
- if( maplist[bl->m].instance_id >= 0 ) {
- instances[maplist[bl->m].instance_id].users--;
- instance->check_idle(maplist[bl->m].instance_id);
+ if( map->list[bl->m].instance_id >= 0 ) {
+ instance->list[map->list[bl->m].instance_id].users--;
+ instance->check_idle(map->list[bl->m].instance_id);
}
sd->state.debug_remove_map = 1; // temporary state to track double remove_map's [FlavioJS]
sd->debug_file = file;
@@ -2340,7 +2340,7 @@ int unit_free(struct block_list *bl, clr_type clrtype) {
duel->reject(sd->duel_invite, sd);
// Notify friends that this char logged out. [Skotlex]
- map->map_foreachpc(clif->friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 0);
+ map->foreachpc(clif->friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 0);
party->send_logout(sd);
guild->send_memberinfoshort(sd,0);
pc->cleareventtimer(sd);
@@ -2375,7 +2375,7 @@ int unit_free(struct block_list *bl, clr_type clrtype) {
/* [Ind/Hercules] */
if( sd->sc_display_count ) {
for(i = 0; i < sd->sc_display_count; i++) {
- ers_free(pc_sc_display_ers, sd->sc_display[i]);
+ ers_free(pc->sc_display_ers, sd->sc_display[i]);
}
sd->sc_display_count = 0;
}
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c
new file mode 100644
index 000000000..8b4f06ae0
--- /dev/null
+++ b/src/plugins/HPMHooking.c
@@ -0,0 +1,173 @@
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Sample Hercules Plugin
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "../common/HPMi.h"
+#include "../common/mmo.h"
+#include "../common/socket.h"
+#include "../common/malloc.h"
+#include "../common/db.h"
+
+#include "../map/map.h"
+#include "../map/path.h"
+#include "../map/chrif.h"
+#include "../map/clif.h"
+#include "../map/duel.h"
+#include "../map/intif.h"
+#include "../map/npc.h"
+#include "../map/pc.h"
+#include "../map/status.h"
+#include "../map/mob.h"
+#include "../map/npc.h"
+#include "../map/chat.h"
+#include "../map/itemdb.h"
+#include "../map/storage.h"
+#include "../map/skill.h"
+#include "../map/trade.h"
+#include "../map/party.h"
+#include "../map/unit.h"
+#include "../map/battle.h"
+#include "../map/battleground.h"
+#include "../map/quest.h"
+#include "../map/script.h"
+#include "../map/mapreg.h"
+#include "../map/guild.h"
+#include "../map/pet.h"
+#include "../map/homunculus.h"
+#include "../map/instance.h"
+#include "../map/mercenary.h"
+#include "../map/elemental.h"
+#include "../map/atcommand.h"
+#include "../map/log.h"
+#include "../map/mail.h"
+#include "../map/irc-bot.h"
+
+HPExport struct hplugin_info pinfo = {
+ "HPMHooking", // Plugin name
+ SERVER_TYPE_MAP,// Which server types this plugin works with?
+ "0.1", // Plugin version
+ HPM_VERSION, // HPM Version (don't change, macro is automatically updated)
+};
+
+#define HP_POP(x) #x , (void**)(&x)
+#define HP_POP2(x) (void*)x
+DBMap *hp_db;/* hooking points db -- for quick lookup */
+
+struct HookingPointData {
+ char* name;
+ void **sref;
+ void *tref;
+ int idx;
+};
+
+struct HPMHookPoint {
+ void *func;
+ unsigned int pID;
+};
+
+struct HPMHooksCore {
+ #include "../plugins/HPMHooking/HPMHooking.HPMHooksCore.inc"
+ struct {
+ int total;
+ } data;
+} HPMHooks;
+
+bool *HPMforce_return;
+
+void HPM_HP_final(void);
+void HPM_HP_load(void);
+
+HPExport void server_post_final (void) {
+ HPM_HP_final();
+}
+
+HPExport bool Hooked (bool *fr) {
+ HPMforce_return = fr;
+ DB = GET_SYMBOL("DB");
+ iMalloc = GET_SYMBOL("iMalloc");
+#include "../plugins/HPMHooking/HPMHooking.GetSymbol.inc"
+ HPM_HP_load();
+ return true;
+}
+
+
+HPExport bool HPM_Plugin_AddHook(enum HPluginHookType type, const char *target, void *hook, unsigned int pID) {
+ struct HookingPointData *hpd;
+
+ if( hp_db && (hpd = strdb_get(hp_db,target)) ) {
+ struct HPMHookPoint **hp = NULL;
+ int *count = NULL;
+
+ if( type == HOOK_TYPE_PRE ) {
+ hp = (struct HPMHookPoint **)((char *)&HPMHooks.list + (sizeof(struct HPMHookPoint *)*hpd->idx));
+ count = (int *)((char *)&HPMHooks.count + (sizeof(int)*hpd->idx));
+ } else {
+ hp = (struct HPMHookPoint **)((char *)&HPMHooks.list + (sizeof(struct HPMHookPoint *)*(hpd->idx+1)));
+ count = (int *)((char *)&HPMHooks.count + (sizeof(int)*(hpd->idx+1)));
+ }
+
+ if( hp ) {
+ *count += 1;
+
+ RECREATE(*hp, struct HPMHookPoint, *count);
+
+ (*hp)[*count - 1].func = hook;
+ (*hp)[*count - 1].pID = pID;
+
+ *(hpd->sref) = hpd->tref;
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
+#include "../plugins/HPMHooking/HPMHooking.Hooks.inc"
+
+void HPM_HP_final(void) {
+ int i, len = HPMHooks.data.total * 2;
+
+ if( hp_db )
+ db_destroy(hp_db);
+
+ for(i = 0; i < len; i++) {
+ int *count = (int *)((char *)&HPMHooks.count + (sizeof(int)*(i)));
+
+ if( count && *count ) {
+ struct HPMHookPoint **hp = (struct HPMHookPoint **)((char *)&HPMHooks.list + (sizeof(struct HPMHookPoint *)*(i)));
+
+ if( hp && *hp )
+ aFree(*hp);
+ }
+ }
+
+}
+
+void HPM_HP_load(void) {
+ #include "../plugins/HPMHooking/HPMHooking.HookingPoints.inc"
+ int i, len = ARRAYLENGTH(HookingPoints);
+
+ memset(&HPMHooks,0,sizeof(struct HPMHooksCore));
+
+ hp_db = strdb_alloc(DB_OPT_BASE|DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, HookingPointsLenMax);
+
+ for(i = 0; i < len; i++) {
+ struct HookingPointData *hpd = NULL;
+
+ CREATE(hpd, struct HookingPointData, 1);
+
+ memcpy(hpd, &HookingPoints[i], sizeof(struct HookingPointData));
+
+ strdb_put(hp_db, HookingPoints[i].name, hpd);
+
+ HPMHooks.data.total++;
+ }
+
+ #include "../plugins/HPMHooking/HPMHooking.sources.inc"
+}
+
diff --git a/src/plugins/HPMHooking/HPMHooking.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking.GetSymbol.inc
new file mode 100644
index 000000000..5caceb75a
--- /dev/null
+++ b/src/plugins/HPMHooking/HPMHooking.GetSymbol.inc
@@ -0,0 +1,37 @@
+if( !(atcommand = GET_SYMBOL("atcommand") ) ) return false;
+if( !(battle = GET_SYMBOL("battle") ) ) return false;
+if( !(bg = GET_SYMBOL("battlegrounds") ) ) return false;
+if( !(buyingstore = GET_SYMBOL("buyingstore") ) ) return false;
+if( !(chat = GET_SYMBOL("chat") ) ) return false;
+if( !(chrif = GET_SYMBOL("chrif") ) ) return false;
+if( !(clif = GET_SYMBOL("clif") ) ) return false;
+if( !(duel = GET_SYMBOL("duel") ) ) return false;
+if( !(elemental = GET_SYMBOL("elemental") ) ) return false;
+if( !(guild = GET_SYMBOL("guild") ) ) return false;
+if( !(gstorage = GET_SYMBOL("gstorage") ) ) return false;
+if( !(homun = GET_SYMBOL("homun") ) ) return false;
+if( !(instance = GET_SYMBOL("instance") ) ) return false;
+if( !(intif = GET_SYMBOL("intif") ) ) return false;
+if( !(ircbot = GET_SYMBOL("ircbot") ) ) return false;
+if( !(itemdb = GET_SYMBOL("itemdb") ) ) return false;
+if( !(logs = GET_SYMBOL("logs") ) ) return false;
+if( !(mail = GET_SYMBOL("mail") ) ) return false;
+if( !(map = GET_SYMBOL("map") ) ) return false;
+if( !(mapit = GET_SYMBOL("mapit") ) ) return false;
+if( !(mapreg = GET_SYMBOL("mapreg") ) ) return false;
+if( !(mercenary = GET_SYMBOL("mercenary") ) ) return false;
+if( !(mob = GET_SYMBOL("mob") ) ) return false;
+if( !(npc = GET_SYMBOL("npc") ) ) return false;
+if( !(party = GET_SYMBOL("party") ) ) return false;
+if( !(path = GET_SYMBOL("path") ) ) return false;
+if( !(pc = GET_SYMBOL("pc") ) ) return false;
+if( !(pet = GET_SYMBOL("pet") ) ) return false;
+if( !(quest = GET_SYMBOL("quest") ) ) return false;
+if( !(script = GET_SYMBOL("script") ) ) return false;
+if( !(searchstore = GET_SYMBOL("searchstore") ) ) return false;
+if( !(skill = GET_SYMBOL("skill") ) ) return false;
+if( !(status = GET_SYMBOL("status") ) ) return false;
+if( !(storage = GET_SYMBOL("storage") ) ) return false;
+if( !(trade = GET_SYMBOL("trade") ) ) return false;
+if( !(unit = GET_SYMBOL("unit") ) ) return false;
+if( !(vending = GET_SYMBOL("vending") ) ) return false;
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
new file mode 100644
index 000000000..c682e4e58
--- /dev/null
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -0,0 +1,9751 @@
+struct {
+struct HPMHookPoint *HP_atcommand_init_pre;
+struct HPMHookPoint *HP_atcommand_init_post;
+struct HPMHookPoint *HP_atcommand_final_pre;
+struct HPMHookPoint *HP_atcommand_final_post;
+struct HPMHookPoint *HP_atcommand_parse_pre;
+struct HPMHookPoint *HP_atcommand_parse_post;
+struct HPMHookPoint *HP_atcommand_create_pre;
+struct HPMHookPoint *HP_atcommand_create_post;
+struct HPMHookPoint *HP_atcommand_can_use_pre;
+struct HPMHookPoint *HP_atcommand_can_use_post;
+struct HPMHookPoint *HP_atcommand_can_use2_pre;
+struct HPMHookPoint *HP_atcommand_can_use2_post;
+struct HPMHookPoint *HP_atcommand_load_groups_pre;
+struct HPMHookPoint *HP_atcommand_load_groups_post;
+struct HPMHookPoint *HP_atcommand_exists_pre;
+struct HPMHookPoint *HP_atcommand_exists_post;
+struct HPMHookPoint *HP_atcommand_msg_read_pre;
+struct HPMHookPoint *HP_atcommand_msg_read_post;
+struct HPMHookPoint *HP_atcommand_final_msg_pre;
+struct HPMHookPoint *HP_atcommand_final_msg_post;
+struct HPMHookPoint *HP_atcommand_get_bind_byname_pre;
+struct HPMHookPoint *HP_atcommand_get_bind_byname_post;
+struct HPMHookPoint *HP_atcommand_get_info_byname_pre;
+struct HPMHookPoint *HP_atcommand_get_info_byname_post;
+struct HPMHookPoint *HP_atcommand_check_alias_pre;
+struct HPMHookPoint *HP_atcommand_check_alias_post;
+struct HPMHookPoint *HP_atcommand_get_suggestions_pre;
+struct HPMHookPoint *HP_atcommand_get_suggestions_post;
+struct HPMHookPoint *HP_atcommand_config_read_pre;
+struct HPMHookPoint *HP_atcommand_config_read_post;
+struct HPMHookPoint *HP_atcommand_stopattack_pre;
+struct HPMHookPoint *HP_atcommand_stopattack_post;
+struct HPMHookPoint *HP_atcommand_pvpoff_sub_pre;
+struct HPMHookPoint *HP_atcommand_pvpoff_sub_post;
+struct HPMHookPoint *HP_atcommand_pvpon_sub_pre;
+struct HPMHookPoint *HP_atcommand_pvpon_sub_post;
+struct HPMHookPoint *HP_atcommand_atkillmonster_sub_pre;
+struct HPMHookPoint *HP_atcommand_atkillmonster_sub_post;
+struct HPMHookPoint *HP_atcommand_raise_sub_pre;
+struct HPMHookPoint *HP_atcommand_raise_sub_post;
+struct HPMHookPoint *HP_atcommand_get_jail_time_pre;
+struct HPMHookPoint *HP_atcommand_get_jail_time_post;
+struct HPMHookPoint *HP_atcommand_cleanfloor_sub_pre;
+struct HPMHookPoint *HP_atcommand_cleanfloor_sub_post;
+struct HPMHookPoint *HP_atcommand_mutearea_sub_pre;
+struct HPMHookPoint *HP_atcommand_mutearea_sub_post;
+struct HPMHookPoint *HP_atcommand_commands_sub_pre;
+struct HPMHookPoint *HP_atcommand_commands_sub_post;
+struct HPMHookPoint *HP_atcommand_cmd_db_clear_pre;
+struct HPMHookPoint *HP_atcommand_cmd_db_clear_post;
+struct HPMHookPoint *HP_atcommand_cmd_db_clear_sub_pre;
+struct HPMHookPoint *HP_atcommand_cmd_db_clear_sub_post;
+struct HPMHookPoint *HP_atcommand_doload_pre;
+struct HPMHookPoint *HP_atcommand_doload_post;
+struct HPMHookPoint *HP_atcommand_base_commands_pre;
+struct HPMHookPoint *HP_atcommand_base_commands_post;
+struct HPMHookPoint *HP_battle_init_pre;
+struct HPMHookPoint *HP_battle_init_post;
+struct HPMHookPoint *HP_battle_final_pre;
+struct HPMHookPoint *HP_battle_final_post;
+struct HPMHookPoint *HP_battle_calc_attack_pre;
+struct HPMHookPoint *HP_battle_calc_attack_post;
+struct HPMHookPoint *HP_battle_calc_damage_pre;
+struct HPMHookPoint *HP_battle_calc_damage_post;
+struct HPMHookPoint *HP_battle_calc_gvg_damage_pre;
+struct HPMHookPoint *HP_battle_calc_gvg_damage_post;
+struct HPMHookPoint *HP_battle_calc_bg_damage_pre;
+struct HPMHookPoint *HP_battle_calc_bg_damage_post;
+struct HPMHookPoint *HP_battle_weapon_attack_pre;
+struct HPMHookPoint *HP_battle_weapon_attack_post;
+struct HPMHookPoint *HP_battle_calc_weapon_attack_pre;
+struct HPMHookPoint *HP_battle_calc_weapon_attack_post;
+struct HPMHookPoint *HP_battle_delay_damage_pre;
+struct HPMHookPoint *HP_battle_delay_damage_post;
+struct HPMHookPoint *HP_battle_drain_pre;
+struct HPMHookPoint *HP_battle_drain_post;
+struct HPMHookPoint *HP_battle_calc_return_damage_pre;
+struct HPMHookPoint *HP_battle_calc_return_damage_post;
+struct HPMHookPoint *HP_battle_attr_ratio_pre;
+struct HPMHookPoint *HP_battle_attr_ratio_post;
+struct HPMHookPoint *HP_battle_attr_fix_pre;
+struct HPMHookPoint *HP_battle_attr_fix_post;
+struct HPMHookPoint *HP_battle_calc_cardfix_pre;
+struct HPMHookPoint *HP_battle_calc_cardfix_post;
+struct HPMHookPoint *HP_battle_calc_elefix_pre;
+struct HPMHookPoint *HP_battle_calc_elefix_post;
+struct HPMHookPoint *HP_battle_calc_masteryfix_pre;
+struct HPMHookPoint *HP_battle_calc_masteryfix_post;
+struct HPMHookPoint *HP_battle_calc_skillratio_pre;
+struct HPMHookPoint *HP_battle_calc_skillratio_post;
+struct HPMHookPoint *HP_battle_calc_sizefix_pre;
+struct HPMHookPoint *HP_battle_calc_sizefix_post;
+struct HPMHookPoint *HP_battle_calc_weapon_damage_pre;
+struct HPMHookPoint *HP_battle_calc_weapon_damage_post;
+struct HPMHookPoint *HP_battle_calc_defense_pre;
+struct HPMHookPoint *HP_battle_calc_defense_post;
+struct HPMHookPoint *HP_battle_get_master_pre;
+struct HPMHookPoint *HP_battle_get_master_post;
+struct HPMHookPoint *HP_battle_get_targeted_pre;
+struct HPMHookPoint *HP_battle_get_targeted_post;
+struct HPMHookPoint *HP_battle_get_enemy_pre;
+struct HPMHookPoint *HP_battle_get_enemy_post;
+struct HPMHookPoint *HP_battle_get_target_pre;
+struct HPMHookPoint *HP_battle_get_target_post;
+struct HPMHookPoint *HP_battle_get_current_skill_pre;
+struct HPMHookPoint *HP_battle_get_current_skill_post;
+struct HPMHookPoint *HP_battle_check_undead_pre;
+struct HPMHookPoint *HP_battle_check_undead_post;
+struct HPMHookPoint *HP_battle_check_target_pre;
+struct HPMHookPoint *HP_battle_check_target_post;
+struct HPMHookPoint *HP_battle_check_range_pre;
+struct HPMHookPoint *HP_battle_check_range_post;
+struct HPMHookPoint *HP_battle_consume_ammo_pre;
+struct HPMHookPoint *HP_battle_consume_ammo_post;
+struct HPMHookPoint *HP_battle_get_targeted_sub_pre;
+struct HPMHookPoint *HP_battle_get_targeted_sub_post;
+struct HPMHookPoint *HP_battle_get_enemy_sub_pre;
+struct HPMHookPoint *HP_battle_get_enemy_sub_post;
+struct HPMHookPoint *HP_battle_get_enemy_area_sub_pre;
+struct HPMHookPoint *HP_battle_get_enemy_area_sub_post;
+struct HPMHookPoint *HP_battle_delay_damage_sub_pre;
+struct HPMHookPoint *HP_battle_delay_damage_sub_post;
+struct HPMHookPoint *HP_battle_blewcount_bonus_pre;
+struct HPMHookPoint *HP_battle_blewcount_bonus_post;
+struct HPMHookPoint *HP_battle_range_type_pre;
+struct HPMHookPoint *HP_battle_range_type_post;
+struct HPMHookPoint *HP_battle_calc_base_damage_pre;
+struct HPMHookPoint *HP_battle_calc_base_damage_post;
+struct HPMHookPoint *HP_battle_calc_base_damage2_pre;
+struct HPMHookPoint *HP_battle_calc_base_damage2_post;
+struct HPMHookPoint *HP_battle_calc_misc_attack_pre;
+struct HPMHookPoint *HP_battle_calc_misc_attack_post;
+struct HPMHookPoint *HP_battle_calc_magic_attack_pre;
+struct HPMHookPoint *HP_battle_calc_magic_attack_post;
+struct HPMHookPoint *HP_battle_adjust_skill_damage_pre;
+struct HPMHookPoint *HP_battle_adjust_skill_damage_post;
+struct HPMHookPoint *HP_battle_add_mastery_pre;
+struct HPMHookPoint *HP_battle_add_mastery_post;
+struct HPMHookPoint *HP_battle_calc_drain_pre;
+struct HPMHookPoint *HP_battle_calc_drain_post;
+struct HPMHookPoint *HP_battle_config_read_pre;
+struct HPMHookPoint *HP_battle_config_read_post;
+struct HPMHookPoint *HP_battle_config_set_defaults_pre;
+struct HPMHookPoint *HP_battle_config_set_defaults_post;
+struct HPMHookPoint *HP_battle_config_set_value_pre;
+struct HPMHookPoint *HP_battle_config_set_value_post;
+struct HPMHookPoint *HP_battle_config_get_value_pre;
+struct HPMHookPoint *HP_battle_config_get_value_post;
+struct HPMHookPoint *HP_battle_config_adjust_pre;
+struct HPMHookPoint *HP_battle_config_adjust_post;
+struct HPMHookPoint *HP_battle_get_enemy_area_pre;
+struct HPMHookPoint *HP_battle_get_enemy_area_post;
+struct HPMHookPoint *HP_battle_damage_area_pre;
+struct HPMHookPoint *HP_battle_damage_area_post;
+struct HPMHookPoint *HP_bg_init_pre;
+struct HPMHookPoint *HP_bg_init_post;
+struct HPMHookPoint *HP_bg_final_pre;
+struct HPMHookPoint *HP_bg_final_post;
+struct HPMHookPoint *HP_bg_name2arena_pre;
+struct HPMHookPoint *HP_bg_name2arena_post;
+struct HPMHookPoint *HP_bg_queue_add_pre;
+struct HPMHookPoint *HP_bg_queue_add_post;
+struct HPMHookPoint *HP_bg_can_queue_pre;
+struct HPMHookPoint *HP_bg_can_queue_post;
+struct HPMHookPoint *HP_bg_id2pos_pre;
+struct HPMHookPoint *HP_bg_id2pos_post;
+struct HPMHookPoint *HP_bg_queue_pc_cleanup_pre;
+struct HPMHookPoint *HP_bg_queue_pc_cleanup_post;
+struct HPMHookPoint *HP_bg_begin_pre;
+struct HPMHookPoint *HP_bg_begin_post;
+struct HPMHookPoint *HP_bg_begin_timer_pre;
+struct HPMHookPoint *HP_bg_begin_timer_post;
+struct HPMHookPoint *HP_bg_queue_pregame_pre;
+struct HPMHookPoint *HP_bg_queue_pregame_post;
+struct HPMHookPoint *HP_bg_fillup_timer_pre;
+struct HPMHookPoint *HP_bg_fillup_timer_post;
+struct HPMHookPoint *HP_bg_queue_ready_ack_pre;
+struct HPMHookPoint *HP_bg_queue_ready_ack_post;
+struct HPMHookPoint *HP_bg_match_over_pre;
+struct HPMHookPoint *HP_bg_match_over_post;
+struct HPMHookPoint *HP_bg_queue_check_pre;
+struct HPMHookPoint *HP_bg_queue_check_post;
+struct HPMHookPoint *HP_bg_team_search_pre;
+struct HPMHookPoint *HP_bg_team_search_post;
+struct HPMHookPoint *HP_bg_getavailablesd_pre;
+struct HPMHookPoint *HP_bg_getavailablesd_post;
+struct HPMHookPoint *HP_bg_team_delete_pre;
+struct HPMHookPoint *HP_bg_team_delete_post;
+struct HPMHookPoint *HP_bg_team_warp_pre;
+struct HPMHookPoint *HP_bg_team_warp_post;
+struct HPMHookPoint *HP_bg_send_dot_remove_pre;
+struct HPMHookPoint *HP_bg_send_dot_remove_post;
+struct HPMHookPoint *HP_bg_team_join_pre;
+struct HPMHookPoint *HP_bg_team_join_post;
+struct HPMHookPoint *HP_bg_team_leave_pre;
+struct HPMHookPoint *HP_bg_team_leave_post;
+struct HPMHookPoint *HP_bg_member_respawn_pre;
+struct HPMHookPoint *HP_bg_member_respawn_post;
+struct HPMHookPoint *HP_bg_create_pre;
+struct HPMHookPoint *HP_bg_create_post;
+struct HPMHookPoint *HP_bg_team_get_id_pre;
+struct HPMHookPoint *HP_bg_team_get_id_post;
+struct HPMHookPoint *HP_bg_send_message_pre;
+struct HPMHookPoint *HP_bg_send_message_post;
+struct HPMHookPoint *HP_bg_send_xy_timer_sub_pre;
+struct HPMHookPoint *HP_bg_send_xy_timer_sub_post;
+struct HPMHookPoint *HP_bg_send_xy_timer_pre;
+struct HPMHookPoint *HP_bg_send_xy_timer_post;
+struct HPMHookPoint *HP_bg_config_read_pre;
+struct HPMHookPoint *HP_bg_config_read_post;
+struct HPMHookPoint *HP_buyingstore_setup_pre;
+struct HPMHookPoint *HP_buyingstore_setup_post;
+struct HPMHookPoint *HP_buyingstore_create_pre;
+struct HPMHookPoint *HP_buyingstore_create_post;
+struct HPMHookPoint *HP_buyingstore_close_pre;
+struct HPMHookPoint *HP_buyingstore_close_post;
+struct HPMHookPoint *HP_buyingstore_open_pre;
+struct HPMHookPoint *HP_buyingstore_open_post;
+struct HPMHookPoint *HP_buyingstore_trade_pre;
+struct HPMHookPoint *HP_buyingstore_trade_post;
+struct HPMHookPoint *HP_buyingstore_search_pre;
+struct HPMHookPoint *HP_buyingstore_search_post;
+struct HPMHookPoint *HP_buyingstore_searchall_pre;
+struct HPMHookPoint *HP_buyingstore_searchall_post;
+struct HPMHookPoint *HP_buyingstore_getuid_pre;
+struct HPMHookPoint *HP_buyingstore_getuid_post;
+struct HPMHookPoint *HP_chat_create_pc_chat_pre;
+struct HPMHookPoint *HP_chat_create_pc_chat_post;
+struct HPMHookPoint *HP_chat_join_pre;
+struct HPMHookPoint *HP_chat_join_post;
+struct HPMHookPoint *HP_chat_leave_pre;
+struct HPMHookPoint *HP_chat_leave_post;
+struct HPMHookPoint *HP_chat_change_owner_pre;
+struct HPMHookPoint *HP_chat_change_owner_post;
+struct HPMHookPoint *HP_chat_change_status_pre;
+struct HPMHookPoint *HP_chat_change_status_post;
+struct HPMHookPoint *HP_chat_kick_pre;
+struct HPMHookPoint *HP_chat_kick_post;
+struct HPMHookPoint *HP_chat_create_npc_chat_pre;
+struct HPMHookPoint *HP_chat_create_npc_chat_post;
+struct HPMHookPoint *HP_chat_delete_npc_chat_pre;
+struct HPMHookPoint *HP_chat_delete_npc_chat_post;
+struct HPMHookPoint *HP_chat_enable_event_pre;
+struct HPMHookPoint *HP_chat_enable_event_post;
+struct HPMHookPoint *HP_chat_disable_event_pre;
+struct HPMHookPoint *HP_chat_disable_event_post;
+struct HPMHookPoint *HP_chat_npc_kick_all_pre;
+struct HPMHookPoint *HP_chat_npc_kick_all_post;
+struct HPMHookPoint *HP_chat_trigger_event_pre;
+struct HPMHookPoint *HP_chat_trigger_event_post;
+struct HPMHookPoint *HP_chat_create_pre;
+struct HPMHookPoint *HP_chat_create_post;
+struct HPMHookPoint *HP_chrif_final_pre;
+struct HPMHookPoint *HP_chrif_final_post;
+struct HPMHookPoint *HP_chrif_init_pre;
+struct HPMHookPoint *HP_chrif_init_post;
+struct HPMHookPoint *HP_chrif_setuserid_pre;
+struct HPMHookPoint *HP_chrif_setuserid_post;
+struct HPMHookPoint *HP_chrif_setpasswd_pre;
+struct HPMHookPoint *HP_chrif_setpasswd_post;
+struct HPMHookPoint *HP_chrif_checkdefaultlogin_pre;
+struct HPMHookPoint *HP_chrif_checkdefaultlogin_post;
+struct HPMHookPoint *HP_chrif_setip_pre;
+struct HPMHookPoint *HP_chrif_setip_post;
+struct HPMHookPoint *HP_chrif_setport_pre;
+struct HPMHookPoint *HP_chrif_setport_post;
+struct HPMHookPoint *HP_chrif_isconnected_pre;
+struct HPMHookPoint *HP_chrif_isconnected_post;
+struct HPMHookPoint *HP_chrif_check_shutdown_pre;
+struct HPMHookPoint *HP_chrif_check_shutdown_post;
+struct HPMHookPoint *HP_chrif_search_pre;
+struct HPMHookPoint *HP_chrif_search_post;
+struct HPMHookPoint *HP_chrif_auth_check_pre;
+struct HPMHookPoint *HP_chrif_auth_check_post;
+struct HPMHookPoint *HP_chrif_auth_delete_pre;
+struct HPMHookPoint *HP_chrif_auth_delete_post;
+struct HPMHookPoint *HP_chrif_auth_finished_pre;
+struct HPMHookPoint *HP_chrif_auth_finished_post;
+struct HPMHookPoint *HP_chrif_authreq_pre;
+struct HPMHookPoint *HP_chrif_authreq_post;
+struct HPMHookPoint *HP_chrif_authok_pre;
+struct HPMHookPoint *HP_chrif_authok_post;
+struct HPMHookPoint *HP_chrif_scdata_request_pre;
+struct HPMHookPoint *HP_chrif_scdata_request_post;
+struct HPMHookPoint *HP_chrif_save_pre;
+struct HPMHookPoint *HP_chrif_save_post;
+struct HPMHookPoint *HP_chrif_charselectreq_pre;
+struct HPMHookPoint *HP_chrif_charselectreq_post;
+struct HPMHookPoint *HP_chrif_changemapserver_pre;
+struct HPMHookPoint *HP_chrif_changemapserver_post;
+struct HPMHookPoint *HP_chrif_searchcharid_pre;
+struct HPMHookPoint *HP_chrif_searchcharid_post;
+struct HPMHookPoint *HP_chrif_changeemail_pre;
+struct HPMHookPoint *HP_chrif_changeemail_post;
+struct HPMHookPoint *HP_chrif_char_ask_name_pre;
+struct HPMHookPoint *HP_chrif_char_ask_name_post;
+struct HPMHookPoint *HP_chrif_updatefamelist_pre;
+struct HPMHookPoint *HP_chrif_updatefamelist_post;
+struct HPMHookPoint *HP_chrif_buildfamelist_pre;
+struct HPMHookPoint *HP_chrif_buildfamelist_post;
+struct HPMHookPoint *HP_chrif_save_scdata_pre;
+struct HPMHookPoint *HP_chrif_save_scdata_post;
+struct HPMHookPoint *HP_chrif_ragsrvinfo_pre;
+struct HPMHookPoint *HP_chrif_ragsrvinfo_post;
+struct HPMHookPoint *HP_chrif_char_offline_pre;
+struct HPMHookPoint *HP_chrif_char_offline_post;
+struct HPMHookPoint *HP_chrif_char_offline_nsd_pre;
+struct HPMHookPoint *HP_chrif_char_offline_nsd_post;
+struct HPMHookPoint *HP_chrif_char_reset_offline_pre;
+struct HPMHookPoint *HP_chrif_char_reset_offline_post;
+struct HPMHookPoint *HP_chrif_send_users_tochar_pre;
+struct HPMHookPoint *HP_chrif_send_users_tochar_post;
+struct HPMHookPoint *HP_chrif_char_online_pre;
+struct HPMHookPoint *HP_chrif_char_online_post;
+struct HPMHookPoint *HP_chrif_changesex_pre;
+struct HPMHookPoint *HP_chrif_changesex_post;
+struct HPMHookPoint *HP_chrif_divorce_pre;
+struct HPMHookPoint *HP_chrif_divorce_post;
+struct HPMHookPoint *HP_chrif_removefriend_pre;
+struct HPMHookPoint *HP_chrif_removefriend_post;
+struct HPMHookPoint *HP_chrif_send_report_pre;
+struct HPMHookPoint *HP_chrif_send_report_post;
+struct HPMHookPoint *HP_chrif_flush_fifo_pre;
+struct HPMHookPoint *HP_chrif_flush_fifo_post;
+struct HPMHookPoint *HP_chrif_skillid2idx_pre;
+struct HPMHookPoint *HP_chrif_skillid2idx_post;
+struct HPMHookPoint *HP_chrif_sd_to_auth_pre;
+struct HPMHookPoint *HP_chrif_sd_to_auth_post;
+struct HPMHookPoint *HP_chrif_check_connect_char_server_pre;
+struct HPMHookPoint *HP_chrif_check_connect_char_server_post;
+struct HPMHookPoint *HP_chrif_auth_logout_pre;
+struct HPMHookPoint *HP_chrif_auth_logout_post;
+struct HPMHookPoint *HP_chrif_save_ack_pre;
+struct HPMHookPoint *HP_chrif_save_ack_post;
+struct HPMHookPoint *HP_chrif_reconnect_pre;
+struct HPMHookPoint *HP_chrif_reconnect_post;
+struct HPMHookPoint *HP_chrif_auth_db_cleanup_sub_pre;
+struct HPMHookPoint *HP_chrif_auth_db_cleanup_sub_post;
+struct HPMHookPoint *HP_chrif_char_ask_name_answer_pre;
+struct HPMHookPoint *HP_chrif_char_ask_name_answer_post;
+struct HPMHookPoint *HP_chrif_auth_db_final_pre;
+struct HPMHookPoint *HP_chrif_auth_db_final_post;
+struct HPMHookPoint *HP_chrif_send_usercount_tochar_pre;
+struct HPMHookPoint *HP_chrif_send_usercount_tochar_post;
+struct HPMHookPoint *HP_chrif_auth_db_cleanup_pre;
+struct HPMHookPoint *HP_chrif_auth_db_cleanup_post;
+struct HPMHookPoint *HP_chrif_connect_pre;
+struct HPMHookPoint *HP_chrif_connect_post;
+struct HPMHookPoint *HP_chrif_connectack_pre;
+struct HPMHookPoint *HP_chrif_connectack_post;
+struct HPMHookPoint *HP_chrif_sendmap_pre;
+struct HPMHookPoint *HP_chrif_sendmap_post;
+struct HPMHookPoint *HP_chrif_sendmapack_pre;
+struct HPMHookPoint *HP_chrif_sendmapack_post;
+struct HPMHookPoint *HP_chrif_recvmap_pre;
+struct HPMHookPoint *HP_chrif_recvmap_post;
+struct HPMHookPoint *HP_chrif_changemapserverack_pre;
+struct HPMHookPoint *HP_chrif_changemapserverack_post;
+struct HPMHookPoint *HP_chrif_changedsex_pre;
+struct HPMHookPoint *HP_chrif_changedsex_post;
+struct HPMHookPoint *HP_chrif_divorceack_pre;
+struct HPMHookPoint *HP_chrif_divorceack_post;
+struct HPMHookPoint *HP_chrif_accountban_pre;
+struct HPMHookPoint *HP_chrif_accountban_post;
+struct HPMHookPoint *HP_chrif_recvfamelist_pre;
+struct HPMHookPoint *HP_chrif_recvfamelist_post;
+struct HPMHookPoint *HP_chrif_load_scdata_pre;
+struct HPMHookPoint *HP_chrif_load_scdata_post;
+struct HPMHookPoint *HP_chrif_update_ip_pre;
+struct HPMHookPoint *HP_chrif_update_ip_post;
+struct HPMHookPoint *HP_chrif_disconnectplayer_pre;
+struct HPMHookPoint *HP_chrif_disconnectplayer_post;
+struct HPMHookPoint *HP_chrif_removemap_pre;
+struct HPMHookPoint *HP_chrif_removemap_post;
+struct HPMHookPoint *HP_chrif_updatefamelist_ack_pre;
+struct HPMHookPoint *HP_chrif_updatefamelist_ack_post;
+struct HPMHookPoint *HP_chrif_keepalive_pre;
+struct HPMHookPoint *HP_chrif_keepalive_post;
+struct HPMHookPoint *HP_chrif_keepalive_ack_pre;
+struct HPMHookPoint *HP_chrif_keepalive_ack_post;
+struct HPMHookPoint *HP_chrif_deadopt_pre;
+struct HPMHookPoint *HP_chrif_deadopt_post;
+struct HPMHookPoint *HP_chrif_authfail_pre;
+struct HPMHookPoint *HP_chrif_authfail_post;
+struct HPMHookPoint *HP_chrif_on_ready_pre;
+struct HPMHookPoint *HP_chrif_on_ready_post;
+struct HPMHookPoint *HP_chrif_on_disconnect_pre;
+struct HPMHookPoint *HP_chrif_on_disconnect_post;
+struct HPMHookPoint *HP_chrif_parse_pre;
+struct HPMHookPoint *HP_chrif_parse_post;
+struct HPMHookPoint *HP_clif_init_pre;
+struct HPMHookPoint *HP_clif_init_post;
+struct HPMHookPoint *HP_clif_final_pre;
+struct HPMHookPoint *HP_clif_final_post;
+struct HPMHookPoint *HP_clif_setip_pre;
+struct HPMHookPoint *HP_clif_setip_post;
+struct HPMHookPoint *HP_clif_setbindip_pre;
+struct HPMHookPoint *HP_clif_setbindip_post;
+struct HPMHookPoint *HP_clif_setport_pre;
+struct HPMHookPoint *HP_clif_setport_post;
+struct HPMHookPoint *HP_clif_refresh_ip_pre;
+struct HPMHookPoint *HP_clif_refresh_ip_post;
+struct HPMHookPoint *HP_clif_send_pre;
+struct HPMHookPoint *HP_clif_send_post;
+struct HPMHookPoint *HP_clif_send_sub_pre;
+struct HPMHookPoint *HP_clif_send_sub_post;
+struct HPMHookPoint *HP_clif_parse_pre;
+struct HPMHookPoint *HP_clif_parse_post;
+struct HPMHookPoint *HP_clif_parse_cmd_pre;
+struct HPMHookPoint *HP_clif_parse_cmd_post;
+struct HPMHookPoint *HP_clif_decrypt_cmd_pre;
+struct HPMHookPoint *HP_clif_decrypt_cmd_post;
+struct HPMHookPoint *HP_clif_authok_pre;
+struct HPMHookPoint *HP_clif_authok_post;
+struct HPMHookPoint *HP_clif_authrefuse_pre;
+struct HPMHookPoint *HP_clif_authrefuse_post;
+struct HPMHookPoint *HP_clif_authfail_fd_pre;
+struct HPMHookPoint *HP_clif_authfail_fd_post;
+struct HPMHookPoint *HP_clif_charselectok_pre;
+struct HPMHookPoint *HP_clif_charselectok_post;
+struct HPMHookPoint *HP_clif_dropflooritem_pre;
+struct HPMHookPoint *HP_clif_dropflooritem_post;
+struct HPMHookPoint *HP_clif_clearflooritem_pre;
+struct HPMHookPoint *HP_clif_clearflooritem_post;
+struct HPMHookPoint *HP_clif_additem_pre;
+struct HPMHookPoint *HP_clif_additem_post;
+struct HPMHookPoint *HP_clif_dropitem_pre;
+struct HPMHookPoint *HP_clif_dropitem_post;
+struct HPMHookPoint *HP_clif_delitem_pre;
+struct HPMHookPoint *HP_clif_delitem_post;
+struct HPMHookPoint *HP_clif_takeitem_pre;
+struct HPMHookPoint *HP_clif_takeitem_post;
+struct HPMHookPoint *HP_clif_arrowequip_pre;
+struct HPMHookPoint *HP_clif_arrowequip_post;
+struct HPMHookPoint *HP_clif_arrow_fail_pre;
+struct HPMHookPoint *HP_clif_arrow_fail_post;
+struct HPMHookPoint *HP_clif_use_card_pre;
+struct HPMHookPoint *HP_clif_use_card_post;
+struct HPMHookPoint *HP_clif_cart_additem_pre;
+struct HPMHookPoint *HP_clif_cart_additem_post;
+struct HPMHookPoint *HP_clif_cart_delitem_pre;
+struct HPMHookPoint *HP_clif_cart_delitem_post;
+struct HPMHookPoint *HP_clif_equipitemack_pre;
+struct HPMHookPoint *HP_clif_equipitemack_post;
+struct HPMHookPoint *HP_clif_unequipitemack_pre;
+struct HPMHookPoint *HP_clif_unequipitemack_post;
+struct HPMHookPoint *HP_clif_useitemack_pre;
+struct HPMHookPoint *HP_clif_useitemack_post;
+struct HPMHookPoint *HP_clif_addcards_pre;
+struct HPMHookPoint *HP_clif_addcards_post;
+struct HPMHookPoint *HP_clif_addcards2_pre;
+struct HPMHookPoint *HP_clif_addcards2_post;
+struct HPMHookPoint *HP_clif_item_sub_pre;
+struct HPMHookPoint *HP_clif_item_sub_post;
+struct HPMHookPoint *HP_clif_getareachar_item_pre;
+struct HPMHookPoint *HP_clif_getareachar_item_post;
+struct HPMHookPoint *HP_clif_cart_additem_ack_pre;
+struct HPMHookPoint *HP_clif_cart_additem_ack_post;
+struct HPMHookPoint *HP_clif_cashshop_load_pre;
+struct HPMHookPoint *HP_clif_cashshop_load_post;
+struct HPMHookPoint *HP_clif_package_announce_pre;
+struct HPMHookPoint *HP_clif_package_announce_post;
+struct HPMHookPoint *HP_clif_clearunit_single_pre;
+struct HPMHookPoint *HP_clif_clearunit_single_post;
+struct HPMHookPoint *HP_clif_clearunit_area_pre;
+struct HPMHookPoint *HP_clif_clearunit_area_post;
+struct HPMHookPoint *HP_clif_clearunit_delayed_pre;
+struct HPMHookPoint *HP_clif_clearunit_delayed_post;
+struct HPMHookPoint *HP_clif_walkok_pre;
+struct HPMHookPoint *HP_clif_walkok_post;
+struct HPMHookPoint *HP_clif_move_pre;
+struct HPMHookPoint *HP_clif_move_post;
+struct HPMHookPoint *HP_clif_move2_pre;
+struct HPMHookPoint *HP_clif_move2_post;
+struct HPMHookPoint *HP_clif_blown_pre;
+struct HPMHookPoint *HP_clif_blown_post;
+struct HPMHookPoint *HP_clif_slide_pre;
+struct HPMHookPoint *HP_clif_slide_post;
+struct HPMHookPoint *HP_clif_fixpos_pre;
+struct HPMHookPoint *HP_clif_fixpos_post;
+struct HPMHookPoint *HP_clif_changelook_pre;
+struct HPMHookPoint *HP_clif_changelook_post;
+struct HPMHookPoint *HP_clif_changetraplook_pre;
+struct HPMHookPoint *HP_clif_changetraplook_post;
+struct HPMHookPoint *HP_clif_refreshlook_pre;
+struct HPMHookPoint *HP_clif_refreshlook_post;
+struct HPMHookPoint *HP_clif_class_change_pre;
+struct HPMHookPoint *HP_clif_class_change_post;
+struct HPMHookPoint *HP_clif_skill_setunit_pre;
+struct HPMHookPoint *HP_clif_skill_setunit_post;
+struct HPMHookPoint *HP_clif_skill_delunit_pre;
+struct HPMHookPoint *HP_clif_skill_delunit_post;
+struct HPMHookPoint *HP_clif_skillunit_update_pre;
+struct HPMHookPoint *HP_clif_skillunit_update_post;
+struct HPMHookPoint *HP_clif_clearunit_delayed_sub_pre;
+struct HPMHookPoint *HP_clif_clearunit_delayed_sub_post;
+struct HPMHookPoint *HP_clif_set_unit_idle_pre;
+struct HPMHookPoint *HP_clif_set_unit_idle_post;
+struct HPMHookPoint *HP_clif_spawn_unit_pre;
+struct HPMHookPoint *HP_clif_spawn_unit_post;
+struct HPMHookPoint *HP_clif_spawn_unit2_pre;
+struct HPMHookPoint *HP_clif_spawn_unit2_post;
+struct HPMHookPoint *HP_clif_set_unit_idle2_pre;
+struct HPMHookPoint *HP_clif_set_unit_idle2_post;
+struct HPMHookPoint *HP_clif_set_unit_walking_pre;
+struct HPMHookPoint *HP_clif_set_unit_walking_post;
+struct HPMHookPoint *HP_clif_calc_walkdelay_pre;
+struct HPMHookPoint *HP_clif_calc_walkdelay_post;
+struct HPMHookPoint *HP_clif_getareachar_skillunit_pre;
+struct HPMHookPoint *HP_clif_getareachar_skillunit_post;
+struct HPMHookPoint *HP_clif_getareachar_unit_pre;
+struct HPMHookPoint *HP_clif_getareachar_unit_post;
+struct HPMHookPoint *HP_clif_clearchar_skillunit_pre;
+struct HPMHookPoint *HP_clif_clearchar_skillunit_post;
+struct HPMHookPoint *HP_clif_getareachar_pre;
+struct HPMHookPoint *HP_clif_getareachar_post;
+struct HPMHookPoint *HP_clif_spawn_pre;
+struct HPMHookPoint *HP_clif_spawn_post;
+struct HPMHookPoint *HP_clif_changemap_pre;
+struct HPMHookPoint *HP_clif_changemap_post;
+struct HPMHookPoint *HP_clif_changemapcell_pre;
+struct HPMHookPoint *HP_clif_changemapcell_post;
+struct HPMHookPoint *HP_clif_map_property_pre;
+struct HPMHookPoint *HP_clif_map_property_post;
+struct HPMHookPoint *HP_clif_pvpset_pre;
+struct HPMHookPoint *HP_clif_pvpset_post;
+struct HPMHookPoint *HP_clif_map_property_mapall_pre;
+struct HPMHookPoint *HP_clif_map_property_mapall_post;
+struct HPMHookPoint *HP_clif_bossmapinfo_pre;
+struct HPMHookPoint *HP_clif_bossmapinfo_post;
+struct HPMHookPoint *HP_clif_map_type_pre;
+struct HPMHookPoint *HP_clif_map_type_post;
+struct HPMHookPoint *HP_clif_maptypeproperty2_pre;
+struct HPMHookPoint *HP_clif_maptypeproperty2_post;
+struct HPMHookPoint *HP_clif_changemapserver_pre;
+struct HPMHookPoint *HP_clif_changemapserver_post;
+struct HPMHookPoint *HP_clif_npcbuysell_pre;
+struct HPMHookPoint *HP_clif_npcbuysell_post;
+struct HPMHookPoint *HP_clif_buylist_pre;
+struct HPMHookPoint *HP_clif_buylist_post;
+struct HPMHookPoint *HP_clif_selllist_pre;
+struct HPMHookPoint *HP_clif_selllist_post;
+struct HPMHookPoint *HP_clif_cashshop_show_pre;
+struct HPMHookPoint *HP_clif_cashshop_show_post;
+struct HPMHookPoint *HP_clif_npc_buy_result_pre;
+struct HPMHookPoint *HP_clif_npc_buy_result_post;
+struct HPMHookPoint *HP_clif_npc_sell_result_pre;
+struct HPMHookPoint *HP_clif_npc_sell_result_post;
+struct HPMHookPoint *HP_clif_cashshop_ack_pre;
+struct HPMHookPoint *HP_clif_cashshop_ack_post;
+struct HPMHookPoint *HP_clif_scriptmes_pre;
+struct HPMHookPoint *HP_clif_scriptmes_post;
+struct HPMHookPoint *HP_clif_scriptnext_pre;
+struct HPMHookPoint *HP_clif_scriptnext_post;
+struct HPMHookPoint *HP_clif_scriptclose_pre;
+struct HPMHookPoint *HP_clif_scriptclose_post;
+struct HPMHookPoint *HP_clif_scriptmenu_pre;
+struct HPMHookPoint *HP_clif_scriptmenu_post;
+struct HPMHookPoint *HP_clif_scriptinput_pre;
+struct HPMHookPoint *HP_clif_scriptinput_post;
+struct HPMHookPoint *HP_clif_scriptinputstr_pre;
+struct HPMHookPoint *HP_clif_scriptinputstr_post;
+struct HPMHookPoint *HP_clif_cutin_pre;
+struct HPMHookPoint *HP_clif_cutin_post;
+struct HPMHookPoint *HP_clif_sendfakenpc_pre;
+struct HPMHookPoint *HP_clif_sendfakenpc_post;
+struct HPMHookPoint *HP_clif_scriptclear_pre;
+struct HPMHookPoint *HP_clif_scriptclear_post;
+struct HPMHookPoint *HP_clif_viewpoint_pre;
+struct HPMHookPoint *HP_clif_viewpoint_post;
+struct HPMHookPoint *HP_clif_damage_pre;
+struct HPMHookPoint *HP_clif_damage_post;
+struct HPMHookPoint *HP_clif_sitting_pre;
+struct HPMHookPoint *HP_clif_sitting_post;
+struct HPMHookPoint *HP_clif_standing_pre;
+struct HPMHookPoint *HP_clif_standing_post;
+struct HPMHookPoint *HP_clif_arrow_create_list_pre;
+struct HPMHookPoint *HP_clif_arrow_create_list_post;
+struct HPMHookPoint *HP_clif_refresh_pre;
+struct HPMHookPoint *HP_clif_refresh_post;
+struct HPMHookPoint *HP_clif_fame_blacksmith_pre;
+struct HPMHookPoint *HP_clif_fame_blacksmith_post;
+struct HPMHookPoint *HP_clif_fame_alchemist_pre;
+struct HPMHookPoint *HP_clif_fame_alchemist_post;
+struct HPMHookPoint *HP_clif_fame_taekwon_pre;
+struct HPMHookPoint *HP_clif_fame_taekwon_post;
+struct HPMHookPoint *HP_clif_ranklist_pre;
+struct HPMHookPoint *HP_clif_ranklist_post;
+struct HPMHookPoint *HP_clif_update_rankingpoint_pre;
+struct HPMHookPoint *HP_clif_update_rankingpoint_post;
+struct HPMHookPoint *HP_clif_pRanklist_pre;
+struct HPMHookPoint *HP_clif_pRanklist_post;
+struct HPMHookPoint *HP_clif_hotkeys_pre;
+struct HPMHookPoint *HP_clif_hotkeys_post;
+struct HPMHookPoint *HP_clif_insight_pre;
+struct HPMHookPoint *HP_clif_insight_post;
+struct HPMHookPoint *HP_clif_outsight_pre;
+struct HPMHookPoint *HP_clif_outsight_post;
+struct HPMHookPoint *HP_clif_skillcastcancel_pre;
+struct HPMHookPoint *HP_clif_skillcastcancel_post;
+struct HPMHookPoint *HP_clif_skill_fail_pre;
+struct HPMHookPoint *HP_clif_skill_fail_post;
+struct HPMHookPoint *HP_clif_skill_cooldown_pre;
+struct HPMHookPoint *HP_clif_skill_cooldown_post;
+struct HPMHookPoint *HP_clif_skill_memomessage_pre;
+struct HPMHookPoint *HP_clif_skill_memomessage_post;
+struct HPMHookPoint *HP_clif_skill_mapinfomessage_pre;
+struct HPMHookPoint *HP_clif_skill_mapinfomessage_post;
+struct HPMHookPoint *HP_clif_skill_produce_mix_list_pre;
+struct HPMHookPoint *HP_clif_skill_produce_mix_list_post;
+struct HPMHookPoint *HP_clif_cooking_list_pre;
+struct HPMHookPoint *HP_clif_cooking_list_post;
+struct HPMHookPoint *HP_clif_autospell_pre;
+struct HPMHookPoint *HP_clif_autospell_post;
+struct HPMHookPoint *HP_clif_combo_delay_pre;
+struct HPMHookPoint *HP_clif_combo_delay_post;
+struct HPMHookPoint *HP_clif_status_change_pre;
+struct HPMHookPoint *HP_clif_status_change_post;
+struct HPMHookPoint *HP_clif_insert_card_pre;
+struct HPMHookPoint *HP_clif_insert_card_post;
+struct HPMHookPoint *HP_clif_inventorylist_pre;
+struct HPMHookPoint *HP_clif_inventorylist_post;
+struct HPMHookPoint *HP_clif_equiplist_pre;
+struct HPMHookPoint *HP_clif_equiplist_post;
+struct HPMHookPoint *HP_clif_cartlist_pre;
+struct HPMHookPoint *HP_clif_cartlist_post;
+struct HPMHookPoint *HP_clif_favorite_item_pre;
+struct HPMHookPoint *HP_clif_favorite_item_post;
+struct HPMHookPoint *HP_clif_clearcart_pre;
+struct HPMHookPoint *HP_clif_clearcart_post;
+struct HPMHookPoint *HP_clif_item_identify_list_pre;
+struct HPMHookPoint *HP_clif_item_identify_list_post;
+struct HPMHookPoint *HP_clif_item_identified_pre;
+struct HPMHookPoint *HP_clif_item_identified_post;
+struct HPMHookPoint *HP_clif_item_repair_list_pre;
+struct HPMHookPoint *HP_clif_item_repair_list_post;
+struct HPMHookPoint *HP_clif_item_repaireffect_pre;
+struct HPMHookPoint *HP_clif_item_repaireffect_post;
+struct HPMHookPoint *HP_clif_item_damaged_pre;
+struct HPMHookPoint *HP_clif_item_damaged_post;
+struct HPMHookPoint *HP_clif_item_refine_list_pre;
+struct HPMHookPoint *HP_clif_item_refine_list_post;
+struct HPMHookPoint *HP_clif_item_skill_pre;
+struct HPMHookPoint *HP_clif_item_skill_post;
+struct HPMHookPoint *HP_clif_mvp_item_pre;
+struct HPMHookPoint *HP_clif_mvp_item_post;
+struct HPMHookPoint *HP_clif_mvp_exp_pre;
+struct HPMHookPoint *HP_clif_mvp_exp_post;
+struct HPMHookPoint *HP_clif_mvp_noitem_pre;
+struct HPMHookPoint *HP_clif_mvp_noitem_post;
+struct HPMHookPoint *HP_clif_changed_dir_pre;
+struct HPMHookPoint *HP_clif_changed_dir_post;
+struct HPMHookPoint *HP_clif_charnameack_pre;
+struct HPMHookPoint *HP_clif_charnameack_post;
+struct HPMHookPoint *HP_clif_monster_hp_bar_pre;
+struct HPMHookPoint *HP_clif_monster_hp_bar_post;
+struct HPMHookPoint *HP_clif_hpmeter_pre;
+struct HPMHookPoint *HP_clif_hpmeter_post;
+struct HPMHookPoint *HP_clif_hpmeter_single_pre;
+struct HPMHookPoint *HP_clif_hpmeter_single_post;
+struct HPMHookPoint *HP_clif_hpmeter_sub_pre;
+struct HPMHookPoint *HP_clif_hpmeter_sub_post;
+struct HPMHookPoint *HP_clif_upgrademessage_pre;
+struct HPMHookPoint *HP_clif_upgrademessage_post;
+struct HPMHookPoint *HP_clif_get_weapon_view_pre;
+struct HPMHookPoint *HP_clif_get_weapon_view_post;
+struct HPMHookPoint *HP_clif_gospel_info_pre;
+struct HPMHookPoint *HP_clif_gospel_info_post;
+struct HPMHookPoint *HP_clif_feel_req_pre;
+struct HPMHookPoint *HP_clif_feel_req_post;
+struct HPMHookPoint *HP_clif_starskill_pre;
+struct HPMHookPoint *HP_clif_starskill_post;
+struct HPMHookPoint *HP_clif_feel_info_pre;
+struct HPMHookPoint *HP_clif_feel_info_post;
+struct HPMHookPoint *HP_clif_hate_info_pre;
+struct HPMHookPoint *HP_clif_hate_info_post;
+struct HPMHookPoint *HP_clif_mission_info_pre;
+struct HPMHookPoint *HP_clif_mission_info_post;
+struct HPMHookPoint *HP_clif_feel_hate_reset_pre;
+struct HPMHookPoint *HP_clif_feel_hate_reset_post;
+struct HPMHookPoint *HP_clif_partytickack_pre;
+struct HPMHookPoint *HP_clif_partytickack_post;
+struct HPMHookPoint *HP_clif_equiptickack_pre;
+struct HPMHookPoint *HP_clif_equiptickack_post;
+struct HPMHookPoint *HP_clif_viewequip_ack_pre;
+struct HPMHookPoint *HP_clif_viewequip_ack_post;
+struct HPMHookPoint *HP_clif_viewequip_fail_pre;
+struct HPMHookPoint *HP_clif_viewequip_fail_post;
+struct HPMHookPoint *HP_clif_equpcheckbox_pre;
+struct HPMHookPoint *HP_clif_equpcheckbox_post;
+struct HPMHookPoint *HP_clif_displayexp_pre;
+struct HPMHookPoint *HP_clif_displayexp_post;
+struct HPMHookPoint *HP_clif_font_pre;
+struct HPMHookPoint *HP_clif_font_post;
+struct HPMHookPoint *HP_clif_progressbar_pre;
+struct HPMHookPoint *HP_clif_progressbar_post;
+struct HPMHookPoint *HP_clif_progressbar_abort_pre;
+struct HPMHookPoint *HP_clif_progressbar_abort_post;
+struct HPMHookPoint *HP_clif_showdigit_pre;
+struct HPMHookPoint *HP_clif_showdigit_post;
+struct HPMHookPoint *HP_clif_elementalconverter_list_pre;
+struct HPMHookPoint *HP_clif_elementalconverter_list_post;
+struct HPMHookPoint *HP_clif_spellbook_list_pre;
+struct HPMHookPoint *HP_clif_spellbook_list_post;
+struct HPMHookPoint *HP_clif_magicdecoy_list_pre;
+struct HPMHookPoint *HP_clif_magicdecoy_list_post;
+struct HPMHookPoint *HP_clif_poison_list_pre;
+struct HPMHookPoint *HP_clif_poison_list_post;
+struct HPMHookPoint *HP_clif_autoshadowspell_list_pre;
+struct HPMHookPoint *HP_clif_autoshadowspell_list_post;
+struct HPMHookPoint *HP_clif_skill_itemlistwindow_pre;
+struct HPMHookPoint *HP_clif_skill_itemlistwindow_post;
+struct HPMHookPoint *HP_clif_sc_load_pre;
+struct HPMHookPoint *HP_clif_sc_load_post;
+struct HPMHookPoint *HP_clif_sc_end_pre;
+struct HPMHookPoint *HP_clif_sc_end_post;
+struct HPMHookPoint *HP_clif_initialstatus_pre;
+struct HPMHookPoint *HP_clif_initialstatus_post;
+struct HPMHookPoint *HP_clif_cooldown_list_pre;
+struct HPMHookPoint *HP_clif_cooldown_list_post;
+struct HPMHookPoint *HP_clif_updatestatus_pre;
+struct HPMHookPoint *HP_clif_updatestatus_post;
+struct HPMHookPoint *HP_clif_changestatus_pre;
+struct HPMHookPoint *HP_clif_changestatus_post;
+struct HPMHookPoint *HP_clif_statusupack_pre;
+struct HPMHookPoint *HP_clif_statusupack_post;
+struct HPMHookPoint *HP_clif_movetoattack_pre;
+struct HPMHookPoint *HP_clif_movetoattack_post;
+struct HPMHookPoint *HP_clif_solved_charname_pre;
+struct HPMHookPoint *HP_clif_solved_charname_post;
+struct HPMHookPoint *HP_clif_charnameupdate_pre;
+struct HPMHookPoint *HP_clif_charnameupdate_post;
+struct HPMHookPoint *HP_clif_delayquit_pre;
+struct HPMHookPoint *HP_clif_delayquit_post;
+struct HPMHookPoint *HP_clif_getareachar_pc_pre;
+struct HPMHookPoint *HP_clif_getareachar_pc_post;
+struct HPMHookPoint *HP_clif_disconnect_ack_pre;
+struct HPMHookPoint *HP_clif_disconnect_ack_post;
+struct HPMHookPoint *HP_clif_PVPInfo_pre;
+struct HPMHookPoint *HP_clif_PVPInfo_post;
+struct HPMHookPoint *HP_clif_blacksmith_pre;
+struct HPMHookPoint *HP_clif_blacksmith_post;
+struct HPMHookPoint *HP_clif_alchemist_pre;
+struct HPMHookPoint *HP_clif_alchemist_post;
+struct HPMHookPoint *HP_clif_taekwon_pre;
+struct HPMHookPoint *HP_clif_taekwon_post;
+struct HPMHookPoint *HP_clif_ranking_pk_pre;
+struct HPMHookPoint *HP_clif_ranking_pk_post;
+struct HPMHookPoint *HP_clif_quitsave_pre;
+struct HPMHookPoint *HP_clif_quitsave_post;
+struct HPMHookPoint *HP_clif_misceffect_pre;
+struct HPMHookPoint *HP_clif_misceffect_post;
+struct HPMHookPoint *HP_clif_changeoption_pre;
+struct HPMHookPoint *HP_clif_changeoption_post;
+struct HPMHookPoint *HP_clif_changeoption2_pre;
+struct HPMHookPoint *HP_clif_changeoption2_post;
+struct HPMHookPoint *HP_clif_emotion_pre;
+struct HPMHookPoint *HP_clif_emotion_post;
+struct HPMHookPoint *HP_clif_talkiebox_pre;
+struct HPMHookPoint *HP_clif_talkiebox_post;
+struct HPMHookPoint *HP_clif_wedding_effect_pre;
+struct HPMHookPoint *HP_clif_wedding_effect_post;
+struct HPMHookPoint *HP_clif_divorced_pre;
+struct HPMHookPoint *HP_clif_divorced_post;
+struct HPMHookPoint *HP_clif_callpartner_pre;
+struct HPMHookPoint *HP_clif_callpartner_post;
+struct HPMHookPoint *HP_clif_skill_damage_pre;
+struct HPMHookPoint *HP_clif_skill_damage_post;
+struct HPMHookPoint *HP_clif_skill_nodamage_pre;
+struct HPMHookPoint *HP_clif_skill_nodamage_post;
+struct HPMHookPoint *HP_clif_skill_poseffect_pre;
+struct HPMHookPoint *HP_clif_skill_poseffect_post;
+struct HPMHookPoint *HP_clif_skill_estimation_pre;
+struct HPMHookPoint *HP_clif_skill_estimation_post;
+struct HPMHookPoint *HP_clif_skill_warppoint_pre;
+struct HPMHookPoint *HP_clif_skill_warppoint_post;
+struct HPMHookPoint *HP_clif_skillcasting_pre;
+struct HPMHookPoint *HP_clif_skillcasting_post;
+struct HPMHookPoint *HP_clif_produce_effect_pre;
+struct HPMHookPoint *HP_clif_produce_effect_post;
+struct HPMHookPoint *HP_clif_devotion_pre;
+struct HPMHookPoint *HP_clif_devotion_post;
+struct HPMHookPoint *HP_clif_spiritball_pre;
+struct HPMHookPoint *HP_clif_spiritball_post;
+struct HPMHookPoint *HP_clif_spiritball_single_pre;
+struct HPMHookPoint *HP_clif_spiritball_single_post;
+struct HPMHookPoint *HP_clif_bladestop_pre;
+struct HPMHookPoint *HP_clif_bladestop_post;
+struct HPMHookPoint *HP_clif_mvp_effect_pre;
+struct HPMHookPoint *HP_clif_mvp_effect_post;
+struct HPMHookPoint *HP_clif_heal_pre;
+struct HPMHookPoint *HP_clif_heal_post;
+struct HPMHookPoint *HP_clif_resurrection_pre;
+struct HPMHookPoint *HP_clif_resurrection_post;
+struct HPMHookPoint *HP_clif_refine_pre;
+struct HPMHookPoint *HP_clif_refine_post;
+struct HPMHookPoint *HP_clif_weather_pre;
+struct HPMHookPoint *HP_clif_weather_post;
+struct HPMHookPoint *HP_clif_specialeffect_pre;
+struct HPMHookPoint *HP_clif_specialeffect_post;
+struct HPMHookPoint *HP_clif_specialeffect_single_pre;
+struct HPMHookPoint *HP_clif_specialeffect_single_post;
+struct HPMHookPoint *HP_clif_specialeffect_value_pre;
+struct HPMHookPoint *HP_clif_specialeffect_value_post;
+struct HPMHookPoint *HP_clif_millenniumshield_pre;
+struct HPMHookPoint *HP_clif_millenniumshield_post;
+struct HPMHookPoint *HP_clif_charm_pre;
+struct HPMHookPoint *HP_clif_charm_post;
+struct HPMHookPoint *HP_clif_charm_single_pre;
+struct HPMHookPoint *HP_clif_charm_single_post;
+struct HPMHookPoint *HP_clif_snap_pre;
+struct HPMHookPoint *HP_clif_snap_post;
+struct HPMHookPoint *HP_clif_weather_check_pre;
+struct HPMHookPoint *HP_clif_weather_check_post;
+struct HPMHookPoint *HP_clif_playBGM_pre;
+struct HPMHookPoint *HP_clif_playBGM_post;
+struct HPMHookPoint *HP_clif_soundeffect_pre;
+struct HPMHookPoint *HP_clif_soundeffect_post;
+struct HPMHookPoint *HP_clif_soundeffectall_pre;
+struct HPMHookPoint *HP_clif_soundeffectall_post;
+struct HPMHookPoint *HP_clif_GlobalMessage_pre;
+struct HPMHookPoint *HP_clif_GlobalMessage_post;
+struct HPMHookPoint *HP_clif_createchat_pre;
+struct HPMHookPoint *HP_clif_createchat_post;
+struct HPMHookPoint *HP_clif_dispchat_pre;
+struct HPMHookPoint *HP_clif_dispchat_post;
+struct HPMHookPoint *HP_clif_joinchatfail_pre;
+struct HPMHookPoint *HP_clif_joinchatfail_post;
+struct HPMHookPoint *HP_clif_joinchatok_pre;
+struct HPMHookPoint *HP_clif_joinchatok_post;
+struct HPMHookPoint *HP_clif_addchat_pre;
+struct HPMHookPoint *HP_clif_addchat_post;
+struct HPMHookPoint *HP_clif_changechatowner_pre;
+struct HPMHookPoint *HP_clif_changechatowner_post;
+struct HPMHookPoint *HP_clif_clearchat_pre;
+struct HPMHookPoint *HP_clif_clearchat_post;
+struct HPMHookPoint *HP_clif_leavechat_pre;
+struct HPMHookPoint *HP_clif_leavechat_post;
+struct HPMHookPoint *HP_clif_changechatstatus_pre;
+struct HPMHookPoint *HP_clif_changechatstatus_post;
+struct HPMHookPoint *HP_clif_wis_message_pre;
+struct HPMHookPoint *HP_clif_wis_message_post;
+struct HPMHookPoint *HP_clif_wis_end_pre;
+struct HPMHookPoint *HP_clif_wis_end_post;
+struct HPMHookPoint *HP_clif_disp_onlyself_pre;
+struct HPMHookPoint *HP_clif_disp_onlyself_post;
+struct HPMHookPoint *HP_clif_disp_message_pre;
+struct HPMHookPoint *HP_clif_disp_message_post;
+struct HPMHookPoint *HP_clif_broadcast_pre;
+struct HPMHookPoint *HP_clif_broadcast_post;
+struct HPMHookPoint *HP_clif_broadcast2_pre;
+struct HPMHookPoint *HP_clif_broadcast2_post;
+struct HPMHookPoint *HP_clif_messagecolor_pre;
+struct HPMHookPoint *HP_clif_messagecolor_post;
+struct HPMHookPoint *HP_clif_disp_overhead_pre;
+struct HPMHookPoint *HP_clif_disp_overhead_post;
+struct HPMHookPoint *HP_clif_msg_pre;
+struct HPMHookPoint *HP_clif_msg_post;
+struct HPMHookPoint *HP_clif_msg_value_pre;
+struct HPMHookPoint *HP_clif_msg_value_post;
+struct HPMHookPoint *HP_clif_msg_skill_pre;
+struct HPMHookPoint *HP_clif_msg_skill_post;
+struct HPMHookPoint *HP_clif_msgtable_pre;
+struct HPMHookPoint *HP_clif_msgtable_post;
+struct HPMHookPoint *HP_clif_msgtable_num_pre;
+struct HPMHookPoint *HP_clif_msgtable_num_post;
+struct HPMHookPoint *HP_clif_message_pre;
+struct HPMHookPoint *HP_clif_message_post;
+struct HPMHookPoint *HP_clif_messageln_pre;
+struct HPMHookPoint *HP_clif_messageln_post;
+struct HPMHookPoint *HP_clif_colormes_pre;
+struct HPMHookPoint *HP_clif_colormes_post;
+struct HPMHookPoint *HP_clif_process_message_pre;
+struct HPMHookPoint *HP_clif_process_message_post;
+struct HPMHookPoint *HP_clif_wisexin_pre;
+struct HPMHookPoint *HP_clif_wisexin_post;
+struct HPMHookPoint *HP_clif_wisall_pre;
+struct HPMHookPoint *HP_clif_wisall_post;
+struct HPMHookPoint *HP_clif_PMIgnoreList_pre;
+struct HPMHookPoint *HP_clif_PMIgnoreList_post;
+struct HPMHookPoint *HP_clif_traderequest_pre;
+struct HPMHookPoint *HP_clif_traderequest_post;
+struct HPMHookPoint *HP_clif_tradestart_pre;
+struct HPMHookPoint *HP_clif_tradestart_post;
+struct HPMHookPoint *HP_clif_tradeadditem_pre;
+struct HPMHookPoint *HP_clif_tradeadditem_post;
+struct HPMHookPoint *HP_clif_tradeitemok_pre;
+struct HPMHookPoint *HP_clif_tradeitemok_post;
+struct HPMHookPoint *HP_clif_tradedeal_lock_pre;
+struct HPMHookPoint *HP_clif_tradedeal_lock_post;
+struct HPMHookPoint *HP_clif_tradecancelled_pre;
+struct HPMHookPoint *HP_clif_tradecancelled_post;
+struct HPMHookPoint *HP_clif_tradecompleted_pre;
+struct HPMHookPoint *HP_clif_tradecompleted_post;
+struct HPMHookPoint *HP_clif_tradeundo_pre;
+struct HPMHookPoint *HP_clif_tradeundo_post;
+struct HPMHookPoint *HP_clif_openvendingreq_pre;
+struct HPMHookPoint *HP_clif_openvendingreq_post;
+struct HPMHookPoint *HP_clif_showvendingboard_pre;
+struct HPMHookPoint *HP_clif_showvendingboard_post;
+struct HPMHookPoint *HP_clif_closevendingboard_pre;
+struct HPMHookPoint *HP_clif_closevendingboard_post;
+struct HPMHookPoint *HP_clif_vendinglist_pre;
+struct HPMHookPoint *HP_clif_vendinglist_post;
+struct HPMHookPoint *HP_clif_buyvending_pre;
+struct HPMHookPoint *HP_clif_buyvending_post;
+struct HPMHookPoint *HP_clif_openvending_pre;
+struct HPMHookPoint *HP_clif_openvending_post;
+struct HPMHookPoint *HP_clif_vendingreport_pre;
+struct HPMHookPoint *HP_clif_vendingreport_post;
+struct HPMHookPoint *HP_clif_storagelist_pre;
+struct HPMHookPoint *HP_clif_storagelist_post;
+struct HPMHookPoint *HP_clif_updatestorageamount_pre;
+struct HPMHookPoint *HP_clif_updatestorageamount_post;
+struct HPMHookPoint *HP_clif_storageitemadded_pre;
+struct HPMHookPoint *HP_clif_storageitemadded_post;
+struct HPMHookPoint *HP_clif_storageitemremoved_pre;
+struct HPMHookPoint *HP_clif_storageitemremoved_post;
+struct HPMHookPoint *HP_clif_storageclose_pre;
+struct HPMHookPoint *HP_clif_storageclose_post;
+struct HPMHookPoint *HP_clif_skillinfoblock_pre;
+struct HPMHookPoint *HP_clif_skillinfoblock_post;
+struct HPMHookPoint *HP_clif_skillup_pre;
+struct HPMHookPoint *HP_clif_skillup_post;
+struct HPMHookPoint *HP_clif_skillinfo_pre;
+struct HPMHookPoint *HP_clif_skillinfo_post;
+struct HPMHookPoint *HP_clif_addskill_pre;
+struct HPMHookPoint *HP_clif_addskill_post;
+struct HPMHookPoint *HP_clif_deleteskill_pre;
+struct HPMHookPoint *HP_clif_deleteskill_post;
+struct HPMHookPoint *HP_clif_party_created_pre;
+struct HPMHookPoint *HP_clif_party_created_post;
+struct HPMHookPoint *HP_clif_party_member_info_pre;
+struct HPMHookPoint *HP_clif_party_member_info_post;
+struct HPMHookPoint *HP_clif_party_info_pre;
+struct HPMHookPoint *HP_clif_party_info_post;
+struct HPMHookPoint *HP_clif_party_invite_pre;
+struct HPMHookPoint *HP_clif_party_invite_post;
+struct HPMHookPoint *HP_clif_party_inviteack_pre;
+struct HPMHookPoint *HP_clif_party_inviteack_post;
+struct HPMHookPoint *HP_clif_party_option_pre;
+struct HPMHookPoint *HP_clif_party_option_post;
+struct HPMHookPoint *HP_clif_party_withdraw_pre;
+struct HPMHookPoint *HP_clif_party_withdraw_post;
+struct HPMHookPoint *HP_clif_party_message_pre;
+struct HPMHookPoint *HP_clif_party_message_post;
+struct HPMHookPoint *HP_clif_party_xy_pre;
+struct HPMHookPoint *HP_clif_party_xy_post;
+struct HPMHookPoint *HP_clif_party_xy_single_pre;
+struct HPMHookPoint *HP_clif_party_xy_single_post;
+struct HPMHookPoint *HP_clif_party_hp_pre;
+struct HPMHookPoint *HP_clif_party_hp_post;
+struct HPMHookPoint *HP_clif_party_xy_remove_pre;
+struct HPMHookPoint *HP_clif_party_xy_remove_post;
+struct HPMHookPoint *HP_clif_party_show_picker_pre;
+struct HPMHookPoint *HP_clif_party_show_picker_post;
+struct HPMHookPoint *HP_clif_partyinvitationstate_pre;
+struct HPMHookPoint *HP_clif_partyinvitationstate_post;
+struct HPMHookPoint *HP_clif_guild_created_pre;
+struct HPMHookPoint *HP_clif_guild_created_post;
+struct HPMHookPoint *HP_clif_guild_belonginfo_pre;
+struct HPMHookPoint *HP_clif_guild_belonginfo_post;
+struct HPMHookPoint *HP_clif_guild_masterormember_pre;
+struct HPMHookPoint *HP_clif_guild_masterormember_post;
+struct HPMHookPoint *HP_clif_guild_basicinfo_pre;
+struct HPMHookPoint *HP_clif_guild_basicinfo_post;
+struct HPMHookPoint *HP_clif_guild_allianceinfo_pre;
+struct HPMHookPoint *HP_clif_guild_allianceinfo_post;
+struct HPMHookPoint *HP_clif_guild_memberlist_pre;
+struct HPMHookPoint *HP_clif_guild_memberlist_post;
+struct HPMHookPoint *HP_clif_guild_skillinfo_pre;
+struct HPMHookPoint *HP_clif_guild_skillinfo_post;
+struct HPMHookPoint *HP_clif_guild_send_onlineinfo_pre;
+struct HPMHookPoint *HP_clif_guild_send_onlineinfo_post;
+struct HPMHookPoint *HP_clif_guild_memberlogin_notice_pre;
+struct HPMHookPoint *HP_clif_guild_memberlogin_notice_post;
+struct HPMHookPoint *HP_clif_guild_invite_pre;
+struct HPMHookPoint *HP_clif_guild_invite_post;
+struct HPMHookPoint *HP_clif_guild_inviteack_pre;
+struct HPMHookPoint *HP_clif_guild_inviteack_post;
+struct HPMHookPoint *HP_clif_guild_leave_pre;
+struct HPMHookPoint *HP_clif_guild_leave_post;
+struct HPMHookPoint *HP_clif_guild_expulsion_pre;
+struct HPMHookPoint *HP_clif_guild_expulsion_post;
+struct HPMHookPoint *HP_clif_guild_positionchanged_pre;
+struct HPMHookPoint *HP_clif_guild_positionchanged_post;
+struct HPMHookPoint *HP_clif_guild_memberpositionchanged_pre;
+struct HPMHookPoint *HP_clif_guild_memberpositionchanged_post;
+struct HPMHookPoint *HP_clif_guild_emblem_pre;
+struct HPMHookPoint *HP_clif_guild_emblem_post;
+struct HPMHookPoint *HP_clif_guild_emblem_area_pre;
+struct HPMHookPoint *HP_clif_guild_emblem_area_post;
+struct HPMHookPoint *HP_clif_guild_notice_pre;
+struct HPMHookPoint *HP_clif_guild_notice_post;
+struct HPMHookPoint *HP_clif_guild_message_pre;
+struct HPMHookPoint *HP_clif_guild_message_post;
+struct HPMHookPoint *HP_clif_guild_skillup_pre;
+struct HPMHookPoint *HP_clif_guild_skillup_post;
+struct HPMHookPoint *HP_clif_guild_reqalliance_pre;
+struct HPMHookPoint *HP_clif_guild_reqalliance_post;
+struct HPMHookPoint *HP_clif_guild_allianceack_pre;
+struct HPMHookPoint *HP_clif_guild_allianceack_post;
+struct HPMHookPoint *HP_clif_guild_delalliance_pre;
+struct HPMHookPoint *HP_clif_guild_delalliance_post;
+struct HPMHookPoint *HP_clif_guild_oppositionack_pre;
+struct HPMHookPoint *HP_clif_guild_oppositionack_post;
+struct HPMHookPoint *HP_clif_guild_broken_pre;
+struct HPMHookPoint *HP_clif_guild_broken_post;
+struct HPMHookPoint *HP_clif_guild_xy_pre;
+struct HPMHookPoint *HP_clif_guild_xy_post;
+struct HPMHookPoint *HP_clif_guild_xy_single_pre;
+struct HPMHookPoint *HP_clif_guild_xy_single_post;
+struct HPMHookPoint *HP_clif_guild_xy_remove_pre;
+struct HPMHookPoint *HP_clif_guild_xy_remove_post;
+struct HPMHookPoint *HP_clif_guild_positionnamelist_pre;
+struct HPMHookPoint *HP_clif_guild_positionnamelist_post;
+struct HPMHookPoint *HP_clif_guild_positioninfolist_pre;
+struct HPMHookPoint *HP_clif_guild_positioninfolist_post;
+struct HPMHookPoint *HP_clif_guild_expulsionlist_pre;
+struct HPMHookPoint *HP_clif_guild_expulsionlist_post;
+struct HPMHookPoint *HP_clif_validate_emblem_pre;
+struct HPMHookPoint *HP_clif_validate_emblem_post;
+struct HPMHookPoint *HP_clif_bg_hp_pre;
+struct HPMHookPoint *HP_clif_bg_hp_post;
+struct HPMHookPoint *HP_clif_bg_xy_pre;
+struct HPMHookPoint *HP_clif_bg_xy_post;
+struct HPMHookPoint *HP_clif_bg_xy_remove_pre;
+struct HPMHookPoint *HP_clif_bg_xy_remove_post;
+struct HPMHookPoint *HP_clif_bg_message_pre;
+struct HPMHookPoint *HP_clif_bg_message_post;
+struct HPMHookPoint *HP_clif_bg_updatescore_pre;
+struct HPMHookPoint *HP_clif_bg_updatescore_post;
+struct HPMHookPoint *HP_clif_bg_updatescore_single_pre;
+struct HPMHookPoint *HP_clif_bg_updatescore_single_post;
+struct HPMHookPoint *HP_clif_sendbgemblem_area_pre;
+struct HPMHookPoint *HP_clif_sendbgemblem_area_post;
+struct HPMHookPoint *HP_clif_sendbgemblem_single_pre;
+struct HPMHookPoint *HP_clif_sendbgemblem_single_post;
+struct HPMHookPoint *HP_clif_instance_pre;
+struct HPMHookPoint *HP_clif_instance_post;
+struct HPMHookPoint *HP_clif_instance_join_pre;
+struct HPMHookPoint *HP_clif_instance_join_post;
+struct HPMHookPoint *HP_clif_instance_leave_pre;
+struct HPMHookPoint *HP_clif_instance_leave_post;
+struct HPMHookPoint *HP_clif_catch_process_pre;
+struct HPMHookPoint *HP_clif_catch_process_post;
+struct HPMHookPoint *HP_clif_pet_roulette_pre;
+struct HPMHookPoint *HP_clif_pet_roulette_post;
+struct HPMHookPoint *HP_clif_sendegg_pre;
+struct HPMHookPoint *HP_clif_sendegg_post;
+struct HPMHookPoint *HP_clif_send_petstatus_pre;
+struct HPMHookPoint *HP_clif_send_petstatus_post;
+struct HPMHookPoint *HP_clif_send_petdata_pre;
+struct HPMHookPoint *HP_clif_send_petdata_post;
+struct HPMHookPoint *HP_clif_pet_emotion_pre;
+struct HPMHookPoint *HP_clif_pet_emotion_post;
+struct HPMHookPoint *HP_clif_pet_food_pre;
+struct HPMHookPoint *HP_clif_pet_food_post;
+struct HPMHookPoint *HP_clif_friendslist_toggle_sub_pre;
+struct HPMHookPoint *HP_clif_friendslist_toggle_sub_post;
+struct HPMHookPoint *HP_clif_friendslist_send_pre;
+struct HPMHookPoint *HP_clif_friendslist_send_post;
+struct HPMHookPoint *HP_clif_friendslist_reqack_pre;
+struct HPMHookPoint *HP_clif_friendslist_reqack_post;
+struct HPMHookPoint *HP_clif_friendslist_toggle_pre;
+struct HPMHookPoint *HP_clif_friendslist_toggle_post;
+struct HPMHookPoint *HP_clif_friendlist_req_pre;
+struct HPMHookPoint *HP_clif_friendlist_req_post;
+struct HPMHookPoint *HP_clif_GM_kickack_pre;
+struct HPMHookPoint *HP_clif_GM_kickack_post;
+struct HPMHookPoint *HP_clif_GM_kick_pre;
+struct HPMHookPoint *HP_clif_GM_kick_post;
+struct HPMHookPoint *HP_clif_manner_message_pre;
+struct HPMHookPoint *HP_clif_manner_message_post;
+struct HPMHookPoint *HP_clif_GM_silence_pre;
+struct HPMHookPoint *HP_clif_GM_silence_post;
+struct HPMHookPoint *HP_clif_account_name_pre;
+struct HPMHookPoint *HP_clif_account_name_post;
+struct HPMHookPoint *HP_clif_check_pre;
+struct HPMHookPoint *HP_clif_check_post;
+struct HPMHookPoint *HP_clif_hominfo_pre;
+struct HPMHookPoint *HP_clif_hominfo_post;
+struct HPMHookPoint *HP_clif_homskillinfoblock_pre;
+struct HPMHookPoint *HP_clif_homskillinfoblock_post;
+struct HPMHookPoint *HP_clif_homskillup_pre;
+struct HPMHookPoint *HP_clif_homskillup_post;
+struct HPMHookPoint *HP_clif_hom_food_pre;
+struct HPMHookPoint *HP_clif_hom_food_post;
+struct HPMHookPoint *HP_clif_send_homdata_pre;
+struct HPMHookPoint *HP_clif_send_homdata_post;
+struct HPMHookPoint *HP_clif_quest_send_list_pre;
+struct HPMHookPoint *HP_clif_quest_send_list_post;
+struct HPMHookPoint *HP_clif_quest_send_mission_pre;
+struct HPMHookPoint *HP_clif_quest_send_mission_post;
+struct HPMHookPoint *HP_clif_quest_add_pre;
+struct HPMHookPoint *HP_clif_quest_add_post;
+struct HPMHookPoint *HP_clif_quest_delete_pre;
+struct HPMHookPoint *HP_clif_quest_delete_post;
+struct HPMHookPoint *HP_clif_quest_update_status_pre;
+struct HPMHookPoint *HP_clif_quest_update_status_post;
+struct HPMHookPoint *HP_clif_quest_update_objective_pre;
+struct HPMHookPoint *HP_clif_quest_update_objective_post;
+struct HPMHookPoint *HP_clif_quest_show_event_pre;
+struct HPMHookPoint *HP_clif_quest_show_event_post;
+struct HPMHookPoint *HP_clif_mail_window_pre;
+struct HPMHookPoint *HP_clif_mail_window_post;
+struct HPMHookPoint *HP_clif_mail_read_pre;
+struct HPMHookPoint *HP_clif_mail_read_post;
+struct HPMHookPoint *HP_clif_mail_delete_pre;
+struct HPMHookPoint *HP_clif_mail_delete_post;
+struct HPMHookPoint *HP_clif_mail_return_pre;
+struct HPMHookPoint *HP_clif_mail_return_post;
+struct HPMHookPoint *HP_clif_mail_send_pre;
+struct HPMHookPoint *HP_clif_mail_send_post;
+struct HPMHookPoint *HP_clif_mail_new_pre;
+struct HPMHookPoint *HP_clif_mail_new_post;
+struct HPMHookPoint *HP_clif_mail_refreshinbox_pre;
+struct HPMHookPoint *HP_clif_mail_refreshinbox_post;
+struct HPMHookPoint *HP_clif_mail_getattachment_pre;
+struct HPMHookPoint *HP_clif_mail_getattachment_post;
+struct HPMHookPoint *HP_clif_mail_setattachment_pre;
+struct HPMHookPoint *HP_clif_mail_setattachment_post;
+struct HPMHookPoint *HP_clif_auction_openwindow_pre;
+struct HPMHookPoint *HP_clif_auction_openwindow_post;
+struct HPMHookPoint *HP_clif_auction_results_pre;
+struct HPMHookPoint *HP_clif_auction_results_post;
+struct HPMHookPoint *HP_clif_auction_message_pre;
+struct HPMHookPoint *HP_clif_auction_message_post;
+struct HPMHookPoint *HP_clif_auction_close_pre;
+struct HPMHookPoint *HP_clif_auction_close_post;
+struct HPMHookPoint *HP_clif_auction_setitem_pre;
+struct HPMHookPoint *HP_clif_auction_setitem_post;
+struct HPMHookPoint *HP_clif_mercenary_info_pre;
+struct HPMHookPoint *HP_clif_mercenary_info_post;
+struct HPMHookPoint *HP_clif_mercenary_skillblock_pre;
+struct HPMHookPoint *HP_clif_mercenary_skillblock_post;
+struct HPMHookPoint *HP_clif_mercenary_message_pre;
+struct HPMHookPoint *HP_clif_mercenary_message_post;
+struct HPMHookPoint *HP_clif_mercenary_updatestatus_pre;
+struct HPMHookPoint *HP_clif_mercenary_updatestatus_post;
+struct HPMHookPoint *HP_clif_rental_time_pre;
+struct HPMHookPoint *HP_clif_rental_time_post;
+struct HPMHookPoint *HP_clif_rental_expired_pre;
+struct HPMHookPoint *HP_clif_rental_expired_post;
+struct HPMHookPoint *HP_clif_PartyBookingRegisterAck_pre;
+struct HPMHookPoint *HP_clif_PartyBookingRegisterAck_post;
+struct HPMHookPoint *HP_clif_PartyBookingDeleteAck_pre;
+struct HPMHookPoint *HP_clif_PartyBookingDeleteAck_post;
+struct HPMHookPoint *HP_clif_PartyBookingSearchAck_pre;
+struct HPMHookPoint *HP_clif_PartyBookingSearchAck_post;
+struct HPMHookPoint *HP_clif_PartyBookingUpdateNotify_pre;
+struct HPMHookPoint *HP_clif_PartyBookingUpdateNotify_post;
+struct HPMHookPoint *HP_clif_PartyBookingDeleteNotify_pre;
+struct HPMHookPoint *HP_clif_PartyBookingDeleteNotify_post;
+struct HPMHookPoint *HP_clif_PartyBookingInsertNotify_pre;
+struct HPMHookPoint *HP_clif_PartyBookingInsertNotify_post;
+struct HPMHookPoint *HP_clif_PartyRecruitRegisterAck_pre;
+struct HPMHookPoint *HP_clif_PartyRecruitRegisterAck_post;
+struct HPMHookPoint *HP_clif_PartyRecruitDeleteAck_pre;
+struct HPMHookPoint *HP_clif_PartyRecruitDeleteAck_post;
+struct HPMHookPoint *HP_clif_PartyRecruitSearchAck_pre;
+struct HPMHookPoint *HP_clif_PartyRecruitSearchAck_post;
+struct HPMHookPoint *HP_clif_PartyRecruitUpdateNotify_pre;
+struct HPMHookPoint *HP_clif_PartyRecruitUpdateNotify_post;
+struct HPMHookPoint *HP_clif_PartyRecruitDeleteNotify_pre;
+struct HPMHookPoint *HP_clif_PartyRecruitDeleteNotify_post;
+struct HPMHookPoint *HP_clif_PartyRecruitInsertNotify_pre;
+struct HPMHookPoint *HP_clif_PartyRecruitInsertNotify_post;
+struct HPMHookPoint *HP_clif_PartyBookingVolunteerInfo_pre;
+struct HPMHookPoint *HP_clif_PartyBookingVolunteerInfo_post;
+struct HPMHookPoint *HP_clif_PartyBookingRefuseVolunteer_pre;
+struct HPMHookPoint *HP_clif_PartyBookingRefuseVolunteer_post;
+struct HPMHookPoint *HP_clif_PartyBookingCancelVolunteer_pre;
+struct HPMHookPoint *HP_clif_PartyBookingCancelVolunteer_post;
+struct HPMHookPoint *HP_clif_PartyBookingAddFilteringList_pre;
+struct HPMHookPoint *HP_clif_PartyBookingAddFilteringList_post;
+struct HPMHookPoint *HP_clif_PartyBookingSubFilteringList_pre;
+struct HPMHookPoint *HP_clif_PartyBookingSubFilteringList_post;
+struct HPMHookPoint *HP_clif_buyingstore_open_pre;
+struct HPMHookPoint *HP_clif_buyingstore_open_post;
+struct HPMHookPoint *HP_clif_buyingstore_open_failed_pre;
+struct HPMHookPoint *HP_clif_buyingstore_open_failed_post;
+struct HPMHookPoint *HP_clif_buyingstore_myitemlist_pre;
+struct HPMHookPoint *HP_clif_buyingstore_myitemlist_post;
+struct HPMHookPoint *HP_clif_buyingstore_entry_pre;
+struct HPMHookPoint *HP_clif_buyingstore_entry_post;
+struct HPMHookPoint *HP_clif_buyingstore_entry_single_pre;
+struct HPMHookPoint *HP_clif_buyingstore_entry_single_post;
+struct HPMHookPoint *HP_clif_buyingstore_disappear_entry_pre;
+struct HPMHookPoint *HP_clif_buyingstore_disappear_entry_post;
+struct HPMHookPoint *HP_clif_buyingstore_disappear_entry_single_pre;
+struct HPMHookPoint *HP_clif_buyingstore_disappear_entry_single_post;
+struct HPMHookPoint *HP_clif_buyingstore_itemlist_pre;
+struct HPMHookPoint *HP_clif_buyingstore_itemlist_post;
+struct HPMHookPoint *HP_clif_buyingstore_trade_failed_buyer_pre;
+struct HPMHookPoint *HP_clif_buyingstore_trade_failed_buyer_post;
+struct HPMHookPoint *HP_clif_buyingstore_update_item_pre;
+struct HPMHookPoint *HP_clif_buyingstore_update_item_post;
+struct HPMHookPoint *HP_clif_buyingstore_delete_item_pre;
+struct HPMHookPoint *HP_clif_buyingstore_delete_item_post;
+struct HPMHookPoint *HP_clif_buyingstore_trade_failed_seller_pre;
+struct HPMHookPoint *HP_clif_buyingstore_trade_failed_seller_post;
+struct HPMHookPoint *HP_clif_search_store_info_ack_pre;
+struct HPMHookPoint *HP_clif_search_store_info_ack_post;
+struct HPMHookPoint *HP_clif_search_store_info_failed_pre;
+struct HPMHookPoint *HP_clif_search_store_info_failed_post;
+struct HPMHookPoint *HP_clif_open_search_store_info_pre;
+struct HPMHookPoint *HP_clif_open_search_store_info_post;
+struct HPMHookPoint *HP_clif_search_store_info_click_ack_pre;
+struct HPMHookPoint *HP_clif_search_store_info_click_ack_post;
+struct HPMHookPoint *HP_clif_elemental_info_pre;
+struct HPMHookPoint *HP_clif_elemental_info_post;
+struct HPMHookPoint *HP_clif_elemental_updatestatus_pre;
+struct HPMHookPoint *HP_clif_elemental_updatestatus_post;
+struct HPMHookPoint *HP_clif_bgqueue_ack_pre;
+struct HPMHookPoint *HP_clif_bgqueue_ack_post;
+struct HPMHookPoint *HP_clif_bgqueue_notice_delete_pre;
+struct HPMHookPoint *HP_clif_bgqueue_notice_delete_post;
+struct HPMHookPoint *HP_clif_bgqueue_update_info_pre;
+struct HPMHookPoint *HP_clif_bgqueue_update_info_post;
+struct HPMHookPoint *HP_clif_bgqueue_joined_pre;
+struct HPMHookPoint *HP_clif_bgqueue_joined_post;
+struct HPMHookPoint *HP_clif_bgqueue_pcleft_pre;
+struct HPMHookPoint *HP_clif_bgqueue_pcleft_post;
+struct HPMHookPoint *HP_clif_bgqueue_battlebegins_pre;
+struct HPMHookPoint *HP_clif_bgqueue_battlebegins_post;
+struct HPMHookPoint *HP_clif_adopt_reply_pre;
+struct HPMHookPoint *HP_clif_adopt_reply_post;
+struct HPMHookPoint *HP_clif_adopt_request_pre;
+struct HPMHookPoint *HP_clif_adopt_request_post;
+struct HPMHookPoint *HP_clif_readbook_pre;
+struct HPMHookPoint *HP_clif_readbook_post;
+struct HPMHookPoint *HP_clif_notify_time_pre;
+struct HPMHookPoint *HP_clif_notify_time_post;
+struct HPMHookPoint *HP_clif_user_count_pre;
+struct HPMHookPoint *HP_clif_user_count_post;
+struct HPMHookPoint *HP_clif_noask_sub_pre;
+struct HPMHookPoint *HP_clif_noask_sub_post;
+struct HPMHookPoint *HP_clif_bc_ready_pre;
+struct HPMHookPoint *HP_clif_bc_ready_post;
+struct HPMHookPoint *HP_clif_undisguise_timer_pre;
+struct HPMHookPoint *HP_clif_undisguise_timer_post;
+struct HPMHookPoint *HP_clif_chsys_create_pre;
+struct HPMHookPoint *HP_clif_chsys_create_post;
+struct HPMHookPoint *HP_clif_chsys_msg_pre;
+struct HPMHookPoint *HP_clif_chsys_msg_post;
+struct HPMHookPoint *HP_clif_chsys_msg2_pre;
+struct HPMHookPoint *HP_clif_chsys_msg2_post;
+struct HPMHookPoint *HP_clif_chsys_send_pre;
+struct HPMHookPoint *HP_clif_chsys_send_post;
+struct HPMHookPoint *HP_clif_chsys_join_pre;
+struct HPMHookPoint *HP_clif_chsys_join_post;
+struct HPMHookPoint *HP_clif_chsys_left_pre;
+struct HPMHookPoint *HP_clif_chsys_left_post;
+struct HPMHookPoint *HP_clif_chsys_delete_pre;
+struct HPMHookPoint *HP_clif_chsys_delete_post;
+struct HPMHookPoint *HP_clif_chsys_mjoin_pre;
+struct HPMHookPoint *HP_clif_chsys_mjoin_post;
+struct HPMHookPoint *HP_clif_chsys_quit_pre;
+struct HPMHookPoint *HP_clif_chsys_quit_post;
+struct HPMHookPoint *HP_clif_chsys_quitg_pre;
+struct HPMHookPoint *HP_clif_chsys_quitg_post;
+struct HPMHookPoint *HP_clif_chsys_gjoin_pre;
+struct HPMHookPoint *HP_clif_chsys_gjoin_post;
+struct HPMHookPoint *HP_clif_chsys_gleave_pre;
+struct HPMHookPoint *HP_clif_chsys_gleave_post;
+struct HPMHookPoint *HP_clif_pWantToConnection_pre;
+struct HPMHookPoint *HP_clif_pWantToConnection_post;
+struct HPMHookPoint *HP_clif_pLoadEndAck_pre;
+struct HPMHookPoint *HP_clif_pLoadEndAck_post;
+struct HPMHookPoint *HP_clif_pTickSend_pre;
+struct HPMHookPoint *HP_clif_pTickSend_post;
+struct HPMHookPoint *HP_clif_pHotkey_pre;
+struct HPMHookPoint *HP_clif_pHotkey_post;
+struct HPMHookPoint *HP_clif_pProgressbar_pre;
+struct HPMHookPoint *HP_clif_pProgressbar_post;
+struct HPMHookPoint *HP_clif_pWalkToXY_pre;
+struct HPMHookPoint *HP_clif_pWalkToXY_post;
+struct HPMHookPoint *HP_clif_pQuitGame_pre;
+struct HPMHookPoint *HP_clif_pQuitGame_post;
+struct HPMHookPoint *HP_clif_pGetCharNameRequest_pre;
+struct HPMHookPoint *HP_clif_pGetCharNameRequest_post;
+struct HPMHookPoint *HP_clif_pGlobalMessage_pre;
+struct HPMHookPoint *HP_clif_pGlobalMessage_post;
+struct HPMHookPoint *HP_clif_pMapMove_pre;
+struct HPMHookPoint *HP_clif_pMapMove_post;
+struct HPMHookPoint *HP_clif_pChangeDir_pre;
+struct HPMHookPoint *HP_clif_pChangeDir_post;
+struct HPMHookPoint *HP_clif_pEmotion_pre;
+struct HPMHookPoint *HP_clif_pEmotion_post;
+struct HPMHookPoint *HP_clif_pHowManyConnections_pre;
+struct HPMHookPoint *HP_clif_pHowManyConnections_post;
+struct HPMHookPoint *HP_clif_pActionRequest_pre;
+struct HPMHookPoint *HP_clif_pActionRequest_post;
+struct HPMHookPoint *HP_clif_pActionRequest_sub_pre;
+struct HPMHookPoint *HP_clif_pActionRequest_sub_post;
+struct HPMHookPoint *HP_clif_pRestart_pre;
+struct HPMHookPoint *HP_clif_pRestart_post;
+struct HPMHookPoint *HP_clif_pWisMessage_pre;
+struct HPMHookPoint *HP_clif_pWisMessage_post;
+struct HPMHookPoint *HP_clif_pBroadcast_pre;
+struct HPMHookPoint *HP_clif_pBroadcast_post;
+struct HPMHookPoint *HP_clif_pTakeItem_pre;
+struct HPMHookPoint *HP_clif_pTakeItem_post;
+struct HPMHookPoint *HP_clif_pDropItem_pre;
+struct HPMHookPoint *HP_clif_pDropItem_post;
+struct HPMHookPoint *HP_clif_pUseItem_pre;
+struct HPMHookPoint *HP_clif_pUseItem_post;
+struct HPMHookPoint *HP_clif_pEquipItem_pre;
+struct HPMHookPoint *HP_clif_pEquipItem_post;
+struct HPMHookPoint *HP_clif_pUnequipItem_pre;
+struct HPMHookPoint *HP_clif_pUnequipItem_post;
+struct HPMHookPoint *HP_clif_pNpcClicked_pre;
+struct HPMHookPoint *HP_clif_pNpcClicked_post;
+struct HPMHookPoint *HP_clif_pNpcBuySellSelected_pre;
+struct HPMHookPoint *HP_clif_pNpcBuySellSelected_post;
+struct HPMHookPoint *HP_clif_pNpcBuyListSend_pre;
+struct HPMHookPoint *HP_clif_pNpcBuyListSend_post;
+struct HPMHookPoint *HP_clif_pNpcSellListSend_pre;
+struct HPMHookPoint *HP_clif_pNpcSellListSend_post;
+struct HPMHookPoint *HP_clif_pCreateChatRoom_pre;
+struct HPMHookPoint *HP_clif_pCreateChatRoom_post;
+struct HPMHookPoint *HP_clif_pChatAddMember_pre;
+struct HPMHookPoint *HP_clif_pChatAddMember_post;
+struct HPMHookPoint *HP_clif_pChatRoomStatusChange_pre;
+struct HPMHookPoint *HP_clif_pChatRoomStatusChange_post;
+struct HPMHookPoint *HP_clif_pChangeChatOwner_pre;
+struct HPMHookPoint *HP_clif_pChangeChatOwner_post;
+struct HPMHookPoint *HP_clif_pKickFromChat_pre;
+struct HPMHookPoint *HP_clif_pKickFromChat_post;
+struct HPMHookPoint *HP_clif_pChatLeave_pre;
+struct HPMHookPoint *HP_clif_pChatLeave_post;
+struct HPMHookPoint *HP_clif_pTradeRequest_pre;
+struct HPMHookPoint *HP_clif_pTradeRequest_post;
+struct HPMHookPoint *HP_clif_chann_config_read_pre;
+struct HPMHookPoint *HP_clif_chann_config_read_post;
+struct HPMHookPoint *HP_clif_pTradeAck_pre;
+struct HPMHookPoint *HP_clif_pTradeAck_post;
+struct HPMHookPoint *HP_clif_pTradeAddItem_pre;
+struct HPMHookPoint *HP_clif_pTradeAddItem_post;
+struct HPMHookPoint *HP_clif_pTradeOk_pre;
+struct HPMHookPoint *HP_clif_pTradeOk_post;
+struct HPMHookPoint *HP_clif_pTradeCancel_pre;
+struct HPMHookPoint *HP_clif_pTradeCancel_post;
+struct HPMHookPoint *HP_clif_pTradeCommit_pre;
+struct HPMHookPoint *HP_clif_pTradeCommit_post;
+struct HPMHookPoint *HP_clif_pStopAttack_pre;
+struct HPMHookPoint *HP_clif_pStopAttack_post;
+struct HPMHookPoint *HP_clif_pPutItemToCart_pre;
+struct HPMHookPoint *HP_clif_pPutItemToCart_post;
+struct HPMHookPoint *HP_clif_pGetItemFromCart_pre;
+struct HPMHookPoint *HP_clif_pGetItemFromCart_post;
+struct HPMHookPoint *HP_clif_pRemoveOption_pre;
+struct HPMHookPoint *HP_clif_pRemoveOption_post;
+struct HPMHookPoint *HP_clif_pChangeCart_pre;
+struct HPMHookPoint *HP_clif_pChangeCart_post;
+struct HPMHookPoint *HP_clif_pStatusUp_pre;
+struct HPMHookPoint *HP_clif_pStatusUp_post;
+struct HPMHookPoint *HP_clif_pSkillUp_pre;
+struct HPMHookPoint *HP_clif_pSkillUp_post;
+struct HPMHookPoint *HP_clif_pUseSkillToId_pre;
+struct HPMHookPoint *HP_clif_pUseSkillToId_post;
+struct HPMHookPoint *HP_clif_pUseSkillToId_homun_pre;
+struct HPMHookPoint *HP_clif_pUseSkillToId_homun_post;
+struct HPMHookPoint *HP_clif_pUseSkillToId_mercenary_pre;
+struct HPMHookPoint *HP_clif_pUseSkillToId_mercenary_post;
+struct HPMHookPoint *HP_clif_pUseSkillToPos_pre;
+struct HPMHookPoint *HP_clif_pUseSkillToPos_post;
+struct HPMHookPoint *HP_clif_pUseSkillToPosSub_pre;
+struct HPMHookPoint *HP_clif_pUseSkillToPosSub_post;
+struct HPMHookPoint *HP_clif_pUseSkillToPos_homun_pre;
+struct HPMHookPoint *HP_clif_pUseSkillToPos_homun_post;
+struct HPMHookPoint *HP_clif_pUseSkillToPos_mercenary_pre;
+struct HPMHookPoint *HP_clif_pUseSkillToPos_mercenary_post;
+struct HPMHookPoint *HP_clif_pUseSkillToPosMoreInfo_pre;
+struct HPMHookPoint *HP_clif_pUseSkillToPosMoreInfo_post;
+struct HPMHookPoint *HP_clif_pUseSkillMap_pre;
+struct HPMHookPoint *HP_clif_pUseSkillMap_post;
+struct HPMHookPoint *HP_clif_pRequestMemo_pre;
+struct HPMHookPoint *HP_clif_pRequestMemo_post;
+struct HPMHookPoint *HP_clif_pProduceMix_pre;
+struct HPMHookPoint *HP_clif_pProduceMix_post;
+struct HPMHookPoint *HP_clif_pCooking_pre;
+struct HPMHookPoint *HP_clif_pCooking_post;
+struct HPMHookPoint *HP_clif_pRepairItem_pre;
+struct HPMHookPoint *HP_clif_pRepairItem_post;
+struct HPMHookPoint *HP_clif_pWeaponRefine_pre;
+struct HPMHookPoint *HP_clif_pWeaponRefine_post;
+struct HPMHookPoint *HP_clif_pNpcSelectMenu_pre;
+struct HPMHookPoint *HP_clif_pNpcSelectMenu_post;
+struct HPMHookPoint *HP_clif_pNpcNextClicked_pre;
+struct HPMHookPoint *HP_clif_pNpcNextClicked_post;
+struct HPMHookPoint *HP_clif_pNpcAmountInput_pre;
+struct HPMHookPoint *HP_clif_pNpcAmountInput_post;
+struct HPMHookPoint *HP_clif_pNpcStringInput_pre;
+struct HPMHookPoint *HP_clif_pNpcStringInput_post;
+struct HPMHookPoint *HP_clif_pNpcCloseClicked_pre;
+struct HPMHookPoint *HP_clif_pNpcCloseClicked_post;
+struct HPMHookPoint *HP_clif_pItemIdentify_pre;
+struct HPMHookPoint *HP_clif_pItemIdentify_post;
+struct HPMHookPoint *HP_clif_pSelectArrow_pre;
+struct HPMHookPoint *HP_clif_pSelectArrow_post;
+struct HPMHookPoint *HP_clif_pAutoSpell_pre;
+struct HPMHookPoint *HP_clif_pAutoSpell_post;
+struct HPMHookPoint *HP_clif_pUseCard_pre;
+struct HPMHookPoint *HP_clif_pUseCard_post;
+struct HPMHookPoint *HP_clif_pInsertCard_pre;
+struct HPMHookPoint *HP_clif_pInsertCard_post;
+struct HPMHookPoint *HP_clif_pSolveCharName_pre;
+struct HPMHookPoint *HP_clif_pSolveCharName_post;
+struct HPMHookPoint *HP_clif_pResetChar_pre;
+struct HPMHookPoint *HP_clif_pResetChar_post;
+struct HPMHookPoint *HP_clif_pLocalBroadcast_pre;
+struct HPMHookPoint *HP_clif_pLocalBroadcast_post;
+struct HPMHookPoint *HP_clif_pMoveToKafra_pre;
+struct HPMHookPoint *HP_clif_pMoveToKafra_post;
+struct HPMHookPoint *HP_clif_pMoveFromKafra_pre;
+struct HPMHookPoint *HP_clif_pMoveFromKafra_post;
+struct HPMHookPoint *HP_clif_pMoveToKafraFromCart_pre;
+struct HPMHookPoint *HP_clif_pMoveToKafraFromCart_post;
+struct HPMHookPoint *HP_clif_pMoveFromKafraToCart_pre;
+struct HPMHookPoint *HP_clif_pMoveFromKafraToCart_post;
+struct HPMHookPoint *HP_clif_pCloseKafra_pre;
+struct HPMHookPoint *HP_clif_pCloseKafra_post;
+struct HPMHookPoint *HP_clif_pStoragePassword_pre;
+struct HPMHookPoint *HP_clif_pStoragePassword_post;
+struct HPMHookPoint *HP_clif_pCreateParty_pre;
+struct HPMHookPoint *HP_clif_pCreateParty_post;
+struct HPMHookPoint *HP_clif_pCreateParty2_pre;
+struct HPMHookPoint *HP_clif_pCreateParty2_post;
+struct HPMHookPoint *HP_clif_pPartyInvite_pre;
+struct HPMHookPoint *HP_clif_pPartyInvite_post;
+struct HPMHookPoint *HP_clif_pPartyInvite2_pre;
+struct HPMHookPoint *HP_clif_pPartyInvite2_post;
+struct HPMHookPoint *HP_clif_pReplyPartyInvite_pre;
+struct HPMHookPoint *HP_clif_pReplyPartyInvite_post;
+struct HPMHookPoint *HP_clif_pReplyPartyInvite2_pre;
+struct HPMHookPoint *HP_clif_pReplyPartyInvite2_post;
+struct HPMHookPoint *HP_clif_pLeaveParty_pre;
+struct HPMHookPoint *HP_clif_pLeaveParty_post;
+struct HPMHookPoint *HP_clif_pRemovePartyMember_pre;
+struct HPMHookPoint *HP_clif_pRemovePartyMember_post;
+struct HPMHookPoint *HP_clif_pPartyChangeOption_pre;
+struct HPMHookPoint *HP_clif_pPartyChangeOption_post;
+struct HPMHookPoint *HP_clif_pPartyMessage_pre;
+struct HPMHookPoint *HP_clif_pPartyMessage_post;
+struct HPMHookPoint *HP_clif_pPartyChangeLeader_pre;
+struct HPMHookPoint *HP_clif_pPartyChangeLeader_post;
+struct HPMHookPoint *HP_clif_pPartyBookingRegisterReq_pre;
+struct HPMHookPoint *HP_clif_pPartyBookingRegisterReq_post;
+struct HPMHookPoint *HP_clif_pPartyBookingSearchReq_pre;
+struct HPMHookPoint *HP_clif_pPartyBookingSearchReq_post;
+struct HPMHookPoint *HP_clif_pPartyBookingDeleteReq_pre;
+struct HPMHookPoint *HP_clif_pPartyBookingDeleteReq_post;
+struct HPMHookPoint *HP_clif_pPartyBookingUpdateReq_pre;
+struct HPMHookPoint *HP_clif_pPartyBookingUpdateReq_post;
+struct HPMHookPoint *HP_clif_pPartyRecruitRegisterReq_pre;
+struct HPMHookPoint *HP_clif_pPartyRecruitRegisterReq_post;
+struct HPMHookPoint *HP_clif_pPartyRecruitSearchReq_pre;
+struct HPMHookPoint *HP_clif_pPartyRecruitSearchReq_post;
+struct HPMHookPoint *HP_clif_pPartyRecruitDeleteReq_pre;
+struct HPMHookPoint *HP_clif_pPartyRecruitDeleteReq_post;
+struct HPMHookPoint *HP_clif_pPartyRecruitUpdateReq_pre;
+struct HPMHookPoint *HP_clif_pPartyRecruitUpdateReq_post;
+struct HPMHookPoint *HP_clif_pCloseVending_pre;
+struct HPMHookPoint *HP_clif_pCloseVending_post;
+struct HPMHookPoint *HP_clif_pVendingListReq_pre;
+struct HPMHookPoint *HP_clif_pVendingListReq_post;
+struct HPMHookPoint *HP_clif_pPurchaseReq_pre;
+struct HPMHookPoint *HP_clif_pPurchaseReq_post;
+struct HPMHookPoint *HP_clif_pPurchaseReq2_pre;
+struct HPMHookPoint *HP_clif_pPurchaseReq2_post;
+struct HPMHookPoint *HP_clif_pOpenVending_pre;
+struct HPMHookPoint *HP_clif_pOpenVending_post;
+struct HPMHookPoint *HP_clif_pCreateGuild_pre;
+struct HPMHookPoint *HP_clif_pCreateGuild_post;
+struct HPMHookPoint *HP_clif_pGuildCheckMaster_pre;
+struct HPMHookPoint *HP_clif_pGuildCheckMaster_post;
+struct HPMHookPoint *HP_clif_pGuildRequestInfo_pre;
+struct HPMHookPoint *HP_clif_pGuildRequestInfo_post;
+struct HPMHookPoint *HP_clif_pGuildChangePositionInfo_pre;
+struct HPMHookPoint *HP_clif_pGuildChangePositionInfo_post;
+struct HPMHookPoint *HP_clif_pGuildChangeMemberPosition_pre;
+struct HPMHookPoint *HP_clif_pGuildChangeMemberPosition_post;
+struct HPMHookPoint *HP_clif_pGuildRequestEmblem_pre;
+struct HPMHookPoint *HP_clif_pGuildRequestEmblem_post;
+struct HPMHookPoint *HP_clif_pGuildChangeEmblem_pre;
+struct HPMHookPoint *HP_clif_pGuildChangeEmblem_post;
+struct HPMHookPoint *HP_clif_pGuildChangeNotice_pre;
+struct HPMHookPoint *HP_clif_pGuildChangeNotice_post;
+struct HPMHookPoint *HP_clif_pGuildInvite_pre;
+struct HPMHookPoint *HP_clif_pGuildInvite_post;
+struct HPMHookPoint *HP_clif_pGuildReplyInvite_pre;
+struct HPMHookPoint *HP_clif_pGuildReplyInvite_post;
+struct HPMHookPoint *HP_clif_pGuildLeave_pre;
+struct HPMHookPoint *HP_clif_pGuildLeave_post;
+struct HPMHookPoint *HP_clif_pGuildExpulsion_pre;
+struct HPMHookPoint *HP_clif_pGuildExpulsion_post;
+struct HPMHookPoint *HP_clif_pGuildMessage_pre;
+struct HPMHookPoint *HP_clif_pGuildMessage_post;
+struct HPMHookPoint *HP_clif_pGuildRequestAlliance_pre;
+struct HPMHookPoint *HP_clif_pGuildRequestAlliance_post;
+struct HPMHookPoint *HP_clif_pGuildReplyAlliance_pre;
+struct HPMHookPoint *HP_clif_pGuildReplyAlliance_post;
+struct HPMHookPoint *HP_clif_pGuildDelAlliance_pre;
+struct HPMHookPoint *HP_clif_pGuildDelAlliance_post;
+struct HPMHookPoint *HP_clif_pGuildOpposition_pre;
+struct HPMHookPoint *HP_clif_pGuildOpposition_post;
+struct HPMHookPoint *HP_clif_pGuildBreak_pre;
+struct HPMHookPoint *HP_clif_pGuildBreak_post;
+struct HPMHookPoint *HP_clif_pPetMenu_pre;
+struct HPMHookPoint *HP_clif_pPetMenu_post;
+struct HPMHookPoint *HP_clif_pCatchPet_pre;
+struct HPMHookPoint *HP_clif_pCatchPet_post;
+struct HPMHookPoint *HP_clif_pSelectEgg_pre;
+struct HPMHookPoint *HP_clif_pSelectEgg_post;
+struct HPMHookPoint *HP_clif_pSendEmotion_pre;
+struct HPMHookPoint *HP_clif_pSendEmotion_post;
+struct HPMHookPoint *HP_clif_pChangePetName_pre;
+struct HPMHookPoint *HP_clif_pChangePetName_post;
+struct HPMHookPoint *HP_clif_pGMKick_pre;
+struct HPMHookPoint *HP_clif_pGMKick_post;
+struct HPMHookPoint *HP_clif_pGMKickAll_pre;
+struct HPMHookPoint *HP_clif_pGMKickAll_post;
+struct HPMHookPoint *HP_clif_pGMShift_pre;
+struct HPMHookPoint *HP_clif_pGMShift_post;
+struct HPMHookPoint *HP_clif_pGMRemove2_pre;
+struct HPMHookPoint *HP_clif_pGMRemove2_post;
+struct HPMHookPoint *HP_clif_pGMRecall_pre;
+struct HPMHookPoint *HP_clif_pGMRecall_post;
+struct HPMHookPoint *HP_clif_pGMRecall2_pre;
+struct HPMHookPoint *HP_clif_pGMRecall2_post;
+struct HPMHookPoint *HP_clif_pGM_Monster_Item_pre;
+struct HPMHookPoint *HP_clif_pGM_Monster_Item_post;
+struct HPMHookPoint *HP_clif_pGMHide_pre;
+struct HPMHookPoint *HP_clif_pGMHide_post;
+struct HPMHookPoint *HP_clif_pGMReqNoChat_pre;
+struct HPMHookPoint *HP_clif_pGMReqNoChat_post;
+struct HPMHookPoint *HP_clif_pGMRc_pre;
+struct HPMHookPoint *HP_clif_pGMRc_post;
+struct HPMHookPoint *HP_clif_pGMReqAccountName_pre;
+struct HPMHookPoint *HP_clif_pGMReqAccountName_post;
+struct HPMHookPoint *HP_clif_pGMChangeMapType_pre;
+struct HPMHookPoint *HP_clif_pGMChangeMapType_post;
+struct HPMHookPoint *HP_clif_pPMIgnore_pre;
+struct HPMHookPoint *HP_clif_pPMIgnore_post;
+struct HPMHookPoint *HP_clif_pPMIgnoreAll_pre;
+struct HPMHookPoint *HP_clif_pPMIgnoreAll_post;
+struct HPMHookPoint *HP_clif_pPMIgnoreList_pre;
+struct HPMHookPoint *HP_clif_pPMIgnoreList_post;
+struct HPMHookPoint *HP_clif_pNoviceDoriDori_pre;
+struct HPMHookPoint *HP_clif_pNoviceDoriDori_post;
+struct HPMHookPoint *HP_clif_pNoviceExplosionSpirits_pre;
+struct HPMHookPoint *HP_clif_pNoviceExplosionSpirits_post;
+struct HPMHookPoint *HP_clif_pFriendsListAdd_pre;
+struct HPMHookPoint *HP_clif_pFriendsListAdd_post;
+struct HPMHookPoint *HP_clif_pFriendsListReply_pre;
+struct HPMHookPoint *HP_clif_pFriendsListReply_post;
+struct HPMHookPoint *HP_clif_pFriendsListRemove_pre;
+struct HPMHookPoint *HP_clif_pFriendsListRemove_post;
+struct HPMHookPoint *HP_clif_pPVPInfo_pre;
+struct HPMHookPoint *HP_clif_pPVPInfo_post;
+struct HPMHookPoint *HP_clif_pBlacksmith_pre;
+struct HPMHookPoint *HP_clif_pBlacksmith_post;
+struct HPMHookPoint *HP_clif_pAlchemist_pre;
+struct HPMHookPoint *HP_clif_pAlchemist_post;
+struct HPMHookPoint *HP_clif_pTaekwon_pre;
+struct HPMHookPoint *HP_clif_pTaekwon_post;
+struct HPMHookPoint *HP_clif_pRankingPk_pre;
+struct HPMHookPoint *HP_clif_pRankingPk_post;
+struct HPMHookPoint *HP_clif_pFeelSaveOk_pre;
+struct HPMHookPoint *HP_clif_pFeelSaveOk_post;
+struct HPMHookPoint *HP_clif_pChangeHomunculusName_pre;
+struct HPMHookPoint *HP_clif_pChangeHomunculusName_post;
+struct HPMHookPoint *HP_clif_pHomMoveToMaster_pre;
+struct HPMHookPoint *HP_clif_pHomMoveToMaster_post;
+struct HPMHookPoint *HP_clif_pHomMoveTo_pre;
+struct HPMHookPoint *HP_clif_pHomMoveTo_post;
+struct HPMHookPoint *HP_clif_pHomAttack_pre;
+struct HPMHookPoint *HP_clif_pHomAttack_post;
+struct HPMHookPoint *HP_clif_pHomMenu_pre;
+struct HPMHookPoint *HP_clif_pHomMenu_post;
+struct HPMHookPoint *HP_clif_pAutoRevive_pre;
+struct HPMHookPoint *HP_clif_pAutoRevive_post;
+struct HPMHookPoint *HP_clif_pCheck_pre;
+struct HPMHookPoint *HP_clif_pCheck_post;
+struct HPMHookPoint *HP_clif_pMail_refreshinbox_pre;
+struct HPMHookPoint *HP_clif_pMail_refreshinbox_post;
+struct HPMHookPoint *HP_clif_pMail_read_pre;
+struct HPMHookPoint *HP_clif_pMail_read_post;
+struct HPMHookPoint *HP_clif_pMail_getattach_pre;
+struct HPMHookPoint *HP_clif_pMail_getattach_post;
+struct HPMHookPoint *HP_clif_pMail_delete_pre;
+struct HPMHookPoint *HP_clif_pMail_delete_post;
+struct HPMHookPoint *HP_clif_pMail_return_pre;
+struct HPMHookPoint *HP_clif_pMail_return_post;
+struct HPMHookPoint *HP_clif_pMail_setattach_pre;
+struct HPMHookPoint *HP_clif_pMail_setattach_post;
+struct HPMHookPoint *HP_clif_pMail_winopen_pre;
+struct HPMHookPoint *HP_clif_pMail_winopen_post;
+struct HPMHookPoint *HP_clif_pMail_send_pre;
+struct HPMHookPoint *HP_clif_pMail_send_post;
+struct HPMHookPoint *HP_clif_pAuction_cancelreg_pre;
+struct HPMHookPoint *HP_clif_pAuction_cancelreg_post;
+struct HPMHookPoint *HP_clif_pAuction_setitem_pre;
+struct HPMHookPoint *HP_clif_pAuction_setitem_post;
+struct HPMHookPoint *HP_clif_pAuction_register_pre;
+struct HPMHookPoint *HP_clif_pAuction_register_post;
+struct HPMHookPoint *HP_clif_pAuction_cancel_pre;
+struct HPMHookPoint *HP_clif_pAuction_cancel_post;
+struct HPMHookPoint *HP_clif_pAuction_close_pre;
+struct HPMHookPoint *HP_clif_pAuction_close_post;
+struct HPMHookPoint *HP_clif_pAuction_bid_pre;
+struct HPMHookPoint *HP_clif_pAuction_bid_post;
+struct HPMHookPoint *HP_clif_pAuction_search_pre;
+struct HPMHookPoint *HP_clif_pAuction_search_post;
+struct HPMHookPoint *HP_clif_pAuction_buysell_pre;
+struct HPMHookPoint *HP_clif_pAuction_buysell_post;
+struct HPMHookPoint *HP_clif_pcashshop_buy_pre;
+struct HPMHookPoint *HP_clif_pcashshop_buy_post;
+struct HPMHookPoint *HP_clif_pAdopt_request_pre;
+struct HPMHookPoint *HP_clif_pAdopt_request_post;
+struct HPMHookPoint *HP_clif_pAdopt_reply_pre;
+struct HPMHookPoint *HP_clif_pAdopt_reply_post;
+struct HPMHookPoint *HP_clif_pViewPlayerEquip_pre;
+struct HPMHookPoint *HP_clif_pViewPlayerEquip_post;
+struct HPMHookPoint *HP_clif_pEquipTick_pre;
+struct HPMHookPoint *HP_clif_pEquipTick_post;
+struct HPMHookPoint *HP_clif_pquestStateAck_pre;
+struct HPMHookPoint *HP_clif_pquestStateAck_post;
+struct HPMHookPoint *HP_clif_pmercenary_action_pre;
+struct HPMHookPoint *HP_clif_pmercenary_action_post;
+struct HPMHookPoint *HP_clif_pBattleChat_pre;
+struct HPMHookPoint *HP_clif_pBattleChat_post;
+struct HPMHookPoint *HP_clif_pLessEffect_pre;
+struct HPMHookPoint *HP_clif_pLessEffect_post;
+struct HPMHookPoint *HP_clif_pItemListWindowSelected_pre;
+struct HPMHookPoint *HP_clif_pItemListWindowSelected_post;
+struct HPMHookPoint *HP_clif_pReqOpenBuyingStore_pre;
+struct HPMHookPoint *HP_clif_pReqOpenBuyingStore_post;
+struct HPMHookPoint *HP_clif_pReqCloseBuyingStore_pre;
+struct HPMHookPoint *HP_clif_pReqCloseBuyingStore_post;
+struct HPMHookPoint *HP_clif_pReqClickBuyingStore_pre;
+struct HPMHookPoint *HP_clif_pReqClickBuyingStore_post;
+struct HPMHookPoint *HP_clif_pReqTradeBuyingStore_pre;
+struct HPMHookPoint *HP_clif_pReqTradeBuyingStore_post;
+struct HPMHookPoint *HP_clif_pSearchStoreInfo_pre;
+struct HPMHookPoint *HP_clif_pSearchStoreInfo_post;
+struct HPMHookPoint *HP_clif_pSearchStoreInfoNextPage_pre;
+struct HPMHookPoint *HP_clif_pSearchStoreInfoNextPage_post;
+struct HPMHookPoint *HP_clif_pCloseSearchStoreInfo_pre;
+struct HPMHookPoint *HP_clif_pCloseSearchStoreInfo_post;
+struct HPMHookPoint *HP_clif_pSearchStoreInfoListItemClick_pre;
+struct HPMHookPoint *HP_clif_pSearchStoreInfoListItemClick_post;
+struct HPMHookPoint *HP_clif_pDebug_pre;
+struct HPMHookPoint *HP_clif_pDebug_post;
+struct HPMHookPoint *HP_clif_pSkillSelectMenu_pre;
+struct HPMHookPoint *HP_clif_pSkillSelectMenu_post;
+struct HPMHookPoint *HP_clif_pMoveItem_pre;
+struct HPMHookPoint *HP_clif_pMoveItem_post;
+struct HPMHookPoint *HP_clif_pDull_pre;
+struct HPMHookPoint *HP_clif_pDull_post;
+struct HPMHookPoint *HP_clif_pBGQueueRegister_pre;
+struct HPMHookPoint *HP_clif_pBGQueueRegister_post;
+struct HPMHookPoint *HP_clif_pBGQueueCheckState_pre;
+struct HPMHookPoint *HP_clif_pBGQueueCheckState_post;
+struct HPMHookPoint *HP_clif_pBGQueueRevokeReq_pre;
+struct HPMHookPoint *HP_clif_pBGQueueRevokeReq_post;
+struct HPMHookPoint *HP_clif_pBGQueueBattleBeginAck_pre;
+struct HPMHookPoint *HP_clif_pBGQueueBattleBeginAck_post;
+struct HPMHookPoint *HP_clif_pCashShopOpen_pre;
+struct HPMHookPoint *HP_clif_pCashShopOpen_post;
+struct HPMHookPoint *HP_clif_pCashShopClose_pre;
+struct HPMHookPoint *HP_clif_pCashShopClose_post;
+struct HPMHookPoint *HP_clif_pCashShopReqTab_pre;
+struct HPMHookPoint *HP_clif_pCashShopReqTab_post;
+struct HPMHookPoint *HP_clif_pCashShopSchedule_pre;
+struct HPMHookPoint *HP_clif_pCashShopSchedule_post;
+struct HPMHookPoint *HP_clif_pCashShopBuy_pre;
+struct HPMHookPoint *HP_clif_pCashShopBuy_post;
+struct HPMHookPoint *HP_clif_pPartyTick_pre;
+struct HPMHookPoint *HP_clif_pPartyTick_post;
+struct HPMHookPoint *HP_clif_pGuildInvite2_pre;
+struct HPMHookPoint *HP_clif_pGuildInvite2_post;
+struct HPMHookPoint *HP_clif_pPartyBookingAddFilter_pre;
+struct HPMHookPoint *HP_clif_pPartyBookingAddFilter_post;
+struct HPMHookPoint *HP_clif_pPartyBookingSubFilter_pre;
+struct HPMHookPoint *HP_clif_pPartyBookingSubFilter_post;
+struct HPMHookPoint *HP_clif_pPartyBookingReqVolunteer_pre;
+struct HPMHookPoint *HP_clif_pPartyBookingReqVolunteer_post;
+struct HPMHookPoint *HP_clif_pPartyBookingRefuseVolunteer_pre;
+struct HPMHookPoint *HP_clif_pPartyBookingRefuseVolunteer_post;
+struct HPMHookPoint *HP_clif_pPartyBookingCancelVolunteer_pre;
+struct HPMHookPoint *HP_clif_pPartyBookingCancelVolunteer_post;
+struct HPMHookPoint *HP_duel_create_pre;
+struct HPMHookPoint *HP_duel_create_post;
+struct HPMHookPoint *HP_duel_invite_pre;
+struct HPMHookPoint *HP_duel_invite_post;
+struct HPMHookPoint *HP_duel_accept_pre;
+struct HPMHookPoint *HP_duel_accept_post;
+struct HPMHookPoint *HP_duel_reject_pre;
+struct HPMHookPoint *HP_duel_reject_post;
+struct HPMHookPoint *HP_duel_leave_pre;
+struct HPMHookPoint *HP_duel_leave_post;
+struct HPMHookPoint *HP_duel_showinfo_pre;
+struct HPMHookPoint *HP_duel_showinfo_post;
+struct HPMHookPoint *HP_duel_checktime_pre;
+struct HPMHookPoint *HP_duel_checktime_post;
+struct HPMHookPoint *HP_duel_init_pre;
+struct HPMHookPoint *HP_duel_init_post;
+struct HPMHookPoint *HP_duel_final_pre;
+struct HPMHookPoint *HP_duel_final_post;
+struct HPMHookPoint *HP_elemental_init_pre;
+struct HPMHookPoint *HP_elemental_init_post;
+struct HPMHookPoint *HP_elemental_final_pre;
+struct HPMHookPoint *HP_elemental_final_post;
+struct HPMHookPoint *HP_elemental_class_pre;
+struct HPMHookPoint *HP_elemental_class_post;
+struct HPMHookPoint *HP_elemental_get_viewdata_pre;
+struct HPMHookPoint *HP_elemental_get_viewdata_post;
+struct HPMHookPoint *HP_elemental_create_pre;
+struct HPMHookPoint *HP_elemental_create_post;
+struct HPMHookPoint *HP_elemental_data_received_pre;
+struct HPMHookPoint *HP_elemental_data_received_post;
+struct HPMHookPoint *HP_elemental_save_pre;
+struct HPMHookPoint *HP_elemental_save_post;
+struct HPMHookPoint *HP_elemental_change_mode_ack_pre;
+struct HPMHookPoint *HP_elemental_change_mode_ack_post;
+struct HPMHookPoint *HP_elemental_change_mode_pre;
+struct HPMHookPoint *HP_elemental_change_mode_post;
+struct HPMHookPoint *HP_elemental_heal_pre;
+struct HPMHookPoint *HP_elemental_heal_post;
+struct HPMHookPoint *HP_elemental_dead_pre;
+struct HPMHookPoint *HP_elemental_dead_post;
+struct HPMHookPoint *HP_elemental_delete_pre;
+struct HPMHookPoint *HP_elemental_delete_post;
+struct HPMHookPoint *HP_elemental_summon_stop_pre;
+struct HPMHookPoint *HP_elemental_summon_stop_post;
+struct HPMHookPoint *HP_elemental_get_lifetime_pre;
+struct HPMHookPoint *HP_elemental_get_lifetime_post;
+struct HPMHookPoint *HP_elemental_unlocktarget_pre;
+struct HPMHookPoint *HP_elemental_unlocktarget_post;
+struct HPMHookPoint *HP_elemental_skillnotok_pre;
+struct HPMHookPoint *HP_elemental_skillnotok_post;
+struct HPMHookPoint *HP_elemental_set_target_pre;
+struct HPMHookPoint *HP_elemental_set_target_post;
+struct HPMHookPoint *HP_elemental_clean_single_effect_pre;
+struct HPMHookPoint *HP_elemental_clean_single_effect_post;
+struct HPMHookPoint *HP_elemental_clean_effect_pre;
+struct HPMHookPoint *HP_elemental_clean_effect_post;
+struct HPMHookPoint *HP_elemental_action_pre;
+struct HPMHookPoint *HP_elemental_action_post;
+struct HPMHookPoint *HP_elemental_skill_get_requirements_pre;
+struct HPMHookPoint *HP_elemental_skill_get_requirements_post;
+struct HPMHookPoint *HP_elemental_read_skilldb_pre;
+struct HPMHookPoint *HP_elemental_read_skilldb_post;
+struct HPMHookPoint *HP_elemental_reload_db_pre;
+struct HPMHookPoint *HP_elemental_reload_db_post;
+struct HPMHookPoint *HP_elemental_reload_skilldb_pre;
+struct HPMHookPoint *HP_elemental_reload_skilldb_post;
+struct HPMHookPoint *HP_elemental_search_index_pre;
+struct HPMHookPoint *HP_elemental_search_index_post;
+struct HPMHookPoint *HP_elemental_summon_init_pre;
+struct HPMHookPoint *HP_elemental_summon_init_post;
+struct HPMHookPoint *HP_elemental_summon_end_timer_pre;
+struct HPMHookPoint *HP_elemental_summon_end_timer_post;
+struct HPMHookPoint *HP_elemental_ai_sub_timer_activesearch_pre;
+struct HPMHookPoint *HP_elemental_ai_sub_timer_activesearch_post;
+struct HPMHookPoint *HP_elemental_ai_sub_timer_pre;
+struct HPMHookPoint *HP_elemental_ai_sub_timer_post;
+struct HPMHookPoint *HP_elemental_ai_sub_foreachclient_pre;
+struct HPMHookPoint *HP_elemental_ai_sub_foreachclient_post;
+struct HPMHookPoint *HP_elemental_ai_timer_pre;
+struct HPMHookPoint *HP_elemental_ai_timer_post;
+struct HPMHookPoint *HP_elemental_read_db_pre;
+struct HPMHookPoint *HP_elemental_read_db_post;
+struct HPMHookPoint *HP_guild_init_pre;
+struct HPMHookPoint *HP_guild_init_post;
+struct HPMHookPoint *HP_guild_final_pre;
+struct HPMHookPoint *HP_guild_final_post;
+struct HPMHookPoint *HP_guild_skill_get_max_pre;
+struct HPMHookPoint *HP_guild_skill_get_max_post;
+struct HPMHookPoint *HP_guild_checkskill_pre;
+struct HPMHookPoint *HP_guild_checkskill_post;
+struct HPMHookPoint *HP_guild_check_skill_require_pre;
+struct HPMHookPoint *HP_guild_check_skill_require_post;
+struct HPMHookPoint *HP_guild_checkcastles_pre;
+struct HPMHookPoint *HP_guild_checkcastles_post;
+struct HPMHookPoint *HP_guild_isallied_pre;
+struct HPMHookPoint *HP_guild_isallied_post;
+struct HPMHookPoint *HP_guild_search_pre;
+struct HPMHookPoint *HP_guild_search_post;
+struct HPMHookPoint *HP_guild_searchname_pre;
+struct HPMHookPoint *HP_guild_searchname_post;
+struct HPMHookPoint *HP_guild_castle_search_pre;
+struct HPMHookPoint *HP_guild_castle_search_post;
+struct HPMHookPoint *HP_guild_mapname2gc_pre;
+struct HPMHookPoint *HP_guild_mapname2gc_post;
+struct HPMHookPoint *HP_guild_mapindex2gc_pre;
+struct HPMHookPoint *HP_guild_mapindex2gc_post;
+struct HPMHookPoint *HP_guild_getavailablesd_pre;
+struct HPMHookPoint *HP_guild_getavailablesd_post;
+struct HPMHookPoint *HP_guild_getindex_pre;
+struct HPMHookPoint *HP_guild_getindex_post;
+struct HPMHookPoint *HP_guild_getposition_pre;
+struct HPMHookPoint *HP_guild_getposition_post;
+struct HPMHookPoint *HP_guild_payexp_pre;
+struct HPMHookPoint *HP_guild_payexp_post;
+struct HPMHookPoint *HP_guild_getexp_pre;
+struct HPMHookPoint *HP_guild_getexp_post;
+struct HPMHookPoint *HP_guild_create_pre;
+struct HPMHookPoint *HP_guild_create_post;
+struct HPMHookPoint *HP_guild_created_pre;
+struct HPMHookPoint *HP_guild_created_post;
+struct HPMHookPoint *HP_guild_request_info_pre;
+struct HPMHookPoint *HP_guild_request_info_post;
+struct HPMHookPoint *HP_guild_recv_noinfo_pre;
+struct HPMHookPoint *HP_guild_recv_noinfo_post;
+struct HPMHookPoint *HP_guild_recv_info_pre;
+struct HPMHookPoint *HP_guild_recv_info_post;
+struct HPMHookPoint *HP_guild_npc_request_info_pre;
+struct HPMHookPoint *HP_guild_npc_request_info_post;
+struct HPMHookPoint *HP_guild_invite_pre;
+struct HPMHookPoint *HP_guild_invite_post;
+struct HPMHookPoint *HP_guild_reply_invite_pre;
+struct HPMHookPoint *HP_guild_reply_invite_post;
+struct HPMHookPoint *HP_guild_member_joined_pre;
+struct HPMHookPoint *HP_guild_member_joined_post;
+struct HPMHookPoint *HP_guild_member_added_pre;
+struct HPMHookPoint *HP_guild_member_added_post;
+struct HPMHookPoint *HP_guild_leave_pre;
+struct HPMHookPoint *HP_guild_leave_post;
+struct HPMHookPoint *HP_guild_member_withdraw_pre;
+struct HPMHookPoint *HP_guild_member_withdraw_post;
+struct HPMHookPoint *HP_guild_expulsion_pre;
+struct HPMHookPoint *HP_guild_expulsion_post;
+struct HPMHookPoint *HP_guild_skillup_pre;
+struct HPMHookPoint *HP_guild_skillup_post;
+struct HPMHookPoint *HP_guild_block_skill_pre;
+struct HPMHookPoint *HP_guild_block_skill_post;
+struct HPMHookPoint *HP_guild_reqalliance_pre;
+struct HPMHookPoint *HP_guild_reqalliance_post;
+struct HPMHookPoint *HP_guild_reply_reqalliance_pre;
+struct HPMHookPoint *HP_guild_reply_reqalliance_post;
+struct HPMHookPoint *HP_guild_allianceack_pre;
+struct HPMHookPoint *HP_guild_allianceack_post;
+struct HPMHookPoint *HP_guild_delalliance_pre;
+struct HPMHookPoint *HP_guild_delalliance_post;
+struct HPMHookPoint *HP_guild_opposition_pre;
+struct HPMHookPoint *HP_guild_opposition_post;
+struct HPMHookPoint *HP_guild_check_alliance_pre;
+struct HPMHookPoint *HP_guild_check_alliance_post;
+struct HPMHookPoint *HP_guild_send_memberinfoshort_pre;
+struct HPMHookPoint *HP_guild_send_memberinfoshort_post;
+struct HPMHookPoint *HP_guild_recv_memberinfoshort_pre;
+struct HPMHookPoint *HP_guild_recv_memberinfoshort_post;
+struct HPMHookPoint *HP_guild_change_memberposition_pre;
+struct HPMHookPoint *HP_guild_change_memberposition_post;
+struct HPMHookPoint *HP_guild_memberposition_changed_pre;
+struct HPMHookPoint *HP_guild_memberposition_changed_post;
+struct HPMHookPoint *HP_guild_change_position_pre;
+struct HPMHookPoint *HP_guild_change_position_post;
+struct HPMHookPoint *HP_guild_position_changed_pre;
+struct HPMHookPoint *HP_guild_position_changed_post;
+struct HPMHookPoint *HP_guild_change_notice_pre;
+struct HPMHookPoint *HP_guild_change_notice_post;
+struct HPMHookPoint *HP_guild_notice_changed_pre;
+struct HPMHookPoint *HP_guild_notice_changed_post;
+struct HPMHookPoint *HP_guild_change_emblem_pre;
+struct HPMHookPoint *HP_guild_change_emblem_post;
+struct HPMHookPoint *HP_guild_emblem_changed_pre;
+struct HPMHookPoint *HP_guild_emblem_changed_post;
+struct HPMHookPoint *HP_guild_send_message_pre;
+struct HPMHookPoint *HP_guild_send_message_post;
+struct HPMHookPoint *HP_guild_recv_message_pre;
+struct HPMHookPoint *HP_guild_recv_message_post;
+struct HPMHookPoint *HP_guild_send_dot_remove_pre;
+struct HPMHookPoint *HP_guild_send_dot_remove_post;
+struct HPMHookPoint *HP_guild_skillupack_pre;
+struct HPMHookPoint *HP_guild_skillupack_post;
+struct HPMHookPoint *HP_guild_dobreak_pre;
+struct HPMHookPoint *HP_guild_dobreak_post;
+struct HPMHookPoint *HP_guild_broken_pre;
+struct HPMHookPoint *HP_guild_broken_post;
+struct HPMHookPoint *HP_guild_gm_change_pre;
+struct HPMHookPoint *HP_guild_gm_change_post;
+struct HPMHookPoint *HP_guild_gm_changed_pre;
+struct HPMHookPoint *HP_guild_gm_changed_post;
+struct HPMHookPoint *HP_guild_castle_map_init_pre;
+struct HPMHookPoint *HP_guild_castle_map_init_post;
+struct HPMHookPoint *HP_guild_castledatasave_pre;
+struct HPMHookPoint *HP_guild_castledatasave_post;
+struct HPMHookPoint *HP_guild_castledataloadack_pre;
+struct HPMHookPoint *HP_guild_castledataloadack_post;
+struct HPMHookPoint *HP_guild_castle_reconnect_pre;
+struct HPMHookPoint *HP_guild_castle_reconnect_post;
+struct HPMHookPoint *HP_guild_agit_start_pre;
+struct HPMHookPoint *HP_guild_agit_start_post;
+struct HPMHookPoint *HP_guild_agit_end_pre;
+struct HPMHookPoint *HP_guild_agit_end_post;
+struct HPMHookPoint *HP_guild_agit2_start_pre;
+struct HPMHookPoint *HP_guild_agit2_start_post;
+struct HPMHookPoint *HP_guild_agit2_end_pre;
+struct HPMHookPoint *HP_guild_agit2_end_post;
+struct HPMHookPoint *HP_guild_flag_add_pre;
+struct HPMHookPoint *HP_guild_flag_add_post;
+struct HPMHookPoint *HP_guild_flag_remove_pre;
+struct HPMHookPoint *HP_guild_flag_remove_post;
+struct HPMHookPoint *HP_guild_flags_clear_pre;
+struct HPMHookPoint *HP_guild_flags_clear_post;
+struct HPMHookPoint *HP_guild_aura_refresh_pre;
+struct HPMHookPoint *HP_guild_aura_refresh_post;
+struct HPMHookPoint *HP_guild_payexp_timer_pre;
+struct HPMHookPoint *HP_guild_payexp_timer_post;
+struct HPMHookPoint *HP_guild_sd_check_pre;
+struct HPMHookPoint *HP_guild_sd_check_post;
+struct HPMHookPoint *HP_guild_read_guildskill_tree_db_pre;
+struct HPMHookPoint *HP_guild_read_guildskill_tree_db_post;
+struct HPMHookPoint *HP_guild_read_castledb_pre;
+struct HPMHookPoint *HP_guild_read_castledb_post;
+struct HPMHookPoint *HP_guild_payexp_timer_sub_pre;
+struct HPMHookPoint *HP_guild_payexp_timer_sub_post;
+struct HPMHookPoint *HP_guild_send_xy_timer_sub_pre;
+struct HPMHookPoint *HP_guild_send_xy_timer_sub_post;
+struct HPMHookPoint *HP_guild_send_xy_timer_pre;
+struct HPMHookPoint *HP_guild_send_xy_timer_post;
+struct HPMHookPoint *HP_guild_create_expcache_pre;
+struct HPMHookPoint *HP_guild_create_expcache_post;
+struct HPMHookPoint *HP_guild_eventlist_db_final_pre;
+struct HPMHookPoint *HP_guild_eventlist_db_final_post;
+struct HPMHookPoint *HP_guild_expcache_db_final_pre;
+struct HPMHookPoint *HP_guild_expcache_db_final_post;
+struct HPMHookPoint *HP_guild_castle_db_final_pre;
+struct HPMHookPoint *HP_guild_castle_db_final_post;
+struct HPMHookPoint *HP_guild_broken_sub_pre;
+struct HPMHookPoint *HP_guild_broken_sub_post;
+struct HPMHookPoint *HP_guild_castle_broken_sub_pre;
+struct HPMHookPoint *HP_guild_castle_broken_sub_post;
+struct HPMHookPoint *HP_guild_makemember_pre;
+struct HPMHookPoint *HP_guild_makemember_post;
+struct HPMHookPoint *HP_guild_check_member_pre;
+struct HPMHookPoint *HP_guild_check_member_post;
+struct HPMHookPoint *HP_guild_get_alliance_count_pre;
+struct HPMHookPoint *HP_guild_get_alliance_count_post;
+struct HPMHookPoint *HP_guild_castle_reconnect_sub_pre;
+struct HPMHookPoint *HP_guild_castle_reconnect_sub_post;
+struct HPMHookPoint *HP_gstorage_id2storage_pre;
+struct HPMHookPoint *HP_gstorage_id2storage_post;
+struct HPMHookPoint *HP_gstorage_id2storage2_pre;
+struct HPMHookPoint *HP_gstorage_id2storage2_post;
+struct HPMHookPoint *HP_gstorage_init_pre;
+struct HPMHookPoint *HP_gstorage_init_post;
+struct HPMHookPoint *HP_gstorage_final_pre;
+struct HPMHookPoint *HP_gstorage_final_post;
+struct HPMHookPoint *HP_gstorage_delete_pre;
+struct HPMHookPoint *HP_gstorage_delete_post;
+struct HPMHookPoint *HP_gstorage_open_pre;
+struct HPMHookPoint *HP_gstorage_open_post;
+struct HPMHookPoint *HP_gstorage_additem_pre;
+struct HPMHookPoint *HP_gstorage_additem_post;
+struct HPMHookPoint *HP_gstorage_delitem_pre;
+struct HPMHookPoint *HP_gstorage_delitem_post;
+struct HPMHookPoint *HP_gstorage_add_pre;
+struct HPMHookPoint *HP_gstorage_add_post;
+struct HPMHookPoint *HP_gstorage_get_pre;
+struct HPMHookPoint *HP_gstorage_get_post;
+struct HPMHookPoint *HP_gstorage_addfromcart_pre;
+struct HPMHookPoint *HP_gstorage_addfromcart_post;
+struct HPMHookPoint *HP_gstorage_gettocart_pre;
+struct HPMHookPoint *HP_gstorage_gettocart_post;
+struct HPMHookPoint *HP_gstorage_close_pre;
+struct HPMHookPoint *HP_gstorage_close_post;
+struct HPMHookPoint *HP_gstorage_pc_quit_pre;
+struct HPMHookPoint *HP_gstorage_pc_quit_post;
+struct HPMHookPoint *HP_gstorage_save_pre;
+struct HPMHookPoint *HP_gstorage_save_post;
+struct HPMHookPoint *HP_gstorage_saved_pre;
+struct HPMHookPoint *HP_gstorage_saved_post;
+struct HPMHookPoint *HP_gstorage_create_pre;
+struct HPMHookPoint *HP_gstorage_create_post;
+struct HPMHookPoint *HP_homun_init_pre;
+struct HPMHookPoint *HP_homun_init_post;
+struct HPMHookPoint *HP_homun_final_pre;
+struct HPMHookPoint *HP_homun_final_post;
+struct HPMHookPoint *HP_homun_reload_pre;
+struct HPMHookPoint *HP_homun_reload_post;
+struct HPMHookPoint *HP_homun_reload_skill_pre;
+struct HPMHookPoint *HP_homun_reload_skill_post;
+struct HPMHookPoint *HP_homun_get_viewdata_pre;
+struct HPMHookPoint *HP_homun_get_viewdata_post;
+struct HPMHookPoint *HP_homun_class2type_pre;
+struct HPMHookPoint *HP_homun_class2type_post;
+struct HPMHookPoint *HP_homun_damaged_pre;
+struct HPMHookPoint *HP_homun_damaged_post;
+struct HPMHookPoint *HP_homun_dead_pre;
+struct HPMHookPoint *HP_homun_dead_post;
+struct HPMHookPoint *HP_homun_vaporize_pre;
+struct HPMHookPoint *HP_homun_vaporize_post;
+struct HPMHookPoint *HP_homun_delete_pre;
+struct HPMHookPoint *HP_homun_delete_post;
+struct HPMHookPoint *HP_homun_checkskill_pre;
+struct HPMHookPoint *HP_homun_checkskill_post;
+struct HPMHookPoint *HP_homun_calc_skilltree_pre;
+struct HPMHookPoint *HP_homun_calc_skilltree_post;
+struct HPMHookPoint *HP_homun_skill_tree_get_max_pre;
+struct HPMHookPoint *HP_homun_skill_tree_get_max_post;
+struct HPMHookPoint *HP_homun_skillup_pre;
+struct HPMHookPoint *HP_homun_skillup_post;
+struct HPMHookPoint *HP_homun_levelup_pre;
+struct HPMHookPoint *HP_homun_levelup_post;
+struct HPMHookPoint *HP_homun_change_class_pre;
+struct HPMHookPoint *HP_homun_change_class_post;
+struct HPMHookPoint *HP_homun_evolve_pre;
+struct HPMHookPoint *HP_homun_evolve_post;
+struct HPMHookPoint *HP_homun_mutate_pre;
+struct HPMHookPoint *HP_homun_mutate_post;
+struct HPMHookPoint *HP_homun_gainexp_pre;
+struct HPMHookPoint *HP_homun_gainexp_post;
+struct HPMHookPoint *HP_homun_add_intimacy_pre;
+struct HPMHookPoint *HP_homun_add_intimacy_post;
+struct HPMHookPoint *HP_homun_consume_intimacy_pre;
+struct HPMHookPoint *HP_homun_consume_intimacy_post;
+struct HPMHookPoint *HP_homun_healed_pre;
+struct HPMHookPoint *HP_homun_healed_post;
+struct HPMHookPoint *HP_homun_save_pre;
+struct HPMHookPoint *HP_homun_save_post;
+struct HPMHookPoint *HP_homun_menu_pre;
+struct HPMHookPoint *HP_homun_menu_post;
+struct HPMHookPoint *HP_homun_feed_pre;
+struct HPMHookPoint *HP_homun_feed_post;
+struct HPMHookPoint *HP_homun_hunger_timer_pre;
+struct HPMHookPoint *HP_homun_hunger_timer_post;
+struct HPMHookPoint *HP_homun_hunger_timer_delete_pre;
+struct HPMHookPoint *HP_homun_hunger_timer_delete_post;
+struct HPMHookPoint *HP_homun_change_name_pre;
+struct HPMHookPoint *HP_homun_change_name_post;
+struct HPMHookPoint *HP_homun_change_name_ack_pre;
+struct HPMHookPoint *HP_homun_change_name_ack_post;
+struct HPMHookPoint *HP_homun_db_search_pre;
+struct HPMHookPoint *HP_homun_db_search_post;
+struct HPMHookPoint *HP_homun_create_pre;
+struct HPMHookPoint *HP_homun_create_post;
+struct HPMHookPoint *HP_homun_init_timers_pre;
+struct HPMHookPoint *HP_homun_init_timers_post;
+struct HPMHookPoint *HP_homun_call_pre;
+struct HPMHookPoint *HP_homun_call_post;
+struct HPMHookPoint *HP_homun_recv_data_pre;
+struct HPMHookPoint *HP_homun_recv_data_post;
+struct HPMHookPoint *HP_homun_creation_request_pre;
+struct HPMHookPoint *HP_homun_creation_request_post;
+struct HPMHookPoint *HP_homun_ressurect_pre;
+struct HPMHookPoint *HP_homun_ressurect_post;
+struct HPMHookPoint *HP_homun_revive_pre;
+struct HPMHookPoint *HP_homun_revive_post;
+struct HPMHookPoint *HP_homun_stat_reset_pre;
+struct HPMHookPoint *HP_homun_stat_reset_post;
+struct HPMHookPoint *HP_homun_shuffle_pre;
+struct HPMHookPoint *HP_homun_shuffle_post;
+struct HPMHookPoint *HP_homun_read_db_sub_pre;
+struct HPMHookPoint *HP_homun_read_db_sub_post;
+struct HPMHookPoint *HP_homun_read_db_pre;
+struct HPMHookPoint *HP_homun_read_db_post;
+struct HPMHookPoint *HP_homun_read_skill_db_sub_pre;
+struct HPMHookPoint *HP_homun_read_skill_db_sub_post;
+struct HPMHookPoint *HP_homun_skill_db_read_pre;
+struct HPMHookPoint *HP_homun_skill_db_read_post;
+struct HPMHookPoint *HP_homun_exp_db_read_pre;
+struct HPMHookPoint *HP_homun_exp_db_read_post;
+struct HPMHookPoint *HP_homun_addspiritball_pre;
+struct HPMHookPoint *HP_homun_addspiritball_post;
+struct HPMHookPoint *HP_homun_delspiritball_pre;
+struct HPMHookPoint *HP_homun_delspiritball_post;
+struct HPMHookPoint *HP_instance_init_pre;
+struct HPMHookPoint *HP_instance_init_post;
+struct HPMHookPoint *HP_instance_final_pre;
+struct HPMHookPoint *HP_instance_final_post;
+struct HPMHookPoint *HP_instance_create_pre;
+struct HPMHookPoint *HP_instance_create_post;
+struct HPMHookPoint *HP_instance_add_map_pre;
+struct HPMHookPoint *HP_instance_add_map_post;
+struct HPMHookPoint *HP_instance_del_map_pre;
+struct HPMHookPoint *HP_instance_del_map_post;
+struct HPMHookPoint *HP_instance_map2imap_pre;
+struct HPMHookPoint *HP_instance_map2imap_post;
+struct HPMHookPoint *HP_instance_mapid2imapid_pre;
+struct HPMHookPoint *HP_instance_mapid2imapid_post;
+struct HPMHookPoint *HP_instance_destroy_pre;
+struct HPMHookPoint *HP_instance_destroy_post;
+struct HPMHookPoint *HP_instance_start_pre;
+struct HPMHookPoint *HP_instance_start_post;
+struct HPMHookPoint *HP_instance_check_idle_pre;
+struct HPMHookPoint *HP_instance_check_idle_post;
+struct HPMHookPoint *HP_instance_check_kick_pre;
+struct HPMHookPoint *HP_instance_check_kick_post;
+struct HPMHookPoint *HP_instance_set_timeout_pre;
+struct HPMHookPoint *HP_instance_set_timeout_post;
+struct HPMHookPoint *HP_instance_valid_pre;
+struct HPMHookPoint *HP_instance_valid_post;
+struct HPMHookPoint *HP_instance_destroy_timer_pre;
+struct HPMHookPoint *HP_instance_destroy_timer_post;
+struct HPMHookPoint *HP_intif_parse_pre;
+struct HPMHookPoint *HP_intif_parse_post;
+struct HPMHookPoint *HP_intif_create_pet_pre;
+struct HPMHookPoint *HP_intif_create_pet_post;
+struct HPMHookPoint *HP_intif_broadcast_pre;
+struct HPMHookPoint *HP_intif_broadcast_post;
+struct HPMHookPoint *HP_intif_broadcast2_pre;
+struct HPMHookPoint *HP_intif_broadcast2_post;
+struct HPMHookPoint *HP_intif_main_message_pre;
+struct HPMHookPoint *HP_intif_main_message_post;
+struct HPMHookPoint *HP_intif_wis_message_pre;
+struct HPMHookPoint *HP_intif_wis_message_post;
+struct HPMHookPoint *HP_intif_wis_message_to_gm_pre;
+struct HPMHookPoint *HP_intif_wis_message_to_gm_post;
+struct HPMHookPoint *HP_intif_saveregistry_pre;
+struct HPMHookPoint *HP_intif_saveregistry_post;
+struct HPMHookPoint *HP_intif_request_registry_pre;
+struct HPMHookPoint *HP_intif_request_registry_post;
+struct HPMHookPoint *HP_intif_request_guild_storage_pre;
+struct HPMHookPoint *HP_intif_request_guild_storage_post;
+struct HPMHookPoint *HP_intif_send_guild_storage_pre;
+struct HPMHookPoint *HP_intif_send_guild_storage_post;
+struct HPMHookPoint *HP_intif_create_party_pre;
+struct HPMHookPoint *HP_intif_create_party_post;
+struct HPMHookPoint *HP_intif_request_partyinfo_pre;
+struct HPMHookPoint *HP_intif_request_partyinfo_post;
+struct HPMHookPoint *HP_intif_party_addmember_pre;
+struct HPMHookPoint *HP_intif_party_addmember_post;
+struct HPMHookPoint *HP_intif_party_changeoption_pre;
+struct HPMHookPoint *HP_intif_party_changeoption_post;
+struct HPMHookPoint *HP_intif_party_leave_pre;
+struct HPMHookPoint *HP_intif_party_leave_post;
+struct HPMHookPoint *HP_intif_party_changemap_pre;
+struct HPMHookPoint *HP_intif_party_changemap_post;
+struct HPMHookPoint *HP_intif_break_party_pre;
+struct HPMHookPoint *HP_intif_break_party_post;
+struct HPMHookPoint *HP_intif_party_message_pre;
+struct HPMHookPoint *HP_intif_party_message_post;
+struct HPMHookPoint *HP_intif_party_leaderchange_pre;
+struct HPMHookPoint *HP_intif_party_leaderchange_post;
+struct HPMHookPoint *HP_intif_guild_create_pre;
+struct HPMHookPoint *HP_intif_guild_create_post;
+struct HPMHookPoint *HP_intif_guild_request_info_pre;
+struct HPMHookPoint *HP_intif_guild_request_info_post;
+struct HPMHookPoint *HP_intif_guild_addmember_pre;
+struct HPMHookPoint *HP_intif_guild_addmember_post;
+struct HPMHookPoint *HP_intif_guild_leave_pre;
+struct HPMHookPoint *HP_intif_guild_leave_post;
+struct HPMHookPoint *HP_intif_guild_memberinfoshort_pre;
+struct HPMHookPoint *HP_intif_guild_memberinfoshort_post;
+struct HPMHookPoint *HP_intif_guild_break_pre;
+struct HPMHookPoint *HP_intif_guild_break_post;
+struct HPMHookPoint *HP_intif_guild_message_pre;
+struct HPMHookPoint *HP_intif_guild_message_post;
+struct HPMHookPoint *HP_intif_guild_change_gm_pre;
+struct HPMHookPoint *HP_intif_guild_change_gm_post;
+struct HPMHookPoint *HP_intif_guild_change_basicinfo_pre;
+struct HPMHookPoint *HP_intif_guild_change_basicinfo_post;
+struct HPMHookPoint *HP_intif_guild_change_memberinfo_pre;
+struct HPMHookPoint *HP_intif_guild_change_memberinfo_post;
+struct HPMHookPoint *HP_intif_guild_position_pre;
+struct HPMHookPoint *HP_intif_guild_position_post;
+struct HPMHookPoint *HP_intif_guild_skillup_pre;
+struct HPMHookPoint *HP_intif_guild_skillup_post;
+struct HPMHookPoint *HP_intif_guild_alliance_pre;
+struct HPMHookPoint *HP_intif_guild_alliance_post;
+struct HPMHookPoint *HP_intif_guild_notice_pre;
+struct HPMHookPoint *HP_intif_guild_notice_post;
+struct HPMHookPoint *HP_intif_guild_emblem_pre;
+struct HPMHookPoint *HP_intif_guild_emblem_post;
+struct HPMHookPoint *HP_intif_guild_castle_dataload_pre;
+struct HPMHookPoint *HP_intif_guild_castle_dataload_post;
+struct HPMHookPoint *HP_intif_guild_castle_datasave_pre;
+struct HPMHookPoint *HP_intif_guild_castle_datasave_post;
+struct HPMHookPoint *HP_intif_request_petdata_pre;
+struct HPMHookPoint *HP_intif_request_petdata_post;
+struct HPMHookPoint *HP_intif_save_petdata_pre;
+struct HPMHookPoint *HP_intif_save_petdata_post;
+struct HPMHookPoint *HP_intif_delete_petdata_pre;
+struct HPMHookPoint *HP_intif_delete_petdata_post;
+struct HPMHookPoint *HP_intif_rename_pre;
+struct HPMHookPoint *HP_intif_rename_post;
+struct HPMHookPoint *HP_intif_homunculus_create_pre;
+struct HPMHookPoint *HP_intif_homunculus_create_post;
+struct HPMHookPoint *HP_intif_homunculus_requestload_pre;
+struct HPMHookPoint *HP_intif_homunculus_requestload_post;
+struct HPMHookPoint *HP_intif_homunculus_requestsave_pre;
+struct HPMHookPoint *HP_intif_homunculus_requestsave_post;
+struct HPMHookPoint *HP_intif_homunculus_requestdelete_pre;
+struct HPMHookPoint *HP_intif_homunculus_requestdelete_post;
+struct HPMHookPoint *HP_intif_request_questlog_pre;
+struct HPMHookPoint *HP_intif_request_questlog_post;
+struct HPMHookPoint *HP_intif_quest_save_pre;
+struct HPMHookPoint *HP_intif_quest_save_post;
+struct HPMHookPoint *HP_intif_mercenary_create_pre;
+struct HPMHookPoint *HP_intif_mercenary_create_post;
+struct HPMHookPoint *HP_intif_mercenary_request_pre;
+struct HPMHookPoint *HP_intif_mercenary_request_post;
+struct HPMHookPoint *HP_intif_mercenary_delete_pre;
+struct HPMHookPoint *HP_intif_mercenary_delete_post;
+struct HPMHookPoint *HP_intif_mercenary_save_pre;
+struct HPMHookPoint *HP_intif_mercenary_save_post;
+struct HPMHookPoint *HP_intif_Mail_requestinbox_pre;
+struct HPMHookPoint *HP_intif_Mail_requestinbox_post;
+struct HPMHookPoint *HP_intif_Mail_read_pre;
+struct HPMHookPoint *HP_intif_Mail_read_post;
+struct HPMHookPoint *HP_intif_Mail_getattach_pre;
+struct HPMHookPoint *HP_intif_Mail_getattach_post;
+struct HPMHookPoint *HP_intif_Mail_delete_pre;
+struct HPMHookPoint *HP_intif_Mail_delete_post;
+struct HPMHookPoint *HP_intif_Mail_return_pre;
+struct HPMHookPoint *HP_intif_Mail_return_post;
+struct HPMHookPoint *HP_intif_Mail_send_pre;
+struct HPMHookPoint *HP_intif_Mail_send_post;
+struct HPMHookPoint *HP_intif_Auction_requestlist_pre;
+struct HPMHookPoint *HP_intif_Auction_requestlist_post;
+struct HPMHookPoint *HP_intif_Auction_register_pre;
+struct HPMHookPoint *HP_intif_Auction_register_post;
+struct HPMHookPoint *HP_intif_Auction_cancel_pre;
+struct HPMHookPoint *HP_intif_Auction_cancel_post;
+struct HPMHookPoint *HP_intif_Auction_close_pre;
+struct HPMHookPoint *HP_intif_Auction_close_post;
+struct HPMHookPoint *HP_intif_Auction_bid_pre;
+struct HPMHookPoint *HP_intif_Auction_bid_post;
+struct HPMHookPoint *HP_intif_elemental_create_pre;
+struct HPMHookPoint *HP_intif_elemental_create_post;
+struct HPMHookPoint *HP_intif_elemental_request_pre;
+struct HPMHookPoint *HP_intif_elemental_request_post;
+struct HPMHookPoint *HP_intif_elemental_delete_pre;
+struct HPMHookPoint *HP_intif_elemental_delete_post;
+struct HPMHookPoint *HP_intif_elemental_save_pre;
+struct HPMHookPoint *HP_intif_elemental_save_post;
+struct HPMHookPoint *HP_intif_request_accinfo_pre;
+struct HPMHookPoint *HP_intif_request_accinfo_post;
+struct HPMHookPoint *HP_intif_CheckForCharServer_pre;
+struct HPMHookPoint *HP_intif_CheckForCharServer_post;
+struct HPMHookPoint *HP_intif_pWisMessage_pre;
+struct HPMHookPoint *HP_intif_pWisMessage_post;
+struct HPMHookPoint *HP_intif_pWisEnd_pre;
+struct HPMHookPoint *HP_intif_pWisEnd_post;
+struct HPMHookPoint *HP_intif_pWisToGM_sub_pre;
+struct HPMHookPoint *HP_intif_pWisToGM_sub_post;
+struct HPMHookPoint *HP_intif_pWisToGM_pre;
+struct HPMHookPoint *HP_intif_pWisToGM_post;
+struct HPMHookPoint *HP_intif_pRegisters_pre;
+struct HPMHookPoint *HP_intif_pRegisters_post;
+struct HPMHookPoint *HP_intif_pChangeNameOk_pre;
+struct HPMHookPoint *HP_intif_pChangeNameOk_post;
+struct HPMHookPoint *HP_intif_pMessageToFD_pre;
+struct HPMHookPoint *HP_intif_pMessageToFD_post;
+struct HPMHookPoint *HP_intif_pLoadGuildStorage_pre;
+struct HPMHookPoint *HP_intif_pLoadGuildStorage_post;
+struct HPMHookPoint *HP_intif_pSaveGuildStorage_pre;
+struct HPMHookPoint *HP_intif_pSaveGuildStorage_post;
+struct HPMHookPoint *HP_intif_pPartyCreated_pre;
+struct HPMHookPoint *HP_intif_pPartyCreated_post;
+struct HPMHookPoint *HP_intif_pPartyInfo_pre;
+struct HPMHookPoint *HP_intif_pPartyInfo_post;
+struct HPMHookPoint *HP_intif_pPartyMemberAdded_pre;
+struct HPMHookPoint *HP_intif_pPartyMemberAdded_post;
+struct HPMHookPoint *HP_intif_pPartyOptionChanged_pre;
+struct HPMHookPoint *HP_intif_pPartyOptionChanged_post;
+struct HPMHookPoint *HP_intif_pPartyMemberWithdraw_pre;
+struct HPMHookPoint *HP_intif_pPartyMemberWithdraw_post;
+struct HPMHookPoint *HP_intif_pPartyMove_pre;
+struct HPMHookPoint *HP_intif_pPartyMove_post;
+struct HPMHookPoint *HP_intif_pPartyBroken_pre;
+struct HPMHookPoint *HP_intif_pPartyBroken_post;
+struct HPMHookPoint *HP_intif_pPartyMessage_pre;
+struct HPMHookPoint *HP_intif_pPartyMessage_post;
+struct HPMHookPoint *HP_intif_pGuildCreated_pre;
+struct HPMHookPoint *HP_intif_pGuildCreated_post;
+struct HPMHookPoint *HP_intif_pGuildInfo_pre;
+struct HPMHookPoint *HP_intif_pGuildInfo_post;
+struct HPMHookPoint *HP_intif_pGuildMemberAdded_pre;
+struct HPMHookPoint *HP_intif_pGuildMemberAdded_post;
+struct HPMHookPoint *HP_intif_pGuildMemberWithdraw_pre;
+struct HPMHookPoint *HP_intif_pGuildMemberWithdraw_post;
+struct HPMHookPoint *HP_intif_pGuildMemberInfoShort_pre;
+struct HPMHookPoint *HP_intif_pGuildMemberInfoShort_post;
+struct HPMHookPoint *HP_intif_pGuildBroken_pre;
+struct HPMHookPoint *HP_intif_pGuildBroken_post;
+struct HPMHookPoint *HP_intif_pGuildMessage_pre;
+struct HPMHookPoint *HP_intif_pGuildMessage_post;
+struct HPMHookPoint *HP_intif_pGuildBasicInfoChanged_pre;
+struct HPMHookPoint *HP_intif_pGuildBasicInfoChanged_post;
+struct HPMHookPoint *HP_intif_pGuildMemberInfoChanged_pre;
+struct HPMHookPoint *HP_intif_pGuildMemberInfoChanged_post;
+struct HPMHookPoint *HP_intif_pGuildPosition_pre;
+struct HPMHookPoint *HP_intif_pGuildPosition_post;
+struct HPMHookPoint *HP_intif_pGuildSkillUp_pre;
+struct HPMHookPoint *HP_intif_pGuildSkillUp_post;
+struct HPMHookPoint *HP_intif_pGuildAlliance_pre;
+struct HPMHookPoint *HP_intif_pGuildAlliance_post;
+struct HPMHookPoint *HP_intif_pGuildNotice_pre;
+struct HPMHookPoint *HP_intif_pGuildNotice_post;
+struct HPMHookPoint *HP_intif_pGuildEmblem_pre;
+struct HPMHookPoint *HP_intif_pGuildEmblem_post;
+struct HPMHookPoint *HP_intif_pGuildCastleDataLoad_pre;
+struct HPMHookPoint *HP_intif_pGuildCastleDataLoad_post;
+struct HPMHookPoint *HP_intif_pGuildMasterChanged_pre;
+struct HPMHookPoint *HP_intif_pGuildMasterChanged_post;
+struct HPMHookPoint *HP_intif_pQuestLog_pre;
+struct HPMHookPoint *HP_intif_pQuestLog_post;
+struct HPMHookPoint *HP_intif_pQuestSave_pre;
+struct HPMHookPoint *HP_intif_pQuestSave_post;
+struct HPMHookPoint *HP_intif_pMailInboxReceived_pre;
+struct HPMHookPoint *HP_intif_pMailInboxReceived_post;
+struct HPMHookPoint *HP_intif_pMailNew_pre;
+struct HPMHookPoint *HP_intif_pMailNew_post;
+struct HPMHookPoint *HP_intif_pMailGetAttach_pre;
+struct HPMHookPoint *HP_intif_pMailGetAttach_post;
+struct HPMHookPoint *HP_intif_pMailDelete_pre;
+struct HPMHookPoint *HP_intif_pMailDelete_post;
+struct HPMHookPoint *HP_intif_pMailReturn_pre;
+struct HPMHookPoint *HP_intif_pMailReturn_post;
+struct HPMHookPoint *HP_intif_pMailSend_pre;
+struct HPMHookPoint *HP_intif_pMailSend_post;
+struct HPMHookPoint *HP_intif_pAuctionResults_pre;
+struct HPMHookPoint *HP_intif_pAuctionResults_post;
+struct HPMHookPoint *HP_intif_pAuctionRegister_pre;
+struct HPMHookPoint *HP_intif_pAuctionRegister_post;
+struct HPMHookPoint *HP_intif_pAuctionCancel_pre;
+struct HPMHookPoint *HP_intif_pAuctionCancel_post;
+struct HPMHookPoint *HP_intif_pAuctionClose_pre;
+struct HPMHookPoint *HP_intif_pAuctionClose_post;
+struct HPMHookPoint *HP_intif_pAuctionMessage_pre;
+struct HPMHookPoint *HP_intif_pAuctionMessage_post;
+struct HPMHookPoint *HP_intif_pAuctionBid_pre;
+struct HPMHookPoint *HP_intif_pAuctionBid_post;
+struct HPMHookPoint *HP_intif_pMercenaryReceived_pre;
+struct HPMHookPoint *HP_intif_pMercenaryReceived_post;
+struct HPMHookPoint *HP_intif_pMercenaryDeleted_pre;
+struct HPMHookPoint *HP_intif_pMercenaryDeleted_post;
+struct HPMHookPoint *HP_intif_pMercenarySaved_pre;
+struct HPMHookPoint *HP_intif_pMercenarySaved_post;
+struct HPMHookPoint *HP_intif_pElementalReceived_pre;
+struct HPMHookPoint *HP_intif_pElementalReceived_post;
+struct HPMHookPoint *HP_intif_pElementalDeleted_pre;
+struct HPMHookPoint *HP_intif_pElementalDeleted_post;
+struct HPMHookPoint *HP_intif_pElementalSaved_pre;
+struct HPMHookPoint *HP_intif_pElementalSaved_post;
+struct HPMHookPoint *HP_intif_pCreatePet_pre;
+struct HPMHookPoint *HP_intif_pCreatePet_post;
+struct HPMHookPoint *HP_intif_pRecvPetData_pre;
+struct HPMHookPoint *HP_intif_pRecvPetData_post;
+struct HPMHookPoint *HP_intif_pSavePetOk_pre;
+struct HPMHookPoint *HP_intif_pSavePetOk_post;
+struct HPMHookPoint *HP_intif_pDeletePetOk_pre;
+struct HPMHookPoint *HP_intif_pDeletePetOk_post;
+struct HPMHookPoint *HP_intif_pCreateHomunculus_pre;
+struct HPMHookPoint *HP_intif_pCreateHomunculus_post;
+struct HPMHookPoint *HP_intif_pRecvHomunculusData_pre;
+struct HPMHookPoint *HP_intif_pRecvHomunculusData_post;
+struct HPMHookPoint *HP_intif_pSaveHomunculusOk_pre;
+struct HPMHookPoint *HP_intif_pSaveHomunculusOk_post;
+struct HPMHookPoint *HP_intif_pDeleteHomunculusOk_pre;
+struct HPMHookPoint *HP_intif_pDeleteHomunculusOk_post;
+struct HPMHookPoint *HP_ircbot_init_pre;
+struct HPMHookPoint *HP_ircbot_init_post;
+struct HPMHookPoint *HP_ircbot_final_pre;
+struct HPMHookPoint *HP_ircbot_final_post;
+struct HPMHookPoint *HP_ircbot_parse_pre;
+struct HPMHookPoint *HP_ircbot_parse_post;
+struct HPMHookPoint *HP_ircbot_parse_sub_pre;
+struct HPMHookPoint *HP_ircbot_parse_sub_post;
+struct HPMHookPoint *HP_ircbot_parse_source_pre;
+struct HPMHookPoint *HP_ircbot_parse_source_post;
+struct HPMHookPoint *HP_ircbot_func_search_pre;
+struct HPMHookPoint *HP_ircbot_func_search_post;
+struct HPMHookPoint *HP_ircbot_connect_timer_pre;
+struct HPMHookPoint *HP_ircbot_connect_timer_post;
+struct HPMHookPoint *HP_ircbot_identify_timer_pre;
+struct HPMHookPoint *HP_ircbot_identify_timer_post;
+struct HPMHookPoint *HP_ircbot_join_timer_pre;
+struct HPMHookPoint *HP_ircbot_join_timer_post;
+struct HPMHookPoint *HP_ircbot_send_pre;
+struct HPMHookPoint *HP_ircbot_send_post;
+struct HPMHookPoint *HP_ircbot_relay_pre;
+struct HPMHookPoint *HP_ircbot_relay_post;
+struct HPMHookPoint *HP_ircbot_pong_pre;
+struct HPMHookPoint *HP_ircbot_pong_post;
+struct HPMHookPoint *HP_ircbot_privmsg_pre;
+struct HPMHookPoint *HP_ircbot_privmsg_post;
+struct HPMHookPoint *HP_ircbot_userjoin_pre;
+struct HPMHookPoint *HP_ircbot_userjoin_post;
+struct HPMHookPoint *HP_ircbot_userleave_pre;
+struct HPMHookPoint *HP_ircbot_userleave_post;
+struct HPMHookPoint *HP_ircbot_usernick_pre;
+struct HPMHookPoint *HP_ircbot_usernick_post;
+struct HPMHookPoint *HP_itemdb_init_pre;
+struct HPMHookPoint *HP_itemdb_init_post;
+struct HPMHookPoint *HP_itemdb_final_pre;
+struct HPMHookPoint *HP_itemdb_final_post;
+struct HPMHookPoint *HP_itemdb_reload_pre;
+struct HPMHookPoint *HP_itemdb_reload_post;
+struct HPMHookPoint *HP_itemdb_name_constants_pre;
+struct HPMHookPoint *HP_itemdb_name_constants_post;
+struct HPMHookPoint *HP_itemdb_force_name_constants_pre;
+struct HPMHookPoint *HP_itemdb_force_name_constants_post;
+struct HPMHookPoint *HP_itemdb_read_groups_pre;
+struct HPMHookPoint *HP_itemdb_read_groups_post;
+struct HPMHookPoint *HP_itemdb_read_chains_pre;
+struct HPMHookPoint *HP_itemdb_read_chains_post;
+struct HPMHookPoint *HP_itemdb_read_packages_pre;
+struct HPMHookPoint *HP_itemdb_read_packages_post;
+struct HPMHookPoint *HP_itemdb_write_cached_packages_pre;
+struct HPMHookPoint *HP_itemdb_write_cached_packages_post;
+struct HPMHookPoint *HP_itemdb_read_cached_packages_pre;
+struct HPMHookPoint *HP_itemdb_read_cached_packages_post;
+struct HPMHookPoint *HP_itemdb_name2id_pre;
+struct HPMHookPoint *HP_itemdb_name2id_post;
+struct HPMHookPoint *HP_itemdb_search_name_pre;
+struct HPMHookPoint *HP_itemdb_search_name_post;
+struct HPMHookPoint *HP_itemdb_search_name_array_pre;
+struct HPMHookPoint *HP_itemdb_search_name_array_post;
+struct HPMHookPoint *HP_itemdb_load_pre;
+struct HPMHookPoint *HP_itemdb_load_post;
+struct HPMHookPoint *HP_itemdb_search_pre;
+struct HPMHookPoint *HP_itemdb_search_post;
+struct HPMHookPoint *HP_itemdb_parse_dbrow_pre;
+struct HPMHookPoint *HP_itemdb_parse_dbrow_post;
+struct HPMHookPoint *HP_itemdb_exists_pre;
+struct HPMHookPoint *HP_itemdb_exists_post;
+struct HPMHookPoint *HP_itemdb_in_group_pre;
+struct HPMHookPoint *HP_itemdb_in_group_post;
+struct HPMHookPoint *HP_itemdb_group_item_pre;
+struct HPMHookPoint *HP_itemdb_group_item_post;
+struct HPMHookPoint *HP_itemdb_chain_item_pre;
+struct HPMHookPoint *HP_itemdb_chain_item_post;
+struct HPMHookPoint *HP_itemdb_package_item_pre;
+struct HPMHookPoint *HP_itemdb_package_item_post;
+struct HPMHookPoint *HP_itemdb_searchname_sub_pre;
+struct HPMHookPoint *HP_itemdb_searchname_sub_post;
+struct HPMHookPoint *HP_itemdb_searchname_array_sub_pre;
+struct HPMHookPoint *HP_itemdb_searchname_array_sub_post;
+struct HPMHookPoint *HP_itemdb_searchrandomid_pre;
+struct HPMHookPoint *HP_itemdb_searchrandomid_post;
+struct HPMHookPoint *HP_itemdb_typename_pre;
+struct HPMHookPoint *HP_itemdb_typename_post;
+struct HPMHookPoint *HP_itemdb_jobid2mapid_pre;
+struct HPMHookPoint *HP_itemdb_jobid2mapid_post;
+struct HPMHookPoint *HP_itemdb_create_dummy_data_pre;
+struct HPMHookPoint *HP_itemdb_create_dummy_data_post;
+struct HPMHookPoint *HP_itemdb_create_item_data_pre;
+struct HPMHookPoint *HP_itemdb_create_item_data_post;
+struct HPMHookPoint *HP_itemdb_isequip_pre;
+struct HPMHookPoint *HP_itemdb_isequip_post;
+struct HPMHookPoint *HP_itemdb_isequip2_pre;
+struct HPMHookPoint *HP_itemdb_isequip2_post;
+struct HPMHookPoint *HP_itemdb_isstackable_pre;
+struct HPMHookPoint *HP_itemdb_isstackable_post;
+struct HPMHookPoint *HP_itemdb_isstackable2_pre;
+struct HPMHookPoint *HP_itemdb_isstackable2_post;
+struct HPMHookPoint *HP_itemdb_isdropable_sub_pre;
+struct HPMHookPoint *HP_itemdb_isdropable_sub_post;
+struct HPMHookPoint *HP_itemdb_cantrade_sub_pre;
+struct HPMHookPoint *HP_itemdb_cantrade_sub_post;
+struct HPMHookPoint *HP_itemdb_canpartnertrade_sub_pre;
+struct HPMHookPoint *HP_itemdb_canpartnertrade_sub_post;
+struct HPMHookPoint *HP_itemdb_cansell_sub_pre;
+struct HPMHookPoint *HP_itemdb_cansell_sub_post;
+struct HPMHookPoint *HP_itemdb_cancartstore_sub_pre;
+struct HPMHookPoint *HP_itemdb_cancartstore_sub_post;
+struct HPMHookPoint *HP_itemdb_canstore_sub_pre;
+struct HPMHookPoint *HP_itemdb_canstore_sub_post;
+struct HPMHookPoint *HP_itemdb_canguildstore_sub_pre;
+struct HPMHookPoint *HP_itemdb_canguildstore_sub_post;
+struct HPMHookPoint *HP_itemdb_canmail_sub_pre;
+struct HPMHookPoint *HP_itemdb_canmail_sub_post;
+struct HPMHookPoint *HP_itemdb_canauction_sub_pre;
+struct HPMHookPoint *HP_itemdb_canauction_sub_post;
+struct HPMHookPoint *HP_itemdb_isrestricted_pre;
+struct HPMHookPoint *HP_itemdb_isrestricted_post;
+struct HPMHookPoint *HP_itemdb_isidentified_pre;
+struct HPMHookPoint *HP_itemdb_isidentified_post;
+struct HPMHookPoint *HP_itemdb_isidentified2_pre;
+struct HPMHookPoint *HP_itemdb_isidentified2_post;
+struct HPMHookPoint *HP_itemdb_read_itemavail_pre;
+struct HPMHookPoint *HP_itemdb_read_itemavail_post;
+struct HPMHookPoint *HP_itemdb_read_itemtrade_pre;
+struct HPMHookPoint *HP_itemdb_read_itemtrade_post;
+struct HPMHookPoint *HP_itemdb_read_itemdelay_pre;
+struct HPMHookPoint *HP_itemdb_read_itemdelay_post;
+struct HPMHookPoint *HP_itemdb_read_stack_pre;
+struct HPMHookPoint *HP_itemdb_read_stack_post;
+struct HPMHookPoint *HP_itemdb_read_buyingstore_pre;
+struct HPMHookPoint *HP_itemdb_read_buyingstore_post;
+struct HPMHookPoint *HP_itemdb_read_nouse_pre;
+struct HPMHookPoint *HP_itemdb_read_nouse_post;
+struct HPMHookPoint *HP_itemdb_combo_split_atoi_pre;
+struct HPMHookPoint *HP_itemdb_combo_split_atoi_post;
+struct HPMHookPoint *HP_itemdb_read_combos_pre;
+struct HPMHookPoint *HP_itemdb_read_combos_post;
+struct HPMHookPoint *HP_itemdb_gendercheck_pre;
+struct HPMHookPoint *HP_itemdb_gendercheck_post;
+struct HPMHookPoint *HP_itemdb_re_split_atoi_pre;
+struct HPMHookPoint *HP_itemdb_re_split_atoi_post;
+struct HPMHookPoint *HP_itemdb_readdb_pre;
+struct HPMHookPoint *HP_itemdb_readdb_post;
+struct HPMHookPoint *HP_itemdb_read_sqldb_pre;
+struct HPMHookPoint *HP_itemdb_read_sqldb_post;
+struct HPMHookPoint *HP_itemdb_unique_id_pre;
+struct HPMHookPoint *HP_itemdb_unique_id_post;
+struct HPMHookPoint *HP_itemdb_uid_load_pre;
+struct HPMHookPoint *HP_itemdb_uid_load_post;
+struct HPMHookPoint *HP_itemdb_read_pre;
+struct HPMHookPoint *HP_itemdb_read_post;
+struct HPMHookPoint *HP_itemdb_destroy_item_data_pre;
+struct HPMHookPoint *HP_itemdb_destroy_item_data_post;
+struct HPMHookPoint *HP_itemdb_final_sub_pre;
+struct HPMHookPoint *HP_itemdb_final_sub_post;
+struct HPMHookPoint *HP_logs_pick_pc_pre;
+struct HPMHookPoint *HP_logs_pick_pc_post;
+struct HPMHookPoint *HP_logs_pick_mob_pre;
+struct HPMHookPoint *HP_logs_pick_mob_post;
+struct HPMHookPoint *HP_logs_zeny_pre;
+struct HPMHookPoint *HP_logs_zeny_post;
+struct HPMHookPoint *HP_logs_npc_pre;
+struct HPMHookPoint *HP_logs_npc_post;
+struct HPMHookPoint *HP_logs_chat_pre;
+struct HPMHookPoint *HP_logs_chat_post;
+struct HPMHookPoint *HP_logs_atcommand_pre;
+struct HPMHookPoint *HP_logs_atcommand_post;
+struct HPMHookPoint *HP_logs_branch_pre;
+struct HPMHookPoint *HP_logs_branch_post;
+struct HPMHookPoint *HP_logs_mvpdrop_pre;
+struct HPMHookPoint *HP_logs_mvpdrop_post;
+struct HPMHookPoint *HP_logs_pick_sub_pre;
+struct HPMHookPoint *HP_logs_pick_sub_post;
+struct HPMHookPoint *HP_logs_zeny_sub_pre;
+struct HPMHookPoint *HP_logs_zeny_sub_post;
+struct HPMHookPoint *HP_logs_npc_sub_pre;
+struct HPMHookPoint *HP_logs_npc_sub_post;
+struct HPMHookPoint *HP_logs_chat_sub_pre;
+struct HPMHookPoint *HP_logs_chat_sub_post;
+struct HPMHookPoint *HP_logs_atcommand_sub_pre;
+struct HPMHookPoint *HP_logs_atcommand_sub_post;
+struct HPMHookPoint *HP_logs_branch_sub_pre;
+struct HPMHookPoint *HP_logs_branch_sub_post;
+struct HPMHookPoint *HP_logs_mvpdrop_sub_pre;
+struct HPMHookPoint *HP_logs_mvpdrop_sub_post;
+struct HPMHookPoint *HP_logs_config_read_pre;
+struct HPMHookPoint *HP_logs_config_read_post;
+struct HPMHookPoint *HP_logs_config_done_pre;
+struct HPMHookPoint *HP_logs_config_done_post;
+struct HPMHookPoint *HP_logs_sql_init_pre;
+struct HPMHookPoint *HP_logs_sql_init_post;
+struct HPMHookPoint *HP_logs_sql_final_pre;
+struct HPMHookPoint *HP_logs_sql_final_post;
+struct HPMHookPoint *HP_logs_picktype2char_pre;
+struct HPMHookPoint *HP_logs_picktype2char_post;
+struct HPMHookPoint *HP_logs_chattype2char_pre;
+struct HPMHookPoint *HP_logs_chattype2char_post;
+struct HPMHookPoint *HP_logs_should_log_item_pre;
+struct HPMHookPoint *HP_logs_should_log_item_post;
+struct HPMHookPoint *HP_mail_clear_pre;
+struct HPMHookPoint *HP_mail_clear_post;
+struct HPMHookPoint *HP_mail_removeitem_pre;
+struct HPMHookPoint *HP_mail_removeitem_post;
+struct HPMHookPoint *HP_mail_removezeny_pre;
+struct HPMHookPoint *HP_mail_removezeny_post;
+struct HPMHookPoint *HP_mail_setitem_pre;
+struct HPMHookPoint *HP_mail_setitem_post;
+struct HPMHookPoint *HP_mail_setattachment_pre;
+struct HPMHookPoint *HP_mail_setattachment_post;
+struct HPMHookPoint *HP_mail_getattachment_pre;
+struct HPMHookPoint *HP_mail_getattachment_post;
+struct HPMHookPoint *HP_mail_openmail_pre;
+struct HPMHookPoint *HP_mail_openmail_post;
+struct HPMHookPoint *HP_mail_deliveryfail_pre;
+struct HPMHookPoint *HP_mail_deliveryfail_post;
+struct HPMHookPoint *HP_mail_invalid_operation_pre;
+struct HPMHookPoint *HP_mail_invalid_operation_post;
+struct HPMHookPoint *HP_map_zone_init_pre;
+struct HPMHookPoint *HP_map_zone_init_post;
+struct HPMHookPoint *HP_map_zone_remove_pre;
+struct HPMHookPoint *HP_map_zone_remove_post;
+struct HPMHookPoint *HP_map_zone_apply_pre;
+struct HPMHookPoint *HP_map_zone_apply_post;
+struct HPMHookPoint *HP_map_zone_change_pre;
+struct HPMHookPoint *HP_map_zone_change_post;
+struct HPMHookPoint *HP_map_zone_change2_pre;
+struct HPMHookPoint *HP_map_zone_change2_post;
+struct HPMHookPoint *HP_map_getcell_pre;
+struct HPMHookPoint *HP_map_getcell_post;
+struct HPMHookPoint *HP_map_setgatcell_pre;
+struct HPMHookPoint *HP_map_setgatcell_post;
+struct HPMHookPoint *HP_map_cellfromcache_pre;
+struct HPMHookPoint *HP_map_cellfromcache_post;
+struct HPMHookPoint *HP_map_setusers_pre;
+struct HPMHookPoint *HP_map_setusers_post;
+struct HPMHookPoint *HP_map_getusers_pre;
+struct HPMHookPoint *HP_map_getusers_post;
+struct HPMHookPoint *HP_map_usercount_pre;
+struct HPMHookPoint *HP_map_usercount_post;
+struct HPMHookPoint *HP_map_freeblock_pre;
+struct HPMHookPoint *HP_map_freeblock_post;
+struct HPMHookPoint *HP_map_freeblock_lock_pre;
+struct HPMHookPoint *HP_map_freeblock_lock_post;
+struct HPMHookPoint *HP_map_freeblock_unlock_pre;
+struct HPMHookPoint *HP_map_freeblock_unlock_post;
+struct HPMHookPoint *HP_map_addblock_pre;
+struct HPMHookPoint *HP_map_addblock_post;
+struct HPMHookPoint *HP_map_delblock_pre;
+struct HPMHookPoint *HP_map_delblock_post;
+struct HPMHookPoint *HP_map_moveblock_pre;
+struct HPMHookPoint *HP_map_moveblock_post;
+struct HPMHookPoint *HP_map_count_oncell_pre;
+struct HPMHookPoint *HP_map_count_oncell_post;
+struct HPMHookPoint *HP_map_find_skill_unit_oncell_pre;
+struct HPMHookPoint *HP_map_find_skill_unit_oncell_post;
+struct HPMHookPoint *HP_map_get_new_object_id_pre;
+struct HPMHookPoint *HP_map_get_new_object_id_post;
+struct HPMHookPoint *HP_map_search_freecell_pre;
+struct HPMHookPoint *HP_map_search_freecell_post;
+struct HPMHookPoint *HP_map_quit_pre;
+struct HPMHookPoint *HP_map_quit_post;
+struct HPMHookPoint *HP_map_addnpc_pre;
+struct HPMHookPoint *HP_map_addnpc_post;
+struct HPMHookPoint *HP_map_clearflooritem_timer_pre;
+struct HPMHookPoint *HP_map_clearflooritem_timer_post;
+struct HPMHookPoint *HP_map_removemobs_timer_pre;
+struct HPMHookPoint *HP_map_removemobs_timer_post;
+struct HPMHookPoint *HP_map_clearflooritem_pre;
+struct HPMHookPoint *HP_map_clearflooritem_post;
+struct HPMHookPoint *HP_map_addflooritem_pre;
+struct HPMHookPoint *HP_map_addflooritem_post;
+struct HPMHookPoint *HP_map_addnickdb_pre;
+struct HPMHookPoint *HP_map_addnickdb_post;
+struct HPMHookPoint *HP_map_delnickdb_pre;
+struct HPMHookPoint *HP_map_delnickdb_post;
+struct HPMHookPoint *HP_map_reqnickdb_pre;
+struct HPMHookPoint *HP_map_reqnickdb_post;
+struct HPMHookPoint *HP_map_charid2nick_pre;
+struct HPMHookPoint *HP_map_charid2nick_post;
+struct HPMHookPoint *HP_map_charid2sd_pre;
+struct HPMHookPoint *HP_map_charid2sd_post;
+struct HPMHookPoint *HP_map_vforeachpc_pre;
+struct HPMHookPoint *HP_map_vforeachpc_post;
+struct HPMHookPoint *HP_map_vforeachmob_pre;
+struct HPMHookPoint *HP_map_vforeachmob_post;
+struct HPMHookPoint *HP_map_vforeachnpc_pre;
+struct HPMHookPoint *HP_map_vforeachnpc_post;
+struct HPMHookPoint *HP_map_vforeachregen_pre;
+struct HPMHookPoint *HP_map_vforeachregen_post;
+struct HPMHookPoint *HP_map_vforeachiddb_pre;
+struct HPMHookPoint *HP_map_vforeachiddb_post;
+struct HPMHookPoint *HP_map_vforeachinrange_pre;
+struct HPMHookPoint *HP_map_vforeachinrange_post;
+struct HPMHookPoint *HP_map_vforeachinshootrange_pre;
+struct HPMHookPoint *HP_map_vforeachinshootrange_post;
+struct HPMHookPoint *HP_map_vforeachinarea_pre;
+struct HPMHookPoint *HP_map_vforeachinarea_post;
+struct HPMHookPoint *HP_map_vforcountinrange_pre;
+struct HPMHookPoint *HP_map_vforcountinrange_post;
+struct HPMHookPoint *HP_map_vforcountinarea_pre;
+struct HPMHookPoint *HP_map_vforcountinarea_post;
+struct HPMHookPoint *HP_map_vforeachinmovearea_pre;
+struct HPMHookPoint *HP_map_vforeachinmovearea_post;
+struct HPMHookPoint *HP_map_vforeachincell_pre;
+struct HPMHookPoint *HP_map_vforeachincell_post;
+struct HPMHookPoint *HP_map_vforeachinpath_pre;
+struct HPMHookPoint *HP_map_vforeachinpath_post;
+struct HPMHookPoint *HP_map_vforeachinmap_pre;
+struct HPMHookPoint *HP_map_vforeachinmap_post;
+struct HPMHookPoint *HP_map_vforeachininstance_pre;
+struct HPMHookPoint *HP_map_vforeachininstance_post;
+struct HPMHookPoint *HP_map_id2sd_pre;
+struct HPMHookPoint *HP_map_id2sd_post;
+struct HPMHookPoint *HP_map_id2md_pre;
+struct HPMHookPoint *HP_map_id2md_post;
+struct HPMHookPoint *HP_map_id2nd_pre;
+struct HPMHookPoint *HP_map_id2nd_post;
+struct HPMHookPoint *HP_map_id2hd_pre;
+struct HPMHookPoint *HP_map_id2hd_post;
+struct HPMHookPoint *HP_map_id2mc_pre;
+struct HPMHookPoint *HP_map_id2mc_post;
+struct HPMHookPoint *HP_map_id2cd_pre;
+struct HPMHookPoint *HP_map_id2cd_post;
+struct HPMHookPoint *HP_map_id2bl_pre;
+struct HPMHookPoint *HP_map_id2bl_post;
+struct HPMHookPoint *HP_map_blid_exists_pre;
+struct HPMHookPoint *HP_map_blid_exists_post;
+struct HPMHookPoint *HP_map_mapindex2mapid_pre;
+struct HPMHookPoint *HP_map_mapindex2mapid_post;
+struct HPMHookPoint *HP_map_mapname2mapid_pre;
+struct HPMHookPoint *HP_map_mapname2mapid_post;
+struct HPMHookPoint *HP_map_mapname2ipport_pre;
+struct HPMHookPoint *HP_map_mapname2ipport_post;
+struct HPMHookPoint *HP_map_setipport_pre;
+struct HPMHookPoint *HP_map_setipport_post;
+struct HPMHookPoint *HP_map_eraseipport_pre;
+struct HPMHookPoint *HP_map_eraseipport_post;
+struct HPMHookPoint *HP_map_eraseallipport_pre;
+struct HPMHookPoint *HP_map_eraseallipport_post;
+struct HPMHookPoint *HP_map_addiddb_pre;
+struct HPMHookPoint *HP_map_addiddb_post;
+struct HPMHookPoint *HP_map_deliddb_pre;
+struct HPMHookPoint *HP_map_deliddb_post;
+struct HPMHookPoint *HP_map_nick2sd_pre;
+struct HPMHookPoint *HP_map_nick2sd_post;
+struct HPMHookPoint *HP_map_getmob_boss_pre;
+struct HPMHookPoint *HP_map_getmob_boss_post;
+struct HPMHookPoint *HP_map_id2boss_pre;
+struct HPMHookPoint *HP_map_id2boss_post;
+struct HPMHookPoint *HP_map_reloadnpc_pre;
+struct HPMHookPoint *HP_map_reloadnpc_post;
+struct HPMHookPoint *HP_map_check_dir_pre;
+struct HPMHookPoint *HP_map_check_dir_post;
+struct HPMHookPoint *HP_map_calc_dir_pre;
+struct HPMHookPoint *HP_map_calc_dir_post;
+struct HPMHookPoint *HP_map_random_dir_pre;
+struct HPMHookPoint *HP_map_random_dir_post;
+struct HPMHookPoint *HP_map_cleanup_sub_pre;
+struct HPMHookPoint *HP_map_cleanup_sub_post;
+struct HPMHookPoint *HP_map_delmap_pre;
+struct HPMHookPoint *HP_map_delmap_post;
+struct HPMHookPoint *HP_map_flags_init_pre;
+struct HPMHookPoint *HP_map_flags_init_post;
+struct HPMHookPoint *HP_map_iwall_set_pre;
+struct HPMHookPoint *HP_map_iwall_set_post;
+struct HPMHookPoint *HP_map_iwall_get_pre;
+struct HPMHookPoint *HP_map_iwall_get_post;
+struct HPMHookPoint *HP_map_iwall_remove_pre;
+struct HPMHookPoint *HP_map_iwall_remove_post;
+struct HPMHookPoint *HP_map_addmobtolist_pre;
+struct HPMHookPoint *HP_map_addmobtolist_post;
+struct HPMHookPoint *HP_map_spawnmobs_pre;
+struct HPMHookPoint *HP_map_spawnmobs_post;
+struct HPMHookPoint *HP_map_removemobs_pre;
+struct HPMHookPoint *HP_map_removemobs_post;
+struct HPMHookPoint *HP_map_addmap2db_pre;
+struct HPMHookPoint *HP_map_addmap2db_post;
+struct HPMHookPoint *HP_map_removemapdb_pre;
+struct HPMHookPoint *HP_map_removemapdb_post;
+struct HPMHookPoint *HP_map_clean_pre;
+struct HPMHookPoint *HP_map_clean_post;
+struct HPMHookPoint *HP_map_do_shutdown_pre;
+struct HPMHookPoint *HP_map_do_shutdown_post;
+struct HPMHookPoint *HP_map_freeblock_timer_pre;
+struct HPMHookPoint *HP_map_freeblock_timer_post;
+struct HPMHookPoint *HP_map_searchrandfreecell_pre;
+struct HPMHookPoint *HP_map_searchrandfreecell_post;
+struct HPMHookPoint *HP_map_count_sub_pre;
+struct HPMHookPoint *HP_map_count_sub_post;
+struct HPMHookPoint *HP_map_create_charid2nick_pre;
+struct HPMHookPoint *HP_map_create_charid2nick_post;
+struct HPMHookPoint *HP_map_removemobs_sub_pre;
+struct HPMHookPoint *HP_map_removemobs_sub_post;
+struct HPMHookPoint *HP_map_gat2cell_pre;
+struct HPMHookPoint *HP_map_gat2cell_post;
+struct HPMHookPoint *HP_map_cell2gat_pre;
+struct HPMHookPoint *HP_map_cell2gat_post;
+struct HPMHookPoint *HP_map_getcellp_pre;
+struct HPMHookPoint *HP_map_getcellp_post;
+struct HPMHookPoint *HP_map_setcell_pre;
+struct HPMHookPoint *HP_map_setcell_post;
+struct HPMHookPoint *HP_map_sub_getcellp_pre;
+struct HPMHookPoint *HP_map_sub_getcellp_post;
+struct HPMHookPoint *HP_map_sub_setcell_pre;
+struct HPMHookPoint *HP_map_sub_setcell_post;
+struct HPMHookPoint *HP_map_iwall_nextxy_pre;
+struct HPMHookPoint *HP_map_iwall_nextxy_post;
+struct HPMHookPoint *HP_map_create_map_data_other_server_pre;
+struct HPMHookPoint *HP_map_create_map_data_other_server_post;
+struct HPMHookPoint *HP_map_eraseallipport_sub_pre;
+struct HPMHookPoint *HP_map_eraseallipport_sub_post;
+struct HPMHookPoint *HP_map_init_mapcache_pre;
+struct HPMHookPoint *HP_map_init_mapcache_post;
+struct HPMHookPoint *HP_map_readfromcache_pre;
+struct HPMHookPoint *HP_map_readfromcache_post;
+struct HPMHookPoint *HP_map_addmap_pre;
+struct HPMHookPoint *HP_map_addmap_post;
+struct HPMHookPoint *HP_map_delmapid_pre;
+struct HPMHookPoint *HP_map_delmapid_post;
+struct HPMHookPoint *HP_map_zone_db_clear_pre;
+struct HPMHookPoint *HP_map_zone_db_clear_post;
+struct HPMHookPoint *HP_map_list_final_pre;
+struct HPMHookPoint *HP_map_list_final_post;
+struct HPMHookPoint *HP_map_waterheight_pre;
+struct HPMHookPoint *HP_map_waterheight_post;
+struct HPMHookPoint *HP_map_readgat_pre;
+struct HPMHookPoint *HP_map_readgat_post;
+struct HPMHookPoint *HP_map_readallmaps_pre;
+struct HPMHookPoint *HP_map_readallmaps_post;
+struct HPMHookPoint *HP_map_config_read_pre;
+struct HPMHookPoint *HP_map_config_read_post;
+struct HPMHookPoint *HP_map_config_read_sub_pre;
+struct HPMHookPoint *HP_map_config_read_sub_post;
+struct HPMHookPoint *HP_map_reloadnpc_sub_pre;
+struct HPMHookPoint *HP_map_reloadnpc_sub_post;
+struct HPMHookPoint *HP_map_inter_config_read_pre;
+struct HPMHookPoint *HP_map_inter_config_read_post;
+struct HPMHookPoint *HP_map_sql_init_pre;
+struct HPMHookPoint *HP_map_sql_init_post;
+struct HPMHookPoint *HP_map_sql_close_pre;
+struct HPMHookPoint *HP_map_sql_close_post;
+struct HPMHookPoint *HP_map_zone_mf_cache_pre;
+struct HPMHookPoint *HP_map_zone_mf_cache_post;
+struct HPMHookPoint *HP_map_zone_str2itemid_pre;
+struct HPMHookPoint *HP_map_zone_str2itemid_post;
+struct HPMHookPoint *HP_map_zone_str2skillid_pre;
+struct HPMHookPoint *HP_map_zone_str2skillid_post;
+struct HPMHookPoint *HP_map_zone_bl_type_pre;
+struct HPMHookPoint *HP_map_zone_bl_type_post;
+struct HPMHookPoint *HP_map_read_zone_db_pre;
+struct HPMHookPoint *HP_map_read_zone_db_post;
+struct HPMHookPoint *HP_map_db_final_pre;
+struct HPMHookPoint *HP_map_db_final_post;
+struct HPMHookPoint *HP_map_nick_db_final_pre;
+struct HPMHookPoint *HP_map_nick_db_final_post;
+struct HPMHookPoint *HP_map_cleanup_db_sub_pre;
+struct HPMHookPoint *HP_map_cleanup_db_sub_post;
+struct HPMHookPoint *HP_map_abort_sub_pre;
+struct HPMHookPoint *HP_map_abort_sub_post;
+struct HPMHookPoint *HP_map_helpscreen_pre;
+struct HPMHookPoint *HP_map_helpscreen_post;
+struct HPMHookPoint *HP_map_versionscreen_pre;
+struct HPMHookPoint *HP_map_versionscreen_post;
+struct HPMHookPoint *HP_map_arg_next_value_pre;
+struct HPMHookPoint *HP_map_arg_next_value_post;
+struct HPMHookPoint *HP_map_addblcell_pre;
+struct HPMHookPoint *HP_map_addblcell_post;
+struct HPMHookPoint *HP_map_delblcell_pre;
+struct HPMHookPoint *HP_map_delblcell_post;
+struct HPMHookPoint *HP_mapit_alloc_pre;
+struct HPMHookPoint *HP_mapit_alloc_post;
+struct HPMHookPoint *HP_mapit_free_pre;
+struct HPMHookPoint *HP_mapit_free_post;
+struct HPMHookPoint *HP_mapit_first_pre;
+struct HPMHookPoint *HP_mapit_first_post;
+struct HPMHookPoint *HP_mapit_last_pre;
+struct HPMHookPoint *HP_mapit_last_post;
+struct HPMHookPoint *HP_mapit_next_pre;
+struct HPMHookPoint *HP_mapit_next_post;
+struct HPMHookPoint *HP_mapit_prev_pre;
+struct HPMHookPoint *HP_mapit_prev_post;
+struct HPMHookPoint *HP_mapit_exists_pre;
+struct HPMHookPoint *HP_mapit_exists_post;
+struct HPMHookPoint *HP_mapreg_init_pre;
+struct HPMHookPoint *HP_mapreg_init_post;
+struct HPMHookPoint *HP_mapreg_final_pre;
+struct HPMHookPoint *HP_mapreg_final_post;
+struct HPMHookPoint *HP_mapreg_readreg_pre;
+struct HPMHookPoint *HP_mapreg_readreg_post;
+struct HPMHookPoint *HP_mapreg_readregstr_pre;
+struct HPMHookPoint *HP_mapreg_readregstr_post;
+struct HPMHookPoint *HP_mapreg_setreg_pre;
+struct HPMHookPoint *HP_mapreg_setreg_post;
+struct HPMHookPoint *HP_mapreg_setregstr_pre;
+struct HPMHookPoint *HP_mapreg_setregstr_post;
+struct HPMHookPoint *HP_mapreg_load_pre;
+struct HPMHookPoint *HP_mapreg_load_post;
+struct HPMHookPoint *HP_mapreg_save_pre;
+struct HPMHookPoint *HP_mapreg_save_post;
+struct HPMHookPoint *HP_mapreg_save_timer_pre;
+struct HPMHookPoint *HP_mapreg_save_timer_post;
+struct HPMHookPoint *HP_mapreg_reload_pre;
+struct HPMHookPoint *HP_mapreg_reload_post;
+struct HPMHookPoint *HP_mapreg_config_read_pre;
+struct HPMHookPoint *HP_mapreg_config_read_post;
+struct HPMHookPoint *HP_mercenary_init_pre;
+struct HPMHookPoint *HP_mercenary_init_post;
+struct HPMHookPoint *HP_mercenary_class_pre;
+struct HPMHookPoint *HP_mercenary_class_post;
+struct HPMHookPoint *HP_mercenary_get_viewdata_pre;
+struct HPMHookPoint *HP_mercenary_get_viewdata_post;
+struct HPMHookPoint *HP_mercenary_create_pre;
+struct HPMHookPoint *HP_mercenary_create_post;
+struct HPMHookPoint *HP_mercenary_data_received_pre;
+struct HPMHookPoint *HP_mercenary_data_received_post;
+struct HPMHookPoint *HP_mercenary_save_pre;
+struct HPMHookPoint *HP_mercenary_save_post;
+struct HPMHookPoint *HP_mercenary_heal_pre;
+struct HPMHookPoint *HP_mercenary_heal_post;
+struct HPMHookPoint *HP_mercenary_dead_pre;
+struct HPMHookPoint *HP_mercenary_dead_post;
+struct HPMHookPoint *HP_mercenary_delete_pre;
+struct HPMHookPoint *HP_mercenary_delete_post;
+struct HPMHookPoint *HP_mercenary_contract_stop_pre;
+struct HPMHookPoint *HP_mercenary_contract_stop_post;
+struct HPMHookPoint *HP_mercenary_get_lifetime_pre;
+struct HPMHookPoint *HP_mercenary_get_lifetime_post;
+struct HPMHookPoint *HP_mercenary_get_guild_pre;
+struct HPMHookPoint *HP_mercenary_get_guild_post;
+struct HPMHookPoint *HP_mercenary_get_faith_pre;
+struct HPMHookPoint *HP_mercenary_get_faith_post;
+struct HPMHookPoint *HP_mercenary_set_faith_pre;
+struct HPMHookPoint *HP_mercenary_set_faith_post;
+struct HPMHookPoint *HP_mercenary_get_calls_pre;
+struct HPMHookPoint *HP_mercenary_get_calls_post;
+struct HPMHookPoint *HP_mercenary_set_calls_pre;
+struct HPMHookPoint *HP_mercenary_set_calls_post;
+struct HPMHookPoint *HP_mercenary_kills_pre;
+struct HPMHookPoint *HP_mercenary_kills_post;
+struct HPMHookPoint *HP_mercenary_checkskill_pre;
+struct HPMHookPoint *HP_mercenary_checkskill_post;
+struct HPMHookPoint *HP_mercenary_read_db_pre;
+struct HPMHookPoint *HP_mercenary_read_db_post;
+struct HPMHookPoint *HP_mercenary_read_skilldb_pre;
+struct HPMHookPoint *HP_mercenary_read_skilldb_post;
+struct HPMHookPoint *HP_mercenary_killbonus_pre;
+struct HPMHookPoint *HP_mercenary_killbonus_post;
+struct HPMHookPoint *HP_mercenary_search_index_pre;
+struct HPMHookPoint *HP_mercenary_search_index_post;
+struct HPMHookPoint *HP_mercenary_contract_end_timer_pre;
+struct HPMHookPoint *HP_mercenary_contract_end_timer_post;
+struct HPMHookPoint *HP_mercenary_read_db_sub_pre;
+struct HPMHookPoint *HP_mercenary_read_db_sub_post;
+struct HPMHookPoint *HP_mercenary_read_skill_db_sub_pre;
+struct HPMHookPoint *HP_mercenary_read_skill_db_sub_post;
+struct HPMHookPoint *HP_mob_init_pre;
+struct HPMHookPoint *HP_mob_init_post;
+struct HPMHookPoint *HP_mob_final_pre;
+struct HPMHookPoint *HP_mob_final_post;
+struct HPMHookPoint *HP_mob_reload_pre;
+struct HPMHookPoint *HP_mob_reload_post;
+struct HPMHookPoint *HP_mob_db_pre;
+struct HPMHookPoint *HP_mob_db_post;
+struct HPMHookPoint *HP_mob_chat_pre;
+struct HPMHookPoint *HP_mob_chat_post;
+struct HPMHookPoint *HP_mob_makedummymobdb_pre;
+struct HPMHookPoint *HP_mob_makedummymobdb_post;
+struct HPMHookPoint *HP_mob_spawn_guardian_sub_pre;
+struct HPMHookPoint *HP_mob_spawn_guardian_sub_post;
+struct HPMHookPoint *HP_mob_skill_id2skill_idx_pre;
+struct HPMHookPoint *HP_mob_skill_id2skill_idx_post;
+struct HPMHookPoint *HP_mob_db_searchname_pre;
+struct HPMHookPoint *HP_mob_db_searchname_post;
+struct HPMHookPoint *HP_mob_db_searchname_array_sub_pre;
+struct HPMHookPoint *HP_mob_db_searchname_array_sub_post;
+struct HPMHookPoint *HP_mob_mvptomb_create_pre;
+struct HPMHookPoint *HP_mob_mvptomb_create_post;
+struct HPMHookPoint *HP_mob_mvptomb_destroy_pre;
+struct HPMHookPoint *HP_mob_mvptomb_destroy_post;
+struct HPMHookPoint *HP_mob_db_searchname_array_pre;
+struct HPMHookPoint *HP_mob_db_searchname_array_post;
+struct HPMHookPoint *HP_mob_db_checkid_pre;
+struct HPMHookPoint *HP_mob_db_checkid_post;
+struct HPMHookPoint *HP_mob_get_viewdata_pre;
+struct HPMHookPoint *HP_mob_get_viewdata_post;
+struct HPMHookPoint *HP_mob_parse_dataset_pre;
+struct HPMHookPoint *HP_mob_parse_dataset_post;
+struct HPMHookPoint *HP_mob_spawn_dataset_pre;
+struct HPMHookPoint *HP_mob_spawn_dataset_post;
+struct HPMHookPoint *HP_mob_get_random_id_pre;
+struct HPMHookPoint *HP_mob_get_random_id_post;
+struct HPMHookPoint *HP_mob_ksprotected_pre;
+struct HPMHookPoint *HP_mob_ksprotected_post;
+struct HPMHookPoint *HP_mob_once_spawn_sub_pre;
+struct HPMHookPoint *HP_mob_once_spawn_sub_post;
+struct HPMHookPoint *HP_mob_once_spawn_pre;
+struct HPMHookPoint *HP_mob_once_spawn_post;
+struct HPMHookPoint *HP_mob_once_spawn_area_pre;
+struct HPMHookPoint *HP_mob_once_spawn_area_post;
+struct HPMHookPoint *HP_mob_spawn_guardian_pre;
+struct HPMHookPoint *HP_mob_spawn_guardian_post;
+struct HPMHookPoint *HP_mob_spawn_bg_pre;
+struct HPMHookPoint *HP_mob_spawn_bg_post;
+struct HPMHookPoint *HP_mob_can_reach_pre;
+struct HPMHookPoint *HP_mob_can_reach_post;
+struct HPMHookPoint *HP_mob_linksearch_pre;
+struct HPMHookPoint *HP_mob_linksearch_post;
+struct HPMHookPoint *HP_mob_delayspawn_pre;
+struct HPMHookPoint *HP_mob_delayspawn_post;
+struct HPMHookPoint *HP_mob_setdelayspawn_pre;
+struct HPMHookPoint *HP_mob_setdelayspawn_post;
+struct HPMHookPoint *HP_mob_count_sub_pre;
+struct HPMHookPoint *HP_mob_count_sub_post;
+struct HPMHookPoint *HP_mob_spawn_pre;
+struct HPMHookPoint *HP_mob_spawn_post;
+struct HPMHookPoint *HP_mob_can_changetarget_pre;
+struct HPMHookPoint *HP_mob_can_changetarget_post;
+struct HPMHookPoint *HP_mob_target_pre;
+struct HPMHookPoint *HP_mob_target_post;
+struct HPMHookPoint *HP_mob_ai_sub_hard_activesearch_pre;
+struct HPMHookPoint *HP_mob_ai_sub_hard_activesearch_post;
+struct HPMHookPoint *HP_mob_ai_sub_hard_changechase_pre;
+struct HPMHookPoint *HP_mob_ai_sub_hard_changechase_post;
+struct HPMHookPoint *HP_mob_ai_sub_hard_bg_ally_pre;
+struct HPMHookPoint *HP_mob_ai_sub_hard_bg_ally_post;
+struct HPMHookPoint *HP_mob_ai_sub_hard_lootsearch_pre;
+struct HPMHookPoint *HP_mob_ai_sub_hard_lootsearch_post;
+struct HPMHookPoint *HP_mob_warpchase_sub_pre;
+struct HPMHookPoint *HP_mob_warpchase_sub_post;
+struct HPMHookPoint *HP_mob_ai_sub_hard_slavemob_pre;
+struct HPMHookPoint *HP_mob_ai_sub_hard_slavemob_post;
+struct HPMHookPoint *HP_mob_unlocktarget_pre;
+struct HPMHookPoint *HP_mob_unlocktarget_post;
+struct HPMHookPoint *HP_mob_randomwalk_pre;
+struct HPMHookPoint *HP_mob_randomwalk_post;
+struct HPMHookPoint *HP_mob_warpchase_pre;
+struct HPMHookPoint *HP_mob_warpchase_post;
+struct HPMHookPoint *HP_mob_ai_sub_hard_pre;
+struct HPMHookPoint *HP_mob_ai_sub_hard_post;
+struct HPMHookPoint *HP_mob_ai_sub_hard_timer_pre;
+struct HPMHookPoint *HP_mob_ai_sub_hard_timer_post;
+struct HPMHookPoint *HP_mob_ai_sub_foreachclient_pre;
+struct HPMHookPoint *HP_mob_ai_sub_foreachclient_post;
+struct HPMHookPoint *HP_mob_ai_sub_lazy_pre;
+struct HPMHookPoint *HP_mob_ai_sub_lazy_post;
+struct HPMHookPoint *HP_mob_ai_lazy_pre;
+struct HPMHookPoint *HP_mob_ai_lazy_post;
+struct HPMHookPoint *HP_mob_ai_hard_pre;
+struct HPMHookPoint *HP_mob_ai_hard_post;
+struct HPMHookPoint *HP_mob_setdropitem_pre;
+struct HPMHookPoint *HP_mob_setdropitem_post;
+struct HPMHookPoint *HP_mob_setlootitem_pre;
+struct HPMHookPoint *HP_mob_setlootitem_post;
+struct HPMHookPoint *HP_mob_delay_item_drop_pre;
+struct HPMHookPoint *HP_mob_delay_item_drop_post;
+struct HPMHookPoint *HP_mob_item_drop_pre;
+struct HPMHookPoint *HP_mob_item_drop_post;
+struct HPMHookPoint *HP_mob_timer_delete_pre;
+struct HPMHookPoint *HP_mob_timer_delete_post;
+struct HPMHookPoint *HP_mob_deleteslave_sub_pre;
+struct HPMHookPoint *HP_mob_deleteslave_sub_post;
+struct HPMHookPoint *HP_mob_deleteslave_pre;
+struct HPMHookPoint *HP_mob_deleteslave_post;
+struct HPMHookPoint *HP_mob_respawn_pre;
+struct HPMHookPoint *HP_mob_respawn_post;
+struct HPMHookPoint *HP_mob_log_damage_pre;
+struct HPMHookPoint *HP_mob_log_damage_post;
+struct HPMHookPoint *HP_mob_damage_pre;
+struct HPMHookPoint *HP_mob_damage_post;
+struct HPMHookPoint *HP_mob_dead_pre;
+struct HPMHookPoint *HP_mob_dead_post;
+struct HPMHookPoint *HP_mob_revive_pre;
+struct HPMHookPoint *HP_mob_revive_post;
+struct HPMHookPoint *HP_mob_guardian_guildchange_pre;
+struct HPMHookPoint *HP_mob_guardian_guildchange_post;
+struct HPMHookPoint *HP_mob_random_class_pre;
+struct HPMHookPoint *HP_mob_random_class_post;
+struct HPMHookPoint *HP_mob_class_change_pre;
+struct HPMHookPoint *HP_mob_class_change_post;
+struct HPMHookPoint *HP_mob_heal_pre;
+struct HPMHookPoint *HP_mob_heal_post;
+struct HPMHookPoint *HP_mob_warpslave_sub_pre;
+struct HPMHookPoint *HP_mob_warpslave_sub_post;
+struct HPMHookPoint *HP_mob_warpslave_pre;
+struct HPMHookPoint *HP_mob_warpslave_post;
+struct HPMHookPoint *HP_mob_countslave_sub_pre;
+struct HPMHookPoint *HP_mob_countslave_sub_post;
+struct HPMHookPoint *HP_mob_countslave_pre;
+struct HPMHookPoint *HP_mob_countslave_post;
+struct HPMHookPoint *HP_mob_summonslave_pre;
+struct HPMHookPoint *HP_mob_summonslave_post;
+struct HPMHookPoint *HP_mob_getfriendhprate_sub_pre;
+struct HPMHookPoint *HP_mob_getfriendhprate_sub_post;
+struct HPMHookPoint *HP_mob_getfriendhprate_pre;
+struct HPMHookPoint *HP_mob_getfriendhprate_post;
+struct HPMHookPoint *HP_mob_getmasterhpltmaxrate_pre;
+struct HPMHookPoint *HP_mob_getmasterhpltmaxrate_post;
+struct HPMHookPoint *HP_mob_getfriendstatus_sub_pre;
+struct HPMHookPoint *HP_mob_getfriendstatus_sub_post;
+struct HPMHookPoint *HP_mob_getfriendstatus_pre;
+struct HPMHookPoint *HP_mob_getfriendstatus_post;
+struct HPMHookPoint *HP_mob_skill_use_pre;
+struct HPMHookPoint *HP_mob_skill_use_post;
+struct HPMHookPoint *HP_mob_skill_event_pre;
+struct HPMHookPoint *HP_mob_skill_event_post;
+struct HPMHookPoint *HP_mob_is_clone_pre;
+struct HPMHookPoint *HP_mob_is_clone_post;
+struct HPMHookPoint *HP_mob_clone_spawn_pre;
+struct HPMHookPoint *HP_mob_clone_spawn_post;
+struct HPMHookPoint *HP_mob_clone_delete_pre;
+struct HPMHookPoint *HP_mob_clone_delete_post;
+struct HPMHookPoint *HP_mob_drop_adjust_pre;
+struct HPMHookPoint *HP_mob_drop_adjust_post;
+struct HPMHookPoint *HP_mob_item_dropratio_adjust_pre;
+struct HPMHookPoint *HP_mob_item_dropratio_adjust_post;
+struct HPMHookPoint *HP_mob_parse_dbrow_pre;
+struct HPMHookPoint *HP_mob_parse_dbrow_post;
+struct HPMHookPoint *HP_mob_readdb_sub_pre;
+struct HPMHookPoint *HP_mob_readdb_sub_post;
+struct HPMHookPoint *HP_mob_readdb_pre;
+struct HPMHookPoint *HP_mob_readdb_post;
+struct HPMHookPoint *HP_mob_read_sqldb_pre;
+struct HPMHookPoint *HP_mob_read_sqldb_post;
+struct HPMHookPoint *HP_mob_readdb_mobavail_pre;
+struct HPMHookPoint *HP_mob_readdb_mobavail_post;
+struct HPMHookPoint *HP_mob_read_randommonster_pre;
+struct HPMHookPoint *HP_mob_read_randommonster_post;
+struct HPMHookPoint *HP_mob_parse_row_chatdb_pre;
+struct HPMHookPoint *HP_mob_parse_row_chatdb_post;
+struct HPMHookPoint *HP_mob_readchatdb_pre;
+struct HPMHookPoint *HP_mob_readchatdb_post;
+struct HPMHookPoint *HP_mob_parse_row_mobskilldb_pre;
+struct HPMHookPoint *HP_mob_parse_row_mobskilldb_post;
+struct HPMHookPoint *HP_mob_readskilldb_pre;
+struct HPMHookPoint *HP_mob_readskilldb_post;
+struct HPMHookPoint *HP_mob_read_sqlskilldb_pre;
+struct HPMHookPoint *HP_mob_read_sqlskilldb_post;
+struct HPMHookPoint *HP_mob_readdb_race2_pre;
+struct HPMHookPoint *HP_mob_readdb_race2_post;
+struct HPMHookPoint *HP_mob_readdb_itemratio_pre;
+struct HPMHookPoint *HP_mob_readdb_itemratio_post;
+struct HPMHookPoint *HP_mob_load_pre;
+struct HPMHookPoint *HP_mob_load_post;
+struct HPMHookPoint *HP_mob_clear_spawninfo_pre;
+struct HPMHookPoint *HP_mob_clear_spawninfo_post;
+struct HPMHookPoint *HP_npc_init_pre;
+struct HPMHookPoint *HP_npc_init_post;
+struct HPMHookPoint *HP_npc_final_pre;
+struct HPMHookPoint *HP_npc_final_post;
+struct HPMHookPoint *HP_npc_get_new_npc_id_pre;
+struct HPMHookPoint *HP_npc_get_new_npc_id_post;
+struct HPMHookPoint *HP_npc_get_viewdata_pre;
+struct HPMHookPoint *HP_npc_get_viewdata_post;
+struct HPMHookPoint *HP_npc_isnear_sub_pre;
+struct HPMHookPoint *HP_npc_isnear_sub_post;
+struct HPMHookPoint *HP_npc_isnear_pre;
+struct HPMHookPoint *HP_npc_isnear_post;
+struct HPMHookPoint *HP_npc_ontouch_event_pre;
+struct HPMHookPoint *HP_npc_ontouch_event_post;
+struct HPMHookPoint *HP_npc_ontouch2_event_pre;
+struct HPMHookPoint *HP_npc_ontouch2_event_post;
+struct HPMHookPoint *HP_npc_enable_sub_pre;
+struct HPMHookPoint *HP_npc_enable_sub_post;
+struct HPMHookPoint *HP_npc_enable_pre;
+struct HPMHookPoint *HP_npc_enable_post;
+struct HPMHookPoint *HP_npc_name2id_pre;
+struct HPMHookPoint *HP_npc_name2id_post;
+struct HPMHookPoint *HP_npc_event_dequeue_pre;
+struct HPMHookPoint *HP_npc_event_dequeue_post;
+struct HPMHookPoint *HP_npc_event_export_create_pre;
+struct HPMHookPoint *HP_npc_event_export_create_post;
+struct HPMHookPoint *HP_npc_event_export_pre;
+struct HPMHookPoint *HP_npc_event_export_post;
+struct HPMHookPoint *HP_npc_event_sub_pre;
+struct HPMHookPoint *HP_npc_event_sub_post;
+struct HPMHookPoint *HP_npc_event_doall_sub_pre;
+struct HPMHookPoint *HP_npc_event_doall_sub_post;
+struct HPMHookPoint *HP_npc_event_do_pre;
+struct HPMHookPoint *HP_npc_event_do_post;
+struct HPMHookPoint *HP_npc_event_doall_id_pre;
+struct HPMHookPoint *HP_npc_event_doall_id_post;
+struct HPMHookPoint *HP_npc_event_doall_pre;
+struct HPMHookPoint *HP_npc_event_doall_post;
+struct HPMHookPoint *HP_npc_event_do_clock_pre;
+struct HPMHookPoint *HP_npc_event_do_clock_post;
+struct HPMHookPoint *HP_npc_event_do_oninit_pre;
+struct HPMHookPoint *HP_npc_event_do_oninit_post;
+struct HPMHookPoint *HP_npc_timerevent_export_pre;
+struct HPMHookPoint *HP_npc_timerevent_export_post;
+struct HPMHookPoint *HP_npc_timerevent_pre;
+struct HPMHookPoint *HP_npc_timerevent_post;
+struct HPMHookPoint *HP_npc_timerevent_start_pre;
+struct HPMHookPoint *HP_npc_timerevent_start_post;
+struct HPMHookPoint *HP_npc_timerevent_stop_pre;
+struct HPMHookPoint *HP_npc_timerevent_stop_post;
+struct HPMHookPoint *HP_npc_timerevent_quit_pre;
+struct HPMHookPoint *HP_npc_timerevent_quit_post;
+struct HPMHookPoint *HP_npc_gettimerevent_tick_pre;
+struct HPMHookPoint *HP_npc_gettimerevent_tick_post;
+struct HPMHookPoint *HP_npc_settimerevent_tick_pre;
+struct HPMHookPoint *HP_npc_settimerevent_tick_post;
+struct HPMHookPoint *HP_npc_event_pre;
+struct HPMHookPoint *HP_npc_event_post;
+struct HPMHookPoint *HP_npc_touch_areanpc_sub_pre;
+struct HPMHookPoint *HP_npc_touch_areanpc_sub_post;
+struct HPMHookPoint *HP_npc_touchnext_areanpc_pre;
+struct HPMHookPoint *HP_npc_touchnext_areanpc_post;
+struct HPMHookPoint *HP_npc_touch_areanpc_pre;
+struct HPMHookPoint *HP_npc_touch_areanpc_post;
+struct HPMHookPoint *HP_npc_touch_areanpc2_pre;
+struct HPMHookPoint *HP_npc_touch_areanpc2_post;
+struct HPMHookPoint *HP_npc_check_areanpc_pre;
+struct HPMHookPoint *HP_npc_check_areanpc_post;
+struct HPMHookPoint *HP_npc_checknear_pre;
+struct HPMHookPoint *HP_npc_checknear_post;
+struct HPMHookPoint *HP_npc_globalmessage_pre;
+struct HPMHookPoint *HP_npc_globalmessage_post;
+struct HPMHookPoint *HP_npc_run_tomb_pre;
+struct HPMHookPoint *HP_npc_run_tomb_post;
+struct HPMHookPoint *HP_npc_click_pre;
+struct HPMHookPoint *HP_npc_click_post;
+struct HPMHookPoint *HP_npc_scriptcont_pre;
+struct HPMHookPoint *HP_npc_scriptcont_post;
+struct HPMHookPoint *HP_npc_buysellsel_pre;
+struct HPMHookPoint *HP_npc_buysellsel_post;
+struct HPMHookPoint *HP_npc_cashshop_buylist_pre;
+struct HPMHookPoint *HP_npc_cashshop_buylist_post;
+struct HPMHookPoint *HP_npc_buylist_sub_pre;
+struct HPMHookPoint *HP_npc_buylist_sub_post;
+struct HPMHookPoint *HP_npc_cashshop_buy_pre;
+struct HPMHookPoint *HP_npc_cashshop_buy_post;
+struct HPMHookPoint *HP_npc_buylist_pre;
+struct HPMHookPoint *HP_npc_buylist_post;
+struct HPMHookPoint *HP_npc_selllist_sub_pre;
+struct HPMHookPoint *HP_npc_selllist_sub_post;
+struct HPMHookPoint *HP_npc_selllist_pre;
+struct HPMHookPoint *HP_npc_selllist_post;
+struct HPMHookPoint *HP_npc_remove_map_pre;
+struct HPMHookPoint *HP_npc_remove_map_post;
+struct HPMHookPoint *HP_npc_unload_ev_pre;
+struct HPMHookPoint *HP_npc_unload_ev_post;
+struct HPMHookPoint *HP_npc_unload_ev_label_pre;
+struct HPMHookPoint *HP_npc_unload_ev_label_post;
+struct HPMHookPoint *HP_npc_unload_dup_sub_pre;
+struct HPMHookPoint *HP_npc_unload_dup_sub_post;
+struct HPMHookPoint *HP_npc_unload_duplicates_pre;
+struct HPMHookPoint *HP_npc_unload_duplicates_post;
+struct HPMHookPoint *HP_npc_unload_pre;
+struct HPMHookPoint *HP_npc_unload_post;
+struct HPMHookPoint *HP_npc_clearsrcfile_pre;
+struct HPMHookPoint *HP_npc_clearsrcfile_post;
+struct HPMHookPoint *HP_npc_addsrcfile_pre;
+struct HPMHookPoint *HP_npc_addsrcfile_post;
+struct HPMHookPoint *HP_npc_delsrcfile_pre;
+struct HPMHookPoint *HP_npc_delsrcfile_post;
+struct HPMHookPoint *HP_npc_parsename_pre;
+struct HPMHookPoint *HP_npc_parsename_post;
+struct HPMHookPoint *HP_npc_add_warp_pre;
+struct HPMHookPoint *HP_npc_add_warp_post;
+struct HPMHookPoint *HP_npc_parse_warp_pre;
+struct HPMHookPoint *HP_npc_parse_warp_post;
+struct HPMHookPoint *HP_npc_parse_shop_pre;
+struct HPMHookPoint *HP_npc_parse_shop_post;
+struct HPMHookPoint *HP_npc_convertlabel_db_pre;
+struct HPMHookPoint *HP_npc_convertlabel_db_post;
+struct HPMHookPoint *HP_npc_skip_script_pre;
+struct HPMHookPoint *HP_npc_skip_script_post;
+struct HPMHookPoint *HP_npc_parse_script_pre;
+struct HPMHookPoint *HP_npc_parse_script_post;
+struct HPMHookPoint *HP_npc_parse_duplicate_pre;
+struct HPMHookPoint *HP_npc_parse_duplicate_post;
+struct HPMHookPoint *HP_npc_duplicate4instance_pre;
+struct HPMHookPoint *HP_npc_duplicate4instance_post;
+struct HPMHookPoint *HP_npc_setcells_pre;
+struct HPMHookPoint *HP_npc_setcells_post;
+struct HPMHookPoint *HP_npc_unsetcells_sub_pre;
+struct HPMHookPoint *HP_npc_unsetcells_sub_post;
+struct HPMHookPoint *HP_npc_unsetcells_pre;
+struct HPMHookPoint *HP_npc_unsetcells_post;
+struct HPMHookPoint *HP_npc_movenpc_pre;
+struct HPMHookPoint *HP_npc_movenpc_post;
+struct HPMHookPoint *HP_npc_setdisplayname_pre;
+struct HPMHookPoint *HP_npc_setdisplayname_post;
+struct HPMHookPoint *HP_npc_setclass_pre;
+struct HPMHookPoint *HP_npc_setclass_post;
+struct HPMHookPoint *HP_npc_do_atcmd_event_pre;
+struct HPMHookPoint *HP_npc_do_atcmd_event_post;
+struct HPMHookPoint *HP_npc_parse_function_pre;
+struct HPMHookPoint *HP_npc_parse_function_post;
+struct HPMHookPoint *HP_npc_parse_mob2_pre;
+struct HPMHookPoint *HP_npc_parse_mob2_post;
+struct HPMHookPoint *HP_npc_parse_mob_pre;
+struct HPMHookPoint *HP_npc_parse_mob_post;
+struct HPMHookPoint *HP_npc_parse_mapflag_pre;
+struct HPMHookPoint *HP_npc_parse_mapflag_post;
+struct HPMHookPoint *HP_npc_parsesrcfile_pre;
+struct HPMHookPoint *HP_npc_parsesrcfile_post;
+struct HPMHookPoint *HP_npc_script_event_pre;
+struct HPMHookPoint *HP_npc_script_event_post;
+struct HPMHookPoint *HP_npc_read_event_script_pre;
+struct HPMHookPoint *HP_npc_read_event_script_post;
+struct HPMHookPoint *HP_npc_path_db_clear_sub_pre;
+struct HPMHookPoint *HP_npc_path_db_clear_sub_post;
+struct HPMHookPoint *HP_npc_ev_label_db_clear_sub_pre;
+struct HPMHookPoint *HP_npc_ev_label_db_clear_sub_post;
+struct HPMHookPoint *HP_npc_reload_pre;
+struct HPMHookPoint *HP_npc_reload_post;
+struct HPMHookPoint *HP_npc_unloadfile_pre;
+struct HPMHookPoint *HP_npc_unloadfile_post;
+struct HPMHookPoint *HP_npc_do_clear_npc_pre;
+struct HPMHookPoint *HP_npc_do_clear_npc_post;
+struct HPMHookPoint *HP_npc_debug_warps_sub_pre;
+struct HPMHookPoint *HP_npc_debug_warps_sub_post;
+struct HPMHookPoint *HP_npc_debug_warps_pre;
+struct HPMHookPoint *HP_npc_debug_warps_post;
+struct HPMHookPoint *HP_npc_secure_timeout_timer_pre;
+struct HPMHookPoint *HP_npc_secure_timeout_timer_post;
+struct HPMHookPoint *HP_party_init_pre;
+struct HPMHookPoint *HP_party_init_post;
+struct HPMHookPoint *HP_party_final_pre;
+struct HPMHookPoint *HP_party_final_post;
+struct HPMHookPoint *HP_party_search_pre;
+struct HPMHookPoint *HP_party_search_post;
+struct HPMHookPoint *HP_party_searchname_pre;
+struct HPMHookPoint *HP_party_searchname_post;
+struct HPMHookPoint *HP_party_getmemberid_pre;
+struct HPMHookPoint *HP_party_getmemberid_post;
+struct HPMHookPoint *HP_party_getavailablesd_pre;
+struct HPMHookPoint *HP_party_getavailablesd_post;
+struct HPMHookPoint *HP_party_create_pre;
+struct HPMHookPoint *HP_party_create_post;
+struct HPMHookPoint *HP_party_created_pre;
+struct HPMHookPoint *HP_party_created_post;
+struct HPMHookPoint *HP_party_request_info_pre;
+struct HPMHookPoint *HP_party_request_info_post;
+struct HPMHookPoint *HP_party_invite_pre;
+struct HPMHookPoint *HP_party_invite_post;
+struct HPMHookPoint *HP_party_member_joined_pre;
+struct HPMHookPoint *HP_party_member_joined_post;
+struct HPMHookPoint *HP_party_member_added_pre;
+struct HPMHookPoint *HP_party_member_added_post;
+struct HPMHookPoint *HP_party_leave_pre;
+struct HPMHookPoint *HP_party_leave_post;
+struct HPMHookPoint *HP_party_removemember_pre;
+struct HPMHookPoint *HP_party_removemember_post;
+struct HPMHookPoint *HP_party_member_withdraw_pre;
+struct HPMHookPoint *HP_party_member_withdraw_post;
+struct HPMHookPoint *HP_party_reply_invite_pre;
+struct HPMHookPoint *HP_party_reply_invite_post;
+struct HPMHookPoint *HP_party_recv_noinfo_pre;
+struct HPMHookPoint *HP_party_recv_noinfo_post;
+struct HPMHookPoint *HP_party_recv_info_pre;
+struct HPMHookPoint *HP_party_recv_info_post;
+struct HPMHookPoint *HP_party_recv_movemap_pre;
+struct HPMHookPoint *HP_party_recv_movemap_post;
+struct HPMHookPoint *HP_party_broken_pre;
+struct HPMHookPoint *HP_party_broken_post;
+struct HPMHookPoint *HP_party_optionchanged_pre;
+struct HPMHookPoint *HP_party_optionchanged_post;
+struct HPMHookPoint *HP_party_changeoption_pre;
+struct HPMHookPoint *HP_party_changeoption_post;
+struct HPMHookPoint *HP_party_changeleader_pre;
+struct HPMHookPoint *HP_party_changeleader_post;
+struct HPMHookPoint *HP_party_send_movemap_pre;
+struct HPMHookPoint *HP_party_send_movemap_post;
+struct HPMHookPoint *HP_party_send_levelup_pre;
+struct HPMHookPoint *HP_party_send_levelup_post;
+struct HPMHookPoint *HP_party_send_logout_pre;
+struct HPMHookPoint *HP_party_send_logout_post;
+struct HPMHookPoint *HP_party_send_message_pre;
+struct HPMHookPoint *HP_party_send_message_post;
+struct HPMHookPoint *HP_party_recv_message_pre;
+struct HPMHookPoint *HP_party_recv_message_post;
+struct HPMHookPoint *HP_party_skill_check_pre;
+struct HPMHookPoint *HP_party_skill_check_post;
+struct HPMHookPoint *HP_party_send_xy_clear_pre;
+struct HPMHookPoint *HP_party_send_xy_clear_post;
+struct HPMHookPoint *HP_party_exp_share_pre;
+struct HPMHookPoint *HP_party_exp_share_post;
+struct HPMHookPoint *HP_party_share_loot_pre;
+struct HPMHookPoint *HP_party_share_loot_post;
+struct HPMHookPoint *HP_party_send_dot_remove_pre;
+struct HPMHookPoint *HP_party_send_dot_remove_post;
+struct HPMHookPoint *HP_party_sub_count_pre;
+struct HPMHookPoint *HP_party_sub_count_post;
+struct HPMHookPoint *HP_party_booking_register_pre;
+struct HPMHookPoint *HP_party_booking_register_post;
+struct HPMHookPoint *HP_party_booking_update_pre;
+struct HPMHookPoint *HP_party_booking_update_post;
+struct HPMHookPoint *HP_party_booking_search_pre;
+struct HPMHookPoint *HP_party_booking_search_post;
+struct HPMHookPoint *HP_party_recruit_register_pre;
+struct HPMHookPoint *HP_party_recruit_register_post;
+struct HPMHookPoint *HP_party_recruit_update_pre;
+struct HPMHookPoint *HP_party_recruit_update_post;
+struct HPMHookPoint *HP_party_recruit_search_pre;
+struct HPMHookPoint *HP_party_recruit_search_post;
+struct HPMHookPoint *HP_party_booking_delete_pre;
+struct HPMHookPoint *HP_party_booking_delete_post;
+struct HPMHookPoint *HP_party_vforeachsamemap_pre;
+struct HPMHookPoint *HP_party_vforeachsamemap_post;
+struct HPMHookPoint *HP_party_send_xy_timer_pre;
+struct HPMHookPoint *HP_party_send_xy_timer_post;
+struct HPMHookPoint *HP_party_fill_member_pre;
+struct HPMHookPoint *HP_party_fill_member_post;
+struct HPMHookPoint *HP_party_sd_check_pre;
+struct HPMHookPoint *HP_party_sd_check_post;
+struct HPMHookPoint *HP_party_check_state_pre;
+struct HPMHookPoint *HP_party_check_state_post;
+struct HPMHookPoint *HP_party_create_booking_data_pre;
+struct HPMHookPoint *HP_party_create_booking_data_post;
+struct HPMHookPoint *HP_party_db_final_pre;
+struct HPMHookPoint *HP_party_db_final_post;
+struct HPMHookPoint *HP_path_blownpos_pre;
+struct HPMHookPoint *HP_path_blownpos_post;
+struct HPMHookPoint *HP_path_search_pre;
+struct HPMHookPoint *HP_path_search_post;
+struct HPMHookPoint *HP_path_search_long_pre;
+struct HPMHookPoint *HP_path_search_long_post;
+struct HPMHookPoint *HP_path_check_distance_pre;
+struct HPMHookPoint *HP_path_check_distance_post;
+struct HPMHookPoint *HP_path_distance_pre;
+struct HPMHookPoint *HP_path_distance_post;
+struct HPMHookPoint *HP_pc_init_pre;
+struct HPMHookPoint *HP_pc_init_post;
+struct HPMHookPoint *HP_pc_final_pre;
+struct HPMHookPoint *HP_pc_final_post;
+struct HPMHookPoint *HP_pc_get_dummy_sd_pre;
+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_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;
+struct HPMHookPoint *HP_pc_should_log_commands_post;
+struct HPMHookPoint *HP_pc_setrestartvalue_pre;
+struct HPMHookPoint *HP_pc_setrestartvalue_post;
+struct HPMHookPoint *HP_pc_makesavestatus_pre;
+struct HPMHookPoint *HP_pc_makesavestatus_post;
+struct HPMHookPoint *HP_pc_respawn_pre;
+struct HPMHookPoint *HP_pc_respawn_post;
+struct HPMHookPoint *HP_pc_setnewpc_pre;
+struct HPMHookPoint *HP_pc_setnewpc_post;
+struct HPMHookPoint *HP_pc_authok_pre;
+struct HPMHookPoint *HP_pc_authok_post;
+struct HPMHookPoint *HP_pc_authfail_pre;
+struct HPMHookPoint *HP_pc_authfail_post;
+struct HPMHookPoint *HP_pc_reg_received_pre;
+struct HPMHookPoint *HP_pc_reg_received_post;
+struct HPMHookPoint *HP_pc_isequip_pre;
+struct HPMHookPoint *HP_pc_isequip_post;
+struct HPMHookPoint *HP_pc_equippoint_pre;
+struct HPMHookPoint *HP_pc_equippoint_post;
+struct HPMHookPoint *HP_pc_setinventorydata_pre;
+struct HPMHookPoint *HP_pc_setinventorydata_post;
+struct HPMHookPoint *HP_pc_checkskill_pre;
+struct HPMHookPoint *HP_pc_checkskill_post;
+struct HPMHookPoint *HP_pc_checkskill2_pre;
+struct HPMHookPoint *HP_pc_checkskill2_post;
+struct HPMHookPoint *HP_pc_checkallowskill_pre;
+struct HPMHookPoint *HP_pc_checkallowskill_post;
+struct HPMHookPoint *HP_pc_checkequip_pre;
+struct HPMHookPoint *HP_pc_checkequip_post;
+struct HPMHookPoint *HP_pc_calc_skilltree_pre;
+struct HPMHookPoint *HP_pc_calc_skilltree_post;
+struct HPMHookPoint *HP_pc_calc_skilltree_normalize_job_pre;
+struct HPMHookPoint *HP_pc_calc_skilltree_normalize_job_post;
+struct HPMHookPoint *HP_pc_clean_skilltree_pre;
+struct HPMHookPoint *HP_pc_clean_skilltree_post;
+struct HPMHookPoint *HP_pc_setpos_pre;
+struct HPMHookPoint *HP_pc_setpos_post;
+struct HPMHookPoint *HP_pc_setsavepoint_pre;
+struct HPMHookPoint *HP_pc_setsavepoint_post;
+struct HPMHookPoint *HP_pc_randomwarp_pre;
+struct HPMHookPoint *HP_pc_randomwarp_post;
+struct HPMHookPoint *HP_pc_memo_pre;
+struct HPMHookPoint *HP_pc_memo_post;
+struct HPMHookPoint *HP_pc_checkadditem_pre;
+struct HPMHookPoint *HP_pc_checkadditem_post;
+struct HPMHookPoint *HP_pc_inventoryblank_pre;
+struct HPMHookPoint *HP_pc_inventoryblank_post;
+struct HPMHookPoint *HP_pc_search_inventory_pre;
+struct HPMHookPoint *HP_pc_search_inventory_post;
+struct HPMHookPoint *HP_pc_payzeny_pre;
+struct HPMHookPoint *HP_pc_payzeny_post;
+struct HPMHookPoint *HP_pc_additem_pre;
+struct HPMHookPoint *HP_pc_additem_post;
+struct HPMHookPoint *HP_pc_getzeny_pre;
+struct HPMHookPoint *HP_pc_getzeny_post;
+struct HPMHookPoint *HP_pc_delitem_pre;
+struct HPMHookPoint *HP_pc_delitem_post;
+struct HPMHookPoint *HP_pc_paycash_pre;
+struct HPMHookPoint *HP_pc_paycash_post;
+struct HPMHookPoint *HP_pc_getcash_pre;
+struct HPMHookPoint *HP_pc_getcash_post;
+struct HPMHookPoint *HP_pc_cart_additem_pre;
+struct HPMHookPoint *HP_pc_cart_additem_post;
+struct HPMHookPoint *HP_pc_cart_delitem_pre;
+struct HPMHookPoint *HP_pc_cart_delitem_post;
+struct HPMHookPoint *HP_pc_putitemtocart_pre;
+struct HPMHookPoint *HP_pc_putitemtocart_post;
+struct HPMHookPoint *HP_pc_getitemfromcart_pre;
+struct HPMHookPoint *HP_pc_getitemfromcart_post;
+struct HPMHookPoint *HP_pc_cartitem_amount_pre;
+struct HPMHookPoint *HP_pc_cartitem_amount_post;
+struct HPMHookPoint *HP_pc_takeitem_pre;
+struct HPMHookPoint *HP_pc_takeitem_post;
+struct HPMHookPoint *HP_pc_dropitem_pre;
+struct HPMHookPoint *HP_pc_dropitem_post;
+struct HPMHookPoint *HP_pc_isequipped_pre;
+struct HPMHookPoint *HP_pc_isequipped_post;
+struct HPMHookPoint *HP_pc_can_Adopt_pre;
+struct HPMHookPoint *HP_pc_can_Adopt_post;
+struct HPMHookPoint *HP_pc_adoption_pre;
+struct HPMHookPoint *HP_pc_adoption_post;
+struct HPMHookPoint *HP_pc_updateweightstatus_pre;
+struct HPMHookPoint *HP_pc_updateweightstatus_post;
+struct HPMHookPoint *HP_pc_addautobonus_pre;
+struct HPMHookPoint *HP_pc_addautobonus_post;
+struct HPMHookPoint *HP_pc_exeautobonus_pre;
+struct HPMHookPoint *HP_pc_exeautobonus_post;
+struct HPMHookPoint *HP_pc_endautobonus_pre;
+struct HPMHookPoint *HP_pc_endautobonus_post;
+struct HPMHookPoint *HP_pc_delautobonus_pre;
+struct HPMHookPoint *HP_pc_delautobonus_post;
+struct HPMHookPoint *HP_pc_bonus_pre;
+struct HPMHookPoint *HP_pc_bonus_post;
+struct HPMHookPoint *HP_pc_bonus2_pre;
+struct HPMHookPoint *HP_pc_bonus2_post;
+struct HPMHookPoint *HP_pc_bonus3_pre;
+struct HPMHookPoint *HP_pc_bonus3_post;
+struct HPMHookPoint *HP_pc_bonus4_pre;
+struct HPMHookPoint *HP_pc_bonus4_post;
+struct HPMHookPoint *HP_pc_bonus5_pre;
+struct HPMHookPoint *HP_pc_bonus5_post;
+struct HPMHookPoint *HP_pc_skill_pre;
+struct HPMHookPoint *HP_pc_skill_post;
+struct HPMHookPoint *HP_pc_insert_card_pre;
+struct HPMHookPoint *HP_pc_insert_card_post;
+struct HPMHookPoint *HP_pc_steal_item_pre;
+struct HPMHookPoint *HP_pc_steal_item_post;
+struct HPMHookPoint *HP_pc_steal_coin_pre;
+struct HPMHookPoint *HP_pc_steal_coin_post;
+struct HPMHookPoint *HP_pc_modifybuyvalue_pre;
+struct HPMHookPoint *HP_pc_modifybuyvalue_post;
+struct HPMHookPoint *HP_pc_modifysellvalue_pre;
+struct HPMHookPoint *HP_pc_modifysellvalue_post;
+struct HPMHookPoint *HP_pc_follow_pre;
+struct HPMHookPoint *HP_pc_follow_post;
+struct HPMHookPoint *HP_pc_stop_following_pre;
+struct HPMHookPoint *HP_pc_stop_following_post;
+struct HPMHookPoint *HP_pc_maxbaselv_pre;
+struct HPMHookPoint *HP_pc_maxbaselv_post;
+struct HPMHookPoint *HP_pc_maxjoblv_pre;
+struct HPMHookPoint *HP_pc_maxjoblv_post;
+struct HPMHookPoint *HP_pc_checkbaselevelup_pre;
+struct HPMHookPoint *HP_pc_checkbaselevelup_post;
+struct HPMHookPoint *HP_pc_checkjoblevelup_pre;
+struct HPMHookPoint *HP_pc_checkjoblevelup_post;
+struct HPMHookPoint *HP_pc_gainexp_pre;
+struct HPMHookPoint *HP_pc_gainexp_post;
+struct HPMHookPoint *HP_pc_nextbaseexp_pre;
+struct HPMHookPoint *HP_pc_nextbaseexp_post;
+struct HPMHookPoint *HP_pc_thisbaseexp_pre;
+struct HPMHookPoint *HP_pc_thisbaseexp_post;
+struct HPMHookPoint *HP_pc_nextjobexp_pre;
+struct HPMHookPoint *HP_pc_nextjobexp_post;
+struct HPMHookPoint *HP_pc_thisjobexp_pre;
+struct HPMHookPoint *HP_pc_thisjobexp_post;
+struct HPMHookPoint *HP_pc_gets_status_point_pre;
+struct HPMHookPoint *HP_pc_gets_status_point_post;
+struct HPMHookPoint *HP_pc_need_status_point_pre;
+struct HPMHookPoint *HP_pc_need_status_point_post;
+struct HPMHookPoint *HP_pc_statusup_pre;
+struct HPMHookPoint *HP_pc_statusup_post;
+struct HPMHookPoint *HP_pc_statusup2_pre;
+struct HPMHookPoint *HP_pc_statusup2_post;
+struct HPMHookPoint *HP_pc_skillup_pre;
+struct HPMHookPoint *HP_pc_skillup_post;
+struct HPMHookPoint *HP_pc_allskillup_pre;
+struct HPMHookPoint *HP_pc_allskillup_post;
+struct HPMHookPoint *HP_pc_resetlvl_pre;
+struct HPMHookPoint *HP_pc_resetlvl_post;
+struct HPMHookPoint *HP_pc_resetstate_pre;
+struct HPMHookPoint *HP_pc_resetstate_post;
+struct HPMHookPoint *HP_pc_resetskill_pre;
+struct HPMHookPoint *HP_pc_resetskill_post;
+struct HPMHookPoint *HP_pc_resetfeel_pre;
+struct HPMHookPoint *HP_pc_resetfeel_post;
+struct HPMHookPoint *HP_pc_resethate_pre;
+struct HPMHookPoint *HP_pc_resethate_post;
+struct HPMHookPoint *HP_pc_equipitem_pre;
+struct HPMHookPoint *HP_pc_equipitem_post;
+struct HPMHookPoint *HP_pc_unequipitem_pre;
+struct HPMHookPoint *HP_pc_unequipitem_post;
+struct HPMHookPoint *HP_pc_checkitem_pre;
+struct HPMHookPoint *HP_pc_checkitem_post;
+struct HPMHookPoint *HP_pc_useitem_pre;
+struct HPMHookPoint *HP_pc_useitem_post;
+struct HPMHookPoint *HP_pc_skillatk_bonus_pre;
+struct HPMHookPoint *HP_pc_skillatk_bonus_post;
+struct HPMHookPoint *HP_pc_skillheal_bonus_pre;
+struct HPMHookPoint *HP_pc_skillheal_bonus_post;
+struct HPMHookPoint *HP_pc_skillheal2_bonus_pre;
+struct HPMHookPoint *HP_pc_skillheal2_bonus_post;
+struct HPMHookPoint *HP_pc_damage_pre;
+struct HPMHookPoint *HP_pc_damage_post;
+struct HPMHookPoint *HP_pc_dead_pre;
+struct HPMHookPoint *HP_pc_dead_post;
+struct HPMHookPoint *HP_pc_revive_pre;
+struct HPMHookPoint *HP_pc_revive_post;
+struct HPMHookPoint *HP_pc_heal_pre;
+struct HPMHookPoint *HP_pc_heal_post;
+struct HPMHookPoint *HP_pc_itemheal_pre;
+struct HPMHookPoint *HP_pc_itemheal_post;
+struct HPMHookPoint *HP_pc_percentheal_pre;
+struct HPMHookPoint *HP_pc_percentheal_post;
+struct HPMHookPoint *HP_pc_jobchange_pre;
+struct HPMHookPoint *HP_pc_jobchange_post;
+struct HPMHookPoint *HP_pc_setoption_pre;
+struct HPMHookPoint *HP_pc_setoption_post;
+struct HPMHookPoint *HP_pc_setcart_pre;
+struct HPMHookPoint *HP_pc_setcart_post;
+struct HPMHookPoint *HP_pc_setfalcon_pre;
+struct HPMHookPoint *HP_pc_setfalcon_post;
+struct HPMHookPoint *HP_pc_setriding_pre;
+struct HPMHookPoint *HP_pc_setriding_post;
+struct HPMHookPoint *HP_pc_setmadogear_pre;
+struct HPMHookPoint *HP_pc_setmadogear_post;
+struct HPMHookPoint *HP_pc_changelook_pre;
+struct HPMHookPoint *HP_pc_changelook_post;
+struct HPMHookPoint *HP_pc_equiplookall_pre;
+struct HPMHookPoint *HP_pc_equiplookall_post;
+struct HPMHookPoint *HP_pc_readparam_pre;
+struct HPMHookPoint *HP_pc_readparam_post;
+struct HPMHookPoint *HP_pc_setparam_pre;
+struct HPMHookPoint *HP_pc_setparam_post;
+struct HPMHookPoint *HP_pc_readreg_pre;
+struct HPMHookPoint *HP_pc_readreg_post;
+struct HPMHookPoint *HP_pc_setreg_pre;
+struct HPMHookPoint *HP_pc_setreg_post;
+struct HPMHookPoint *HP_pc_readregstr_pre;
+struct HPMHookPoint *HP_pc_readregstr_post;
+struct HPMHookPoint *HP_pc_setregstr_pre;
+struct HPMHookPoint *HP_pc_setregstr_post;
+struct HPMHookPoint *HP_pc_readregistry_pre;
+struct HPMHookPoint *HP_pc_readregistry_post;
+struct HPMHookPoint *HP_pc_setregistry_pre;
+struct HPMHookPoint *HP_pc_setregistry_post;
+struct HPMHookPoint *HP_pc_readregistry_str_pre;
+struct HPMHookPoint *HP_pc_readregistry_str_post;
+struct HPMHookPoint *HP_pc_setregistry_str_pre;
+struct HPMHookPoint *HP_pc_setregistry_str_post;
+struct HPMHookPoint *HP_pc_addeventtimer_pre;
+struct HPMHookPoint *HP_pc_addeventtimer_post;
+struct HPMHookPoint *HP_pc_deleventtimer_pre;
+struct HPMHookPoint *HP_pc_deleventtimer_post;
+struct HPMHookPoint *HP_pc_cleareventtimer_pre;
+struct HPMHookPoint *HP_pc_cleareventtimer_post;
+struct HPMHookPoint *HP_pc_addeventtimercount_pre;
+struct HPMHookPoint *HP_pc_addeventtimercount_post;
+struct HPMHookPoint *HP_pc_calc_pvprank_pre;
+struct HPMHookPoint *HP_pc_calc_pvprank_post;
+struct HPMHookPoint *HP_pc_calc_pvprank_timer_pre;
+struct HPMHookPoint *HP_pc_calc_pvprank_timer_post;
+struct HPMHookPoint *HP_pc_ismarried_pre;
+struct HPMHookPoint *HP_pc_ismarried_post;
+struct HPMHookPoint *HP_pc_marriage_pre;
+struct HPMHookPoint *HP_pc_marriage_post;
+struct HPMHookPoint *HP_pc_divorce_pre;
+struct HPMHookPoint *HP_pc_divorce_post;
+struct HPMHookPoint *HP_pc_get_partner_pre;
+struct HPMHookPoint *HP_pc_get_partner_post;
+struct HPMHookPoint *HP_pc_get_father_pre;
+struct HPMHookPoint *HP_pc_get_father_post;
+struct HPMHookPoint *HP_pc_get_mother_pre;
+struct HPMHookPoint *HP_pc_get_mother_post;
+struct HPMHookPoint *HP_pc_get_child_pre;
+struct HPMHookPoint *HP_pc_get_child_post;
+struct HPMHookPoint *HP_pc_bleeding_pre;
+struct HPMHookPoint *HP_pc_bleeding_post;
+struct HPMHookPoint *HP_pc_regen_pre;
+struct HPMHookPoint *HP_pc_regen_post;
+struct HPMHookPoint *HP_pc_setstand_pre;
+struct HPMHookPoint *HP_pc_setstand_post;
+struct HPMHookPoint *HP_pc_candrop_pre;
+struct HPMHookPoint *HP_pc_candrop_post;
+struct HPMHookPoint *HP_pc_jobid2mapid_pre;
+struct HPMHookPoint *HP_pc_jobid2mapid_post;
+struct HPMHookPoint *HP_pc_mapid2jobid_pre;
+struct HPMHookPoint *HP_pc_mapid2jobid_post;
+struct HPMHookPoint *HP_pc_job_name_pre;
+struct HPMHookPoint *HP_pc_job_name_post;
+struct HPMHookPoint *HP_pc_setinvincibletimer_pre;
+struct HPMHookPoint *HP_pc_setinvincibletimer_post;
+struct HPMHookPoint *HP_pc_delinvincibletimer_pre;
+struct HPMHookPoint *HP_pc_delinvincibletimer_post;
+struct HPMHookPoint *HP_pc_addspiritball_pre;
+struct HPMHookPoint *HP_pc_addspiritball_post;
+struct HPMHookPoint *HP_pc_delspiritball_pre;
+struct HPMHookPoint *HP_pc_delspiritball_post;
+struct HPMHookPoint *HP_pc_addfame_pre;
+struct HPMHookPoint *HP_pc_addfame_post;
+struct HPMHookPoint *HP_pc_famerank_pre;
+struct HPMHookPoint *HP_pc_famerank_post;
+struct HPMHookPoint *HP_pc_set_hate_mob_pre;
+struct HPMHookPoint *HP_pc_set_hate_mob_post;
+struct HPMHookPoint *HP_pc_readdb_pre;
+struct HPMHookPoint *HP_pc_readdb_post;
+struct HPMHookPoint *HP_pc_map_day_timer_pre;
+struct HPMHookPoint *HP_pc_map_day_timer_post;
+struct HPMHookPoint *HP_pc_map_night_timer_pre;
+struct HPMHookPoint *HP_pc_map_night_timer_post;
+struct HPMHookPoint *HP_pc_inventory_rentals_pre;
+struct HPMHookPoint *HP_pc_inventory_rentals_post;
+struct HPMHookPoint *HP_pc_inventory_rental_clear_pre;
+struct HPMHookPoint *HP_pc_inventory_rental_clear_post;
+struct HPMHookPoint *HP_pc_inventory_rental_add_pre;
+struct HPMHookPoint *HP_pc_inventory_rental_add_post;
+struct HPMHookPoint *HP_pc_disguise_pre;
+struct HPMHookPoint *HP_pc_disguise_post;
+struct HPMHookPoint *HP_pc_isautolooting_pre;
+struct HPMHookPoint *HP_pc_isautolooting_post;
+struct HPMHookPoint *HP_pc_overheat_pre;
+struct HPMHookPoint *HP_pc_overheat_post;
+struct HPMHookPoint *HP_pc_banding_pre;
+struct HPMHookPoint *HP_pc_banding_post;
+struct HPMHookPoint *HP_pc_itemcd_do_pre;
+struct HPMHookPoint *HP_pc_itemcd_do_post;
+struct HPMHookPoint *HP_pc_load_combo_pre;
+struct HPMHookPoint *HP_pc_load_combo_post;
+struct HPMHookPoint *HP_pc_add_charm_pre;
+struct HPMHookPoint *HP_pc_add_charm_post;
+struct HPMHookPoint *HP_pc_del_charm_pre;
+struct HPMHookPoint *HP_pc_del_charm_post;
+struct HPMHookPoint *HP_pc_baselevelchanged_pre;
+struct HPMHookPoint *HP_pc_baselevelchanged_post;
+struct HPMHookPoint *HP_pc_level_penalty_mod_pre;
+struct HPMHookPoint *HP_pc_level_penalty_mod_post;
+struct HPMHookPoint *HP_pc_calc_skillpoint_pre;
+struct HPMHookPoint *HP_pc_calc_skillpoint_post;
+struct HPMHookPoint *HP_pc_invincible_timer_pre;
+struct HPMHookPoint *HP_pc_invincible_timer_post;
+struct HPMHookPoint *HP_pc_spiritball_timer_pre;
+struct HPMHookPoint *HP_pc_spiritball_timer_post;
+struct HPMHookPoint *HP_pc_check_banding_pre;
+struct HPMHookPoint *HP_pc_check_banding_post;
+struct HPMHookPoint *HP_pc_inventory_rental_end_pre;
+struct HPMHookPoint *HP_pc_inventory_rental_end_post;
+struct HPMHookPoint *HP_pc_check_skilltree_pre;
+struct HPMHookPoint *HP_pc_check_skilltree_post;
+struct HPMHookPoint *HP_pc_bonus_autospell_pre;
+struct HPMHookPoint *HP_pc_bonus_autospell_post;
+struct HPMHookPoint *HP_pc_bonus_autospell_onskill_pre;
+struct HPMHookPoint *HP_pc_bonus_autospell_onskill_post;
+struct HPMHookPoint *HP_pc_bonus_addeff_pre;
+struct HPMHookPoint *HP_pc_bonus_addeff_post;
+struct HPMHookPoint *HP_pc_bonus_addeff_onskill_pre;
+struct HPMHookPoint *HP_pc_bonus_addeff_onskill_post;
+struct HPMHookPoint *HP_pc_bonus_item_drop_pre;
+struct HPMHookPoint *HP_pc_bonus_item_drop_post;
+struct HPMHookPoint *HP_pc_calcexp_pre;
+struct HPMHookPoint *HP_pc_calcexp_post;
+struct HPMHookPoint *HP_pc_respawn_timer_pre;
+struct HPMHookPoint *HP_pc_respawn_timer_post;
+struct HPMHookPoint *HP_pc_jobchange_killclone_pre;
+struct HPMHookPoint *HP_pc_jobchange_killclone_post;
+struct HPMHookPoint *HP_pc_getstat_pre;
+struct HPMHookPoint *HP_pc_getstat_post;
+struct HPMHookPoint *HP_pc_setstat_pre;
+struct HPMHookPoint *HP_pc_setstat_post;
+struct HPMHookPoint *HP_pc_eventtimer_pre;
+struct HPMHookPoint *HP_pc_eventtimer_post;
+struct HPMHookPoint *HP_pc_daynight_timer_sub_pre;
+struct HPMHookPoint *HP_pc_daynight_timer_sub_post;
+struct HPMHookPoint *HP_pc_charm_timer_pre;
+struct HPMHookPoint *HP_pc_charm_timer_post;
+struct HPMHookPoint *HP_pc_readdb_levelpenalty_pre;
+struct HPMHookPoint *HP_pc_readdb_levelpenalty_post;
+struct HPMHookPoint *HP_pc_autosave_pre;
+struct HPMHookPoint *HP_pc_autosave_post;
+struct HPMHookPoint *HP_pc_follow_timer_pre;
+struct HPMHookPoint *HP_pc_follow_timer_post;
+struct HPMHookPoint *HP_pc_read_skill_tree_pre;
+struct HPMHookPoint *HP_pc_read_skill_tree_post;
+struct HPMHookPoint *HP_pc_isUseitem_pre;
+struct HPMHookPoint *HP_pc_isUseitem_post;
+struct HPMHookPoint *HP_pc_show_steal_pre;
+struct HPMHookPoint *HP_pc_show_steal_post;
+struct HPMHookPoint *HP_pc_checkcombo_pre;
+struct HPMHookPoint *HP_pc_checkcombo_post;
+struct HPMHookPoint *HP_pc_calcweapontype_pre;
+struct HPMHookPoint *HP_pc_calcweapontype_post;
+struct HPMHookPoint *HP_pc_removecombo_pre;
+struct HPMHookPoint *HP_pc_removecombo_post;
+struct HPMHookPoint *HP_pet_init_pre;
+struct HPMHookPoint *HP_pet_init_post;
+struct HPMHookPoint *HP_pet_final_pre;
+struct HPMHookPoint *HP_pet_final_post;
+struct HPMHookPoint *HP_pet_hungry_val_pre;
+struct HPMHookPoint *HP_pet_hungry_val_post;
+struct HPMHookPoint *HP_pet_set_intimate_pre;
+struct HPMHookPoint *HP_pet_set_intimate_post;
+struct HPMHookPoint *HP_pet_create_egg_pre;
+struct HPMHookPoint *HP_pet_create_egg_post;
+struct HPMHookPoint *HP_pet_unlocktarget_pre;
+struct HPMHookPoint *HP_pet_unlocktarget_post;
+struct HPMHookPoint *HP_pet_attackskill_pre;
+struct HPMHookPoint *HP_pet_attackskill_post;
+struct HPMHookPoint *HP_pet_target_check_pre;
+struct HPMHookPoint *HP_pet_target_check_post;
+struct HPMHookPoint *HP_pet_sc_check_pre;
+struct HPMHookPoint *HP_pet_sc_check_post;
+struct HPMHookPoint *HP_pet_hungry_pre;
+struct HPMHookPoint *HP_pet_hungry_post;
+struct HPMHookPoint *HP_pet_search_petDB_index_pre;
+struct HPMHookPoint *HP_pet_search_petDB_index_post;
+struct HPMHookPoint *HP_pet_hungry_timer_delete_pre;
+struct HPMHookPoint *HP_pet_hungry_timer_delete_post;
+struct HPMHookPoint *HP_pet_performance_pre;
+struct HPMHookPoint *HP_pet_performance_post;
+struct HPMHookPoint *HP_pet_return_egg_pre;
+struct HPMHookPoint *HP_pet_return_egg_post;
+struct HPMHookPoint *HP_pet_data_init_pre;
+struct HPMHookPoint *HP_pet_data_init_post;
+struct HPMHookPoint *HP_pet_birth_process_pre;
+struct HPMHookPoint *HP_pet_birth_process_post;
+struct HPMHookPoint *HP_pet_recv_petdata_pre;
+struct HPMHookPoint *HP_pet_recv_petdata_post;
+struct HPMHookPoint *HP_pet_select_egg_pre;
+struct HPMHookPoint *HP_pet_select_egg_post;
+struct HPMHookPoint *HP_pet_catch_process1_pre;
+struct HPMHookPoint *HP_pet_catch_process1_post;
+struct HPMHookPoint *HP_pet_catch_process2_pre;
+struct HPMHookPoint *HP_pet_catch_process2_post;
+struct HPMHookPoint *HP_pet_get_egg_pre;
+struct HPMHookPoint *HP_pet_get_egg_post;
+struct HPMHookPoint *HP_pet_unequipitem_pre;
+struct HPMHookPoint *HP_pet_unequipitem_post;
+struct HPMHookPoint *HP_pet_food_pre;
+struct HPMHookPoint *HP_pet_food_post;
+struct HPMHookPoint *HP_pet_ai_sub_hard_lootsearch_pre;
+struct HPMHookPoint *HP_pet_ai_sub_hard_lootsearch_post;
+struct HPMHookPoint *HP_pet_menu_pre;
+struct HPMHookPoint *HP_pet_menu_post;
+struct HPMHookPoint *HP_pet_change_name_pre;
+struct HPMHookPoint *HP_pet_change_name_post;
+struct HPMHookPoint *HP_pet_change_name_ack_pre;
+struct HPMHookPoint *HP_pet_change_name_ack_post;
+struct HPMHookPoint *HP_pet_equipitem_pre;
+struct HPMHookPoint *HP_pet_equipitem_post;
+struct HPMHookPoint *HP_pet_randomwalk_pre;
+struct HPMHookPoint *HP_pet_randomwalk_post;
+struct HPMHookPoint *HP_pet_ai_sub_hard_pre;
+struct HPMHookPoint *HP_pet_ai_sub_hard_post;
+struct HPMHookPoint *HP_pet_ai_sub_foreachclient_pre;
+struct HPMHookPoint *HP_pet_ai_sub_foreachclient_post;
+struct HPMHookPoint *HP_pet_ai_hard_pre;
+struct HPMHookPoint *HP_pet_ai_hard_post;
+struct HPMHookPoint *HP_pet_delay_item_drop_pre;
+struct HPMHookPoint *HP_pet_delay_item_drop_post;
+struct HPMHookPoint *HP_pet_lootitem_drop_pre;
+struct HPMHookPoint *HP_pet_lootitem_drop_post;
+struct HPMHookPoint *HP_pet_skill_bonus_timer_pre;
+struct HPMHookPoint *HP_pet_skill_bonus_timer_post;
+struct HPMHookPoint *HP_pet_recovery_timer_pre;
+struct HPMHookPoint *HP_pet_recovery_timer_post;
+struct HPMHookPoint *HP_pet_heal_timer_pre;
+struct HPMHookPoint *HP_pet_heal_timer_post;
+struct HPMHookPoint *HP_pet_skill_support_timer_pre;
+struct HPMHookPoint *HP_pet_skill_support_timer_post;
+struct HPMHookPoint *HP_pet_read_db_pre;
+struct HPMHookPoint *HP_pet_read_db_post;
+struct HPMHookPoint *HP_quest_init_pre;
+struct HPMHookPoint *HP_quest_init_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_pc_login_pre;
+struct HPMHookPoint *HP_quest_pc_login_post;
+struct HPMHookPoint *HP_quest_add_pre;
+struct HPMHookPoint *HP_quest_add_post;
+struct HPMHookPoint *HP_quest_change_pre;
+struct HPMHookPoint *HP_quest_change_post;
+struct HPMHookPoint *HP_quest_delete_pre;
+struct HPMHookPoint *HP_quest_delete_post;
+struct HPMHookPoint *HP_quest_update_objective_sub_pre;
+struct HPMHookPoint *HP_quest_update_objective_sub_post;
+struct HPMHookPoint *HP_quest_update_objective_pre;
+struct HPMHookPoint *HP_quest_update_objective_post;
+struct HPMHookPoint *HP_quest_update_status_pre;
+struct HPMHookPoint *HP_quest_update_status_post;
+struct HPMHookPoint *HP_quest_check_pre;
+struct HPMHookPoint *HP_quest_check_post;
+struct HPMHookPoint *HP_quest_read_db_pre;
+struct HPMHookPoint *HP_quest_read_db_post;
+struct HPMHookPoint *HP_script_init_pre;
+struct HPMHookPoint *HP_script_init_post;
+struct HPMHookPoint *HP_script_final_pre;
+struct HPMHookPoint *HP_script_final_post;
+struct HPMHookPoint *HP_script_reload_pre;
+struct HPMHookPoint *HP_script_reload_post;
+struct HPMHookPoint *HP_script_parse_pre;
+struct HPMHookPoint *HP_script_parse_post;
+struct HPMHookPoint *HP_script_parse_builtin_pre;
+struct HPMHookPoint *HP_script_parse_builtin_post;
+struct HPMHookPoint *HP_script_parse_subexpr_pre;
+struct HPMHookPoint *HP_script_parse_subexpr_post;
+struct HPMHookPoint *HP_script_skip_space_pre;
+struct HPMHookPoint *HP_script_skip_space_post;
+struct HPMHookPoint *HP_script_error_pre;
+struct HPMHookPoint *HP_script_error_post;
+struct HPMHookPoint *HP_script_warning_pre;
+struct HPMHookPoint *HP_script_warning_post;
+struct HPMHookPoint *HP_script_addScript_pre;
+struct HPMHookPoint *HP_script_addScript_post;
+struct HPMHookPoint *HP_script_conv_num_pre;
+struct HPMHookPoint *HP_script_conv_num_post;
+struct HPMHookPoint *HP_script_conv_str_pre;
+struct HPMHookPoint *HP_script_conv_str_post;
+struct HPMHookPoint *HP_script_rid2sd_pre;
+struct HPMHookPoint *HP_script_rid2sd_post;
+struct HPMHookPoint *HP_script_detach_rid_pre;
+struct HPMHookPoint *HP_script_detach_rid_post;
+struct HPMHookPoint *HP_script_push_val_pre;
+struct HPMHookPoint *HP_script_push_val_post;
+struct HPMHookPoint *HP_script_get_val_pre;
+struct HPMHookPoint *HP_script_get_val_post;
+struct HPMHookPoint *HP_script_get_val2_pre;
+struct HPMHookPoint *HP_script_get_val2_post;
+struct HPMHookPoint *HP_script_push_str_pre;
+struct HPMHookPoint *HP_script_push_str_post;
+struct HPMHookPoint *HP_script_push_copy_pre;
+struct HPMHookPoint *HP_script_push_copy_post;
+struct HPMHookPoint *HP_script_pop_stack_pre;
+struct HPMHookPoint *HP_script_pop_stack_post;
+struct HPMHookPoint *HP_script_set_constant_pre;
+struct HPMHookPoint *HP_script_set_constant_post;
+struct HPMHookPoint *HP_script_set_constant2_pre;
+struct HPMHookPoint *HP_script_set_constant2_post;
+struct HPMHookPoint *HP_script_set_constant_force_pre;
+struct HPMHookPoint *HP_script_set_constant_force_post;
+struct HPMHookPoint *HP_script_get_constant_pre;
+struct HPMHookPoint *HP_script_get_constant_post;
+struct HPMHookPoint *HP_script_label_add_pre;
+struct HPMHookPoint *HP_script_label_add_post;
+struct HPMHookPoint *HP_script_run_pre;
+struct HPMHookPoint *HP_script_run_post;
+struct HPMHookPoint *HP_script_run_main_pre;
+struct HPMHookPoint *HP_script_run_main_post;
+struct HPMHookPoint *HP_script_run_timer_pre;
+struct HPMHookPoint *HP_script_run_timer_post;
+struct HPMHookPoint *HP_script_set_var_pre;
+struct HPMHookPoint *HP_script_set_var_post;
+struct HPMHookPoint *HP_script_stop_instances_pre;
+struct HPMHookPoint *HP_script_stop_instances_post;
+struct HPMHookPoint *HP_script_free_code_pre;
+struct HPMHookPoint *HP_script_free_code_post;
+struct HPMHookPoint *HP_script_free_vars_pre;
+struct HPMHookPoint *HP_script_free_vars_post;
+struct HPMHookPoint *HP_script_alloc_state_pre;
+struct HPMHookPoint *HP_script_alloc_state_post;
+struct HPMHookPoint *HP_script_free_state_pre;
+struct HPMHookPoint *HP_script_free_state_post;
+struct HPMHookPoint *HP_script_run_autobonus_pre;
+struct HPMHookPoint *HP_script_run_autobonus_post;
+struct HPMHookPoint *HP_script_cleararray_pc_pre;
+struct HPMHookPoint *HP_script_cleararray_pc_post;
+struct HPMHookPoint *HP_script_setarray_pc_pre;
+struct HPMHookPoint *HP_script_setarray_pc_post;
+struct HPMHookPoint *HP_script_config_read_pre;
+struct HPMHookPoint *HP_script_config_read_post;
+struct HPMHookPoint *HP_script_add_str_pre;
+struct HPMHookPoint *HP_script_add_str_post;
+struct HPMHookPoint *HP_script_get_str_pre;
+struct HPMHookPoint *HP_script_get_str_post;
+struct HPMHookPoint *HP_script_search_str_pre;
+struct HPMHookPoint *HP_script_search_str_post;
+struct HPMHookPoint *HP_script_setd_sub_pre;
+struct HPMHookPoint *HP_script_setd_sub_post;
+struct HPMHookPoint *HP_script_attach_state_pre;
+struct HPMHookPoint *HP_script_attach_state_post;
+struct HPMHookPoint *HP_script_queue_pre;
+struct HPMHookPoint *HP_script_queue_post;
+struct HPMHookPoint *HP_script_queue_add_pre;
+struct HPMHookPoint *HP_script_queue_add_post;
+struct HPMHookPoint *HP_script_queue_del_pre;
+struct HPMHookPoint *HP_script_queue_del_post;
+struct HPMHookPoint *HP_script_queue_remove_pre;
+struct HPMHookPoint *HP_script_queue_remove_post;
+struct HPMHookPoint *HP_script_queue_create_pre;
+struct HPMHookPoint *HP_script_queue_create_post;
+struct HPMHookPoint *HP_script_queue_clear_pre;
+struct HPMHookPoint *HP_script_queue_clear_post;
+struct HPMHookPoint *HP_script_parse_curly_close_pre;
+struct HPMHookPoint *HP_script_parse_curly_close_post;
+struct HPMHookPoint *HP_script_parse_syntax_close_pre;
+struct HPMHookPoint *HP_script_parse_syntax_close_post;
+struct HPMHookPoint *HP_script_parse_syntax_close_sub_pre;
+struct HPMHookPoint *HP_script_parse_syntax_close_sub_post;
+struct HPMHookPoint *HP_script_parse_syntax_pre;
+struct HPMHookPoint *HP_script_parse_syntax_post;
+struct HPMHookPoint *HP_script_get_com_pre;
+struct HPMHookPoint *HP_script_get_com_post;
+struct HPMHookPoint *HP_script_get_num_pre;
+struct HPMHookPoint *HP_script_get_num_post;
+struct HPMHookPoint *HP_script_op2name_pre;
+struct HPMHookPoint *HP_script_op2name_post;
+struct HPMHookPoint *HP_script_reportsrc_pre;
+struct HPMHookPoint *HP_script_reportsrc_post;
+struct HPMHookPoint *HP_script_reportdata_pre;
+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;
+struct HPMHookPoint *HP_script_check_event_post;
+struct HPMHookPoint *HP_script_calc_hash_pre;
+struct HPMHookPoint *HP_script_calc_hash_post;
+struct HPMHookPoint *HP_script_addb_pre;
+struct HPMHookPoint *HP_script_addb_post;
+struct HPMHookPoint *HP_script_addc_pre;
+struct HPMHookPoint *HP_script_addc_post;
+struct HPMHookPoint *HP_script_addi_pre;
+struct HPMHookPoint *HP_script_addi_post;
+struct HPMHookPoint *HP_script_addl_pre;
+struct HPMHookPoint *HP_script_addl_post;
+struct HPMHookPoint *HP_script_set_label_pre;
+struct HPMHookPoint *HP_script_set_label_post;
+struct HPMHookPoint *HP_script_skip_word_pre;
+struct HPMHookPoint *HP_script_skip_word_post;
+struct HPMHookPoint *HP_script_add_word_pre;
+struct HPMHookPoint *HP_script_add_word_post;
+struct HPMHookPoint *HP_script_parse_callfunc_pre;
+struct HPMHookPoint *HP_script_parse_callfunc_post;
+struct HPMHookPoint *HP_script_parse_nextline_pre;
+struct HPMHookPoint *HP_script_parse_nextline_post;
+struct HPMHookPoint *HP_script_parse_variable_pre;
+struct HPMHookPoint *HP_script_parse_variable_post;
+struct HPMHookPoint *HP_script_parse_simpleexpr_pre;
+struct HPMHookPoint *HP_script_parse_simpleexpr_post;
+struct HPMHookPoint *HP_script_parse_expr_pre;
+struct HPMHookPoint *HP_script_parse_expr_post;
+struct HPMHookPoint *HP_script_parse_line_pre;
+struct HPMHookPoint *HP_script_parse_line_post;
+struct HPMHookPoint *HP_script_read_constdb_pre;
+struct HPMHookPoint *HP_script_read_constdb_post;
+struct HPMHookPoint *HP_script_print_line_pre;
+struct HPMHookPoint *HP_script_print_line_post;
+struct HPMHookPoint *HP_script_errorwarning_sub_pre;
+struct HPMHookPoint *HP_script_errorwarning_sub_post;
+struct HPMHookPoint *HP_script_set_reg_pre;
+struct HPMHookPoint *HP_script_set_reg_post;
+struct HPMHookPoint *HP_script_stack_expand_pre;
+struct HPMHookPoint *HP_script_stack_expand_post;
+struct HPMHookPoint *HP_script_push_retinfo_pre;
+struct HPMHookPoint *HP_script_push_retinfo_post;
+struct HPMHookPoint *HP_script_pop_val_pre;
+struct HPMHookPoint *HP_script_pop_val_post;
+struct HPMHookPoint *HP_script_op_3_pre;
+struct HPMHookPoint *HP_script_op_3_post;
+struct HPMHookPoint *HP_script_op_2str_pre;
+struct HPMHookPoint *HP_script_op_2str_post;
+struct HPMHookPoint *HP_script_op_2num_pre;
+struct HPMHookPoint *HP_script_op_2num_post;
+struct HPMHookPoint *HP_script_op_2_pre;
+struct HPMHookPoint *HP_script_op_2_post;
+struct HPMHookPoint *HP_script_op_1_pre;
+struct HPMHookPoint *HP_script_op_1_post;
+struct HPMHookPoint *HP_script_check_buildin_argtype_pre;
+struct HPMHookPoint *HP_script_check_buildin_argtype_post;
+struct HPMHookPoint *HP_script_detach_state_pre;
+struct HPMHookPoint *HP_script_detach_state_post;
+struct HPMHookPoint *HP_script_db_free_code_sub_pre;
+struct HPMHookPoint *HP_script_db_free_code_sub_post;
+struct HPMHookPoint *HP_script_add_autobonus_pre;
+struct HPMHookPoint *HP_script_add_autobonus_post;
+struct HPMHookPoint *HP_script_menu_countoptions_pre;
+struct HPMHookPoint *HP_script_menu_countoptions_post;
+struct HPMHookPoint *HP_script_buildin_areawarp_sub_pre;
+struct HPMHookPoint *HP_script_buildin_areawarp_sub_post;
+struct HPMHookPoint *HP_script_buildin_areapercentheal_sub_pre;
+struct HPMHookPoint *HP_script_buildin_areapercentheal_sub_post;
+struct HPMHookPoint *HP_script_getarraysize_pre;
+struct HPMHookPoint *HP_script_getarraysize_post;
+struct HPMHookPoint *HP_script_buildin_delitem_delete_pre;
+struct HPMHookPoint *HP_script_buildin_delitem_delete_post;
+struct HPMHookPoint *HP_script_buildin_delitem_search_pre;
+struct HPMHookPoint *HP_script_buildin_delitem_search_post;
+struct HPMHookPoint *HP_script_buildin_killmonster_sub_strip_pre;
+struct HPMHookPoint *HP_script_buildin_killmonster_sub_strip_post;
+struct HPMHookPoint *HP_script_buildin_killmonster_sub_pre;
+struct HPMHookPoint *HP_script_buildin_killmonster_sub_post;
+struct HPMHookPoint *HP_script_buildin_killmonsterall_sub_strip_pre;
+struct HPMHookPoint *HP_script_buildin_killmonsterall_sub_strip_post;
+struct HPMHookPoint *HP_script_buildin_killmonsterall_sub_pre;
+struct HPMHookPoint *HP_script_buildin_killmonsterall_sub_post;
+struct HPMHookPoint *HP_script_buildin_announce_sub_pre;
+struct HPMHookPoint *HP_script_buildin_announce_sub_post;
+struct HPMHookPoint *HP_script_buildin_getareausers_sub_pre;
+struct HPMHookPoint *HP_script_buildin_getareausers_sub_post;
+struct HPMHookPoint *HP_script_buildin_getareadropitem_sub_pre;
+struct HPMHookPoint *HP_script_buildin_getareadropitem_sub_post;
+struct HPMHookPoint *HP_script_mapflag_pvp_sub_pre;
+struct HPMHookPoint *HP_script_mapflag_pvp_sub_post;
+struct HPMHookPoint *HP_script_buildin_pvpoff_sub_pre;
+struct HPMHookPoint *HP_script_buildin_pvpoff_sub_post;
+struct HPMHookPoint *HP_script_buildin_maprespawnguildid_sub_pc_pre;
+struct HPMHookPoint *HP_script_buildin_maprespawnguildid_sub_pc_post;
+struct HPMHookPoint *HP_script_buildin_maprespawnguildid_sub_mob_pre;
+struct HPMHookPoint *HP_script_buildin_maprespawnguildid_sub_mob_post;
+struct HPMHookPoint *HP_script_buildin_mobcount_sub_pre;
+struct HPMHookPoint *HP_script_buildin_mobcount_sub_post;
+struct HPMHookPoint *HP_script_playBGM_sub_pre;
+struct HPMHookPoint *HP_script_playBGM_sub_post;
+struct HPMHookPoint *HP_script_playBGM_foreachpc_sub_pre;
+struct HPMHookPoint *HP_script_playBGM_foreachpc_sub_post;
+struct HPMHookPoint *HP_script_soundeffect_sub_pre;
+struct HPMHookPoint *HP_script_soundeffect_sub_post;
+struct HPMHookPoint *HP_script_buildin_query_sql_sub_pre;
+struct HPMHookPoint *HP_script_buildin_query_sql_sub_post;
+struct HPMHookPoint *HP_script_axtoi_pre;
+struct HPMHookPoint *HP_script_axtoi_post;
+struct HPMHookPoint *HP_script_buildin_instance_warpall_sub_pre;
+struct HPMHookPoint *HP_script_buildin_instance_warpall_sub_post;
+struct HPMHookPoint *HP_script_buildin_mobuseskill_sub_pre;
+struct HPMHookPoint *HP_script_buildin_mobuseskill_sub_post;
+struct HPMHookPoint *HP_script_cleanfloor_sub_pre;
+struct HPMHookPoint *HP_script_cleanfloor_sub_post;
+struct HPMHookPoint *HP_script_run_func_pre;
+struct HPMHookPoint *HP_script_run_func_post;
+struct HPMHookPoint *HP_searchstore_open_pre;
+struct HPMHookPoint *HP_searchstore_open_post;
+struct HPMHookPoint *HP_searchstore_query_pre;
+struct HPMHookPoint *HP_searchstore_query_post;
+struct HPMHookPoint *HP_searchstore_querynext_pre;
+struct HPMHookPoint *HP_searchstore_querynext_post;
+struct HPMHookPoint *HP_searchstore_next_pre;
+struct HPMHookPoint *HP_searchstore_next_post;
+struct HPMHookPoint *HP_searchstore_clear_pre;
+struct HPMHookPoint *HP_searchstore_clear_post;
+struct HPMHookPoint *HP_searchstore_close_pre;
+struct HPMHookPoint *HP_searchstore_close_post;
+struct HPMHookPoint *HP_searchstore_click_pre;
+struct HPMHookPoint *HP_searchstore_click_post;
+struct HPMHookPoint *HP_searchstore_queryremote_pre;
+struct HPMHookPoint *HP_searchstore_queryremote_post;
+struct HPMHookPoint *HP_searchstore_clearremote_pre;
+struct HPMHookPoint *HP_searchstore_clearremote_post;
+struct HPMHookPoint *HP_searchstore_result_pre;
+struct HPMHookPoint *HP_searchstore_result_post;
+struct HPMHookPoint *HP_skill_init_pre;
+struct HPMHookPoint *HP_skill_init_post;
+struct HPMHookPoint *HP_skill_final_pre;
+struct HPMHookPoint *HP_skill_final_post;
+struct HPMHookPoint *HP_skill_reload_pre;
+struct HPMHookPoint *HP_skill_reload_post;
+struct HPMHookPoint *HP_skill_read_db_pre;
+struct HPMHookPoint *HP_skill_read_db_post;
+struct HPMHookPoint *HP_skill_get_index_pre;
+struct HPMHookPoint *HP_skill_get_index_post;
+struct HPMHookPoint *HP_skill_get_type_pre;
+struct HPMHookPoint *HP_skill_get_type_post;
+struct HPMHookPoint *HP_skill_get_hit_pre;
+struct HPMHookPoint *HP_skill_get_hit_post;
+struct HPMHookPoint *HP_skill_get_inf_pre;
+struct HPMHookPoint *HP_skill_get_inf_post;
+struct HPMHookPoint *HP_skill_get_ele_pre;
+struct HPMHookPoint *HP_skill_get_ele_post;
+struct HPMHookPoint *HP_skill_get_nk_pre;
+struct HPMHookPoint *HP_skill_get_nk_post;
+struct HPMHookPoint *HP_skill_get_max_pre;
+struct HPMHookPoint *HP_skill_get_max_post;
+struct HPMHookPoint *HP_skill_get_range_pre;
+struct HPMHookPoint *HP_skill_get_range_post;
+struct HPMHookPoint *HP_skill_get_range2_pre;
+struct HPMHookPoint *HP_skill_get_range2_post;
+struct HPMHookPoint *HP_skill_get_splash_pre;
+struct HPMHookPoint *HP_skill_get_splash_post;
+struct HPMHookPoint *HP_skill_get_hp_pre;
+struct HPMHookPoint *HP_skill_get_hp_post;
+struct HPMHookPoint *HP_skill_get_mhp_pre;
+struct HPMHookPoint *HP_skill_get_mhp_post;
+struct HPMHookPoint *HP_skill_get_sp_pre;
+struct HPMHookPoint *HP_skill_get_sp_post;
+struct HPMHookPoint *HP_skill_get_state_pre;
+struct HPMHookPoint *HP_skill_get_state_post;
+struct HPMHookPoint *HP_skill_get_spiritball_pre;
+struct HPMHookPoint *HP_skill_get_spiritball_post;
+struct HPMHookPoint *HP_skill_get_zeny_pre;
+struct HPMHookPoint *HP_skill_get_zeny_post;
+struct HPMHookPoint *HP_skill_get_num_pre;
+struct HPMHookPoint *HP_skill_get_num_post;
+struct HPMHookPoint *HP_skill_get_cast_pre;
+struct HPMHookPoint *HP_skill_get_cast_post;
+struct HPMHookPoint *HP_skill_get_delay_pre;
+struct HPMHookPoint *HP_skill_get_delay_post;
+struct HPMHookPoint *HP_skill_get_walkdelay_pre;
+struct HPMHookPoint *HP_skill_get_walkdelay_post;
+struct HPMHookPoint *HP_skill_get_time_pre;
+struct HPMHookPoint *HP_skill_get_time_post;
+struct HPMHookPoint *HP_skill_get_time2_pre;
+struct HPMHookPoint *HP_skill_get_time2_post;
+struct HPMHookPoint *HP_skill_get_castnodex_pre;
+struct HPMHookPoint *HP_skill_get_castnodex_post;
+struct HPMHookPoint *HP_skill_get_delaynodex_pre;
+struct HPMHookPoint *HP_skill_get_delaynodex_post;
+struct HPMHookPoint *HP_skill_get_castdef_pre;
+struct HPMHookPoint *HP_skill_get_castdef_post;
+struct HPMHookPoint *HP_skill_get_weapontype_pre;
+struct HPMHookPoint *HP_skill_get_weapontype_post;
+struct HPMHookPoint *HP_skill_get_ammotype_pre;
+struct HPMHookPoint *HP_skill_get_ammotype_post;
+struct HPMHookPoint *HP_skill_get_ammo_qty_pre;
+struct HPMHookPoint *HP_skill_get_ammo_qty_post;
+struct HPMHookPoint *HP_skill_get_unit_id_pre;
+struct HPMHookPoint *HP_skill_get_unit_id_post;
+struct HPMHookPoint *HP_skill_get_inf2_pre;
+struct HPMHookPoint *HP_skill_get_inf2_post;
+struct HPMHookPoint *HP_skill_get_castcancel_pre;
+struct HPMHookPoint *HP_skill_get_castcancel_post;
+struct HPMHookPoint *HP_skill_get_maxcount_pre;
+struct HPMHookPoint *HP_skill_get_maxcount_post;
+struct HPMHookPoint *HP_skill_get_blewcount_pre;
+struct HPMHookPoint *HP_skill_get_blewcount_post;
+struct HPMHookPoint *HP_skill_get_unit_flag_pre;
+struct HPMHookPoint *HP_skill_get_unit_flag_post;
+struct HPMHookPoint *HP_skill_get_unit_target_pre;
+struct HPMHookPoint *HP_skill_get_unit_target_post;
+struct HPMHookPoint *HP_skill_get_unit_interval_pre;
+struct HPMHookPoint *HP_skill_get_unit_interval_post;
+struct HPMHookPoint *HP_skill_get_unit_bl_target_pre;
+struct HPMHookPoint *HP_skill_get_unit_bl_target_post;
+struct HPMHookPoint *HP_skill_get_unit_layout_type_pre;
+struct HPMHookPoint *HP_skill_get_unit_layout_type_post;
+struct HPMHookPoint *HP_skill_get_unit_range_pre;
+struct HPMHookPoint *HP_skill_get_unit_range_post;
+struct HPMHookPoint *HP_skill_get_cooldown_pre;
+struct HPMHookPoint *HP_skill_get_cooldown_post;
+struct HPMHookPoint *HP_skill_tree_get_max_pre;
+struct HPMHookPoint *HP_skill_tree_get_max_post;
+struct HPMHookPoint *HP_skill_get_name_pre;
+struct HPMHookPoint *HP_skill_get_name_post;
+struct HPMHookPoint *HP_skill_get_desc_pre;
+struct HPMHookPoint *HP_skill_get_desc_post;
+struct HPMHookPoint *HP_skill_chk_pre;
+struct HPMHookPoint *HP_skill_chk_post;
+struct HPMHookPoint *HP_skill_get_casttype_pre;
+struct HPMHookPoint *HP_skill_get_casttype_post;
+struct HPMHookPoint *HP_skill_get_casttype2_pre;
+struct HPMHookPoint *HP_skill_get_casttype2_post;
+struct HPMHookPoint *HP_skill_name2id_pre;
+struct HPMHookPoint *HP_skill_name2id_post;
+struct HPMHookPoint *HP_skill_isammotype_pre;
+struct HPMHookPoint *HP_skill_isammotype_post;
+struct HPMHookPoint *HP_skill_castend_id_pre;
+struct HPMHookPoint *HP_skill_castend_id_post;
+struct HPMHookPoint *HP_skill_castend_pos_pre;
+struct HPMHookPoint *HP_skill_castend_pos_post;
+struct HPMHookPoint *HP_skill_castend_map_pre;
+struct HPMHookPoint *HP_skill_castend_map_post;
+struct HPMHookPoint *HP_skill_cleartimerskill_pre;
+struct HPMHookPoint *HP_skill_cleartimerskill_post;
+struct HPMHookPoint *HP_skill_addtimerskill_pre;
+struct HPMHookPoint *HP_skill_addtimerskill_post;
+struct HPMHookPoint *HP_skill_additional_effect_pre;
+struct HPMHookPoint *HP_skill_additional_effect_post;
+struct HPMHookPoint *HP_skill_counter_additional_effect_pre;
+struct HPMHookPoint *HP_skill_counter_additional_effect_post;
+struct HPMHookPoint *HP_skill_blown_pre;
+struct HPMHookPoint *HP_skill_blown_post;
+struct HPMHookPoint *HP_skill_break_equip_pre;
+struct HPMHookPoint *HP_skill_break_equip_post;
+struct HPMHookPoint *HP_skill_strip_equip_pre;
+struct HPMHookPoint *HP_skill_strip_equip_post;
+struct HPMHookPoint *HP_skill_id2group_pre;
+struct HPMHookPoint *HP_skill_id2group_post;
+struct HPMHookPoint *HP_skill_unitsetting_pre;
+struct HPMHookPoint *HP_skill_unitsetting_post;
+struct HPMHookPoint *HP_skill_initunit_pre;
+struct HPMHookPoint *HP_skill_initunit_post;
+struct HPMHookPoint *HP_skill_delunit_pre;
+struct HPMHookPoint *HP_skill_delunit_post;
+struct HPMHookPoint *HP_skill_init_unitgroup_pre;
+struct HPMHookPoint *HP_skill_init_unitgroup_post;
+struct HPMHookPoint *HP_skill_del_unitgroup_pre;
+struct HPMHookPoint *HP_skill_del_unitgroup_post;
+struct HPMHookPoint *HP_skill_clear_unitgroup_pre;
+struct HPMHookPoint *HP_skill_clear_unitgroup_post;
+struct HPMHookPoint *HP_skill_clear_group_pre;
+struct HPMHookPoint *HP_skill_clear_group_post;
+struct HPMHookPoint *HP_skill_unit_onplace_pre;
+struct HPMHookPoint *HP_skill_unit_onplace_post;
+struct HPMHookPoint *HP_skill_unit_ondamaged_pre;
+struct HPMHookPoint *HP_skill_unit_ondamaged_post;
+struct HPMHookPoint *HP_skill_cast_fix_pre;
+struct HPMHookPoint *HP_skill_cast_fix_post;
+struct HPMHookPoint *HP_skill_cast_fix_sc_pre;
+struct HPMHookPoint *HP_skill_cast_fix_sc_post;
+struct HPMHookPoint *HP_skill_vf_cast_fix_pre;
+struct HPMHookPoint *HP_skill_vf_cast_fix_post;
+struct HPMHookPoint *HP_skill_delay_fix_pre;
+struct HPMHookPoint *HP_skill_delay_fix_post;
+struct HPMHookPoint *HP_skill_check_condition_castbegin_pre;
+struct HPMHookPoint *HP_skill_check_condition_castbegin_post;
+struct HPMHookPoint *HP_skill_check_condition_castend_pre;
+struct HPMHookPoint *HP_skill_check_condition_castend_post;
+struct HPMHookPoint *HP_skill_consume_requirement_pre;
+struct HPMHookPoint *HP_skill_consume_requirement_post;
+struct HPMHookPoint *HP_skill_get_requirement_pre;
+struct HPMHookPoint *HP_skill_get_requirement_post;
+struct HPMHookPoint *HP_skill_check_pc_partner_pre;
+struct HPMHookPoint *HP_skill_check_pc_partner_post;
+struct HPMHookPoint *HP_skill_unit_move_pre;
+struct HPMHookPoint *HP_skill_unit_move_post;
+struct HPMHookPoint *HP_skill_unit_onleft_pre;
+struct HPMHookPoint *HP_skill_unit_onleft_post;
+struct HPMHookPoint *HP_skill_unit_onout_pre;
+struct HPMHookPoint *HP_skill_unit_onout_post;
+struct HPMHookPoint *HP_skill_unit_move_unit_group_pre;
+struct HPMHookPoint *HP_skill_unit_move_unit_group_post;
+struct HPMHookPoint *HP_skill_sit_pre;
+struct HPMHookPoint *HP_skill_sit_post;
+struct HPMHookPoint *HP_skill_brandishspear_pre;
+struct HPMHookPoint *HP_skill_brandishspear_post;
+struct HPMHookPoint *HP_skill_repairweapon_pre;
+struct HPMHookPoint *HP_skill_repairweapon_post;
+struct HPMHookPoint *HP_skill_identify_pre;
+struct HPMHookPoint *HP_skill_identify_post;
+struct HPMHookPoint *HP_skill_weaponrefine_pre;
+struct HPMHookPoint *HP_skill_weaponrefine_post;
+struct HPMHookPoint *HP_skill_autospell_pre;
+struct HPMHookPoint *HP_skill_autospell_post;
+struct HPMHookPoint *HP_skill_calc_heal_pre;
+struct HPMHookPoint *HP_skill_calc_heal_post;
+struct HPMHookPoint *HP_skill_check_cloaking_pre;
+struct HPMHookPoint *HP_skill_check_cloaking_post;
+struct HPMHookPoint *HP_skill_enchant_elemental_end_pre;
+struct HPMHookPoint *HP_skill_enchant_elemental_end_post;
+struct HPMHookPoint *HP_skill_not_ok_pre;
+struct HPMHookPoint *HP_skill_not_ok_post;
+struct HPMHookPoint *HP_skill_not_ok_hom_pre;
+struct HPMHookPoint *HP_skill_not_ok_hom_post;
+struct HPMHookPoint *HP_skill_not_ok_mercenary_pre;
+struct HPMHookPoint *HP_skill_not_ok_mercenary_post;
+struct HPMHookPoint *HP_skill_chastle_mob_changetarget_pre;
+struct HPMHookPoint *HP_skill_chastle_mob_changetarget_post;
+struct HPMHookPoint *HP_skill_can_produce_mix_pre;
+struct HPMHookPoint *HP_skill_can_produce_mix_post;
+struct HPMHookPoint *HP_skill_produce_mix_pre;
+struct HPMHookPoint *HP_skill_produce_mix_post;
+struct HPMHookPoint *HP_skill_arrow_create_pre;
+struct HPMHookPoint *HP_skill_arrow_create_post;
+struct HPMHookPoint *HP_skill_castend_nodamage_id_pre;
+struct HPMHookPoint *HP_skill_castend_nodamage_id_post;
+struct HPMHookPoint *HP_skill_castend_damage_id_pre;
+struct HPMHookPoint *HP_skill_castend_damage_id_post;
+struct HPMHookPoint *HP_skill_castend_pos2_pre;
+struct HPMHookPoint *HP_skill_castend_pos2_post;
+struct HPMHookPoint *HP_skill_blockpc_start_pre;
+struct HPMHookPoint *HP_skill_blockpc_start_post;
+struct HPMHookPoint *HP_skill_blockhomun_start_pre;
+struct HPMHookPoint *HP_skill_blockhomun_start_post;
+struct HPMHookPoint *HP_skill_blockmerc_start_pre;
+struct HPMHookPoint *HP_skill_blockmerc_start_post;
+struct HPMHookPoint *HP_skill_attack_pre;
+struct HPMHookPoint *HP_skill_attack_post;
+struct HPMHookPoint *HP_skill_attack_area_pre;
+struct HPMHookPoint *HP_skill_attack_area_post;
+struct HPMHookPoint *HP_skill_area_sub_pre;
+struct HPMHookPoint *HP_skill_area_sub_post;
+struct HPMHookPoint *HP_skill_area_sub_count_pre;
+struct HPMHookPoint *HP_skill_area_sub_count_post;
+struct HPMHookPoint *HP_skill_check_unit_range_pre;
+struct HPMHookPoint *HP_skill_check_unit_range_post;
+struct HPMHookPoint *HP_skill_check_unit_range_sub_pre;
+struct HPMHookPoint *HP_skill_check_unit_range_sub_post;
+struct HPMHookPoint *HP_skill_check_unit_range2_pre;
+struct HPMHookPoint *HP_skill_check_unit_range2_post;
+struct HPMHookPoint *HP_skill_check_unit_range2_sub_pre;
+struct HPMHookPoint *HP_skill_check_unit_range2_sub_post;
+struct HPMHookPoint *HP_skill_toggle_magicpower_pre;
+struct HPMHookPoint *HP_skill_toggle_magicpower_post;
+struct HPMHookPoint *HP_skill_magic_reflect_pre;
+struct HPMHookPoint *HP_skill_magic_reflect_post;
+struct HPMHookPoint *HP_skill_onskillusage_pre;
+struct HPMHookPoint *HP_skill_onskillusage_post;
+struct HPMHookPoint *HP_skill_cell_overlap_pre;
+struct HPMHookPoint *HP_skill_cell_overlap_post;
+struct HPMHookPoint *HP_skill_timerskill_pre;
+struct HPMHookPoint *HP_skill_timerskill_post;
+struct HPMHookPoint *HP_skill_trap_splash_pre;
+struct HPMHookPoint *HP_skill_trap_splash_post;
+struct HPMHookPoint *HP_skill_check_condition_mercenary_pre;
+struct HPMHookPoint *HP_skill_check_condition_mercenary_post;
+struct HPMHookPoint *HP_skill_locate_element_field_pre;
+struct HPMHookPoint *HP_skill_locate_element_field_post;
+struct HPMHookPoint *HP_skill_graffitiremover_pre;
+struct HPMHookPoint *HP_skill_graffitiremover_post;
+struct HPMHookPoint *HP_skill_activate_reverberation_pre;
+struct HPMHookPoint *HP_skill_activate_reverberation_post;
+struct HPMHookPoint *HP_skill_dance_overlap_sub_pre;
+struct HPMHookPoint *HP_skill_dance_overlap_sub_post;
+struct HPMHookPoint *HP_skill_dance_overlap_pre;
+struct HPMHookPoint *HP_skill_dance_overlap_post;
+struct HPMHookPoint *HP_skill_get_unit_layout_pre;
+struct HPMHookPoint *HP_skill_get_unit_layout_post;
+struct HPMHookPoint *HP_skill_frostjoke_scream_pre;
+struct HPMHookPoint *HP_skill_frostjoke_scream_post;
+struct HPMHookPoint *HP_skill_greed_pre;
+struct HPMHookPoint *HP_skill_greed_post;
+struct HPMHookPoint *HP_skill_destroy_trap_pre;
+struct HPMHookPoint *HP_skill_destroy_trap_post;
+struct HPMHookPoint *HP_skill_icewall_block_pre;
+struct HPMHookPoint *HP_skill_icewall_block_post;
+struct HPMHookPoint *HP_skill_unitgrouptickset_search_pre;
+struct HPMHookPoint *HP_skill_unitgrouptickset_search_post;
+struct HPMHookPoint *HP_skill_dance_switch_pre;
+struct HPMHookPoint *HP_skill_dance_switch_post;
+struct HPMHookPoint *HP_skill_check_condition_char_sub_pre;
+struct HPMHookPoint *HP_skill_check_condition_char_sub_post;
+struct HPMHookPoint *HP_skill_check_condition_mob_master_sub_pre;
+struct HPMHookPoint *HP_skill_check_condition_mob_master_sub_post;
+struct HPMHookPoint *HP_skill_brandishspear_first_pre;
+struct HPMHookPoint *HP_skill_brandishspear_first_post;
+struct HPMHookPoint *HP_skill_brandishspear_dir_pre;
+struct HPMHookPoint *HP_skill_brandishspear_dir_post;
+struct HPMHookPoint *HP_skill_get_fixed_cast_pre;
+struct HPMHookPoint *HP_skill_get_fixed_cast_post;
+struct HPMHookPoint *HP_skill_sit_count_pre;
+struct HPMHookPoint *HP_skill_sit_count_post;
+struct HPMHookPoint *HP_skill_sit_in_pre;
+struct HPMHookPoint *HP_skill_sit_in_post;
+struct HPMHookPoint *HP_skill_sit_out_pre;
+struct HPMHookPoint *HP_skill_sit_out_post;
+struct HPMHookPoint *HP_skill_unitsetmapcell_pre;
+struct HPMHookPoint *HP_skill_unitsetmapcell_post;
+struct HPMHookPoint *HP_skill_unit_onplace_timer_pre;
+struct HPMHookPoint *HP_skill_unit_onplace_timer_post;
+struct HPMHookPoint *HP_skill_unit_effect_pre;
+struct HPMHookPoint *HP_skill_unit_effect_post;
+struct HPMHookPoint *HP_skill_unit_timer_sub_onplace_pre;
+struct HPMHookPoint *HP_skill_unit_timer_sub_onplace_post;
+struct HPMHookPoint *HP_skill_unit_move_sub_pre;
+struct HPMHookPoint *HP_skill_unit_move_sub_post;
+struct HPMHookPoint *HP_skill_blockpc_end_pre;
+struct HPMHookPoint *HP_skill_blockpc_end_post;
+struct HPMHookPoint *HP_skill_blockhomun_end_pre;
+struct HPMHookPoint *HP_skill_blockhomun_end_post;
+struct HPMHookPoint *HP_skill_blockmerc_end_pre;
+struct HPMHookPoint *HP_skill_blockmerc_end_post;
+struct HPMHookPoint *HP_skill_split_atoi_pre;
+struct HPMHookPoint *HP_skill_split_atoi_post;
+struct HPMHookPoint *HP_skill_unit_timer_pre;
+struct HPMHookPoint *HP_skill_unit_timer_post;
+struct HPMHookPoint *HP_skill_unit_timer_sub_pre;
+struct HPMHookPoint *HP_skill_unit_timer_sub_post;
+struct HPMHookPoint *HP_skill_init_unit_layout_pre;
+struct HPMHookPoint *HP_skill_init_unit_layout_post;
+struct HPMHookPoint *HP_skill_parse_row_skilldb_pre;
+struct HPMHookPoint *HP_skill_parse_row_skilldb_post;
+struct HPMHookPoint *HP_skill_parse_row_requiredb_pre;
+struct HPMHookPoint *HP_skill_parse_row_requiredb_post;
+struct HPMHookPoint *HP_skill_parse_row_castdb_pre;
+struct HPMHookPoint *HP_skill_parse_row_castdb_post;
+struct HPMHookPoint *HP_skill_parse_row_castnodexdb_pre;
+struct HPMHookPoint *HP_skill_parse_row_castnodexdb_post;
+struct HPMHookPoint *HP_skill_parse_row_unitdb_pre;
+struct HPMHookPoint *HP_skill_parse_row_unitdb_post;
+struct HPMHookPoint *HP_skill_parse_row_producedb_pre;
+struct HPMHookPoint *HP_skill_parse_row_producedb_post;
+struct HPMHookPoint *HP_skill_parse_row_createarrowdb_pre;
+struct HPMHookPoint *HP_skill_parse_row_createarrowdb_post;
+struct HPMHookPoint *HP_skill_parse_row_abradb_pre;
+struct HPMHookPoint *HP_skill_parse_row_abradb_post;
+struct HPMHookPoint *HP_skill_parse_row_spellbookdb_pre;
+struct HPMHookPoint *HP_skill_parse_row_spellbookdb_post;
+struct HPMHookPoint *HP_skill_parse_row_magicmushroomdb_pre;
+struct HPMHookPoint *HP_skill_parse_row_magicmushroomdb_post;
+struct HPMHookPoint *HP_skill_parse_row_reproducedb_pre;
+struct HPMHookPoint *HP_skill_parse_row_reproducedb_post;
+struct HPMHookPoint *HP_skill_parse_row_improvisedb_pre;
+struct HPMHookPoint *HP_skill_parse_row_improvisedb_post;
+struct HPMHookPoint *HP_skill_parse_row_changematerialdb_pre;
+struct HPMHookPoint *HP_skill_parse_row_changematerialdb_post;
+struct HPMHookPoint *HP_skill_usave_add_pre;
+struct HPMHookPoint *HP_skill_usave_add_post;
+struct HPMHookPoint *HP_skill_usave_trigger_pre;
+struct HPMHookPoint *HP_skill_usave_trigger_post;
+struct HPMHookPoint *HP_skill_cooldown_load_pre;
+struct HPMHookPoint *HP_skill_cooldown_load_post;
+struct HPMHookPoint *HP_skill_spellbook_pre;
+struct HPMHookPoint *HP_skill_spellbook_post;
+struct HPMHookPoint *HP_skill_block_check_pre;
+struct HPMHookPoint *HP_skill_block_check_post;
+struct HPMHookPoint *HP_skill_detonator_pre;
+struct HPMHookPoint *HP_skill_detonator_post;
+struct HPMHookPoint *HP_skill_check_camouflage_pre;
+struct HPMHookPoint *HP_skill_check_camouflage_post;
+struct HPMHookPoint *HP_skill_magicdecoy_pre;
+struct HPMHookPoint *HP_skill_magicdecoy_post;
+struct HPMHookPoint *HP_skill_poisoningweapon_pre;
+struct HPMHookPoint *HP_skill_poisoningweapon_post;
+struct HPMHookPoint *HP_skill_select_menu_pre;
+struct HPMHookPoint *HP_skill_select_menu_post;
+struct HPMHookPoint *HP_skill_elementalanalysis_pre;
+struct HPMHookPoint *HP_skill_elementalanalysis_post;
+struct HPMHookPoint *HP_skill_changematerial_pre;
+struct HPMHookPoint *HP_skill_changematerial_post;
+struct HPMHookPoint *HP_skill_get_elemental_type_pre;
+struct HPMHookPoint *HP_skill_get_elemental_type_post;
+struct HPMHookPoint *HP_skill_cooldown_save_pre;
+struct HPMHookPoint *HP_skill_cooldown_save_post;
+struct HPMHookPoint *HP_skill_maelstrom_suction_pre;
+struct HPMHookPoint *HP_skill_maelstrom_suction_post;
+struct HPMHookPoint *HP_skill_get_new_group_id_pre;
+struct HPMHookPoint *HP_skill_get_new_group_id_post;
+struct HPMHookPoint *HP_status_init_pre;
+struct HPMHookPoint *HP_status_init_post;
+struct HPMHookPoint *HP_status_final_pre;
+struct HPMHookPoint *HP_status_final_post;
+struct HPMHookPoint *HP_status_get_refine_chance_pre;
+struct HPMHookPoint *HP_status_get_refine_chance_post;
+struct HPMHookPoint *HP_status_skill2sc_pre;
+struct HPMHookPoint *HP_status_skill2sc_post;
+struct HPMHookPoint *HP_status_sc2skill_pre;
+struct HPMHookPoint *HP_status_sc2skill_post;
+struct HPMHookPoint *HP_status_sc2scb_flag_pre;
+struct HPMHookPoint *HP_status_sc2scb_flag_post;
+struct HPMHookPoint *HP_status_type2relevant_bl_types_pre;
+struct HPMHookPoint *HP_status_type2relevant_bl_types_post;
+struct HPMHookPoint *HP_status_get_sc_type_pre;
+struct HPMHookPoint *HP_status_get_sc_type_post;
+struct HPMHookPoint *HP_status_damage_pre;
+struct HPMHookPoint *HP_status_damage_post;
+struct HPMHookPoint *HP_status_charge_pre;
+struct HPMHookPoint *HP_status_charge_post;
+struct HPMHookPoint *HP_status_percent_change_pre;
+struct HPMHookPoint *HP_status_percent_change_post;
+struct HPMHookPoint *HP_status_set_hp_pre;
+struct HPMHookPoint *HP_status_set_hp_post;
+struct HPMHookPoint *HP_status_set_sp_pre;
+struct HPMHookPoint *HP_status_set_sp_post;
+struct HPMHookPoint *HP_status_heal_pre;
+struct HPMHookPoint *HP_status_heal_post;
+struct HPMHookPoint *HP_status_revive_pre;
+struct HPMHookPoint *HP_status_revive_post;
+struct HPMHookPoint *HP_status_get_regen_data_pre;
+struct HPMHookPoint *HP_status_get_regen_data_post;
+struct HPMHookPoint *HP_status_get_status_data_pre;
+struct HPMHookPoint *HP_status_get_status_data_post;
+struct HPMHookPoint *HP_status_get_base_status_pre;
+struct HPMHookPoint *HP_status_get_base_status_post;
+struct HPMHookPoint *HP_status_get_name_pre;
+struct HPMHookPoint *HP_status_get_name_post;
+struct HPMHookPoint *HP_status_get_class_pre;
+struct HPMHookPoint *HP_status_get_class_post;
+struct HPMHookPoint *HP_status_get_lv_pre;
+struct HPMHookPoint *HP_status_get_lv_post;
+struct HPMHookPoint *HP_status_get_def_pre;
+struct HPMHookPoint *HP_status_get_def_post;
+struct HPMHookPoint *HP_status_get_speed_pre;
+struct HPMHookPoint *HP_status_get_speed_post;
+struct HPMHookPoint *HP_status_calc_attack_element_pre;
+struct HPMHookPoint *HP_status_calc_attack_element_post;
+struct HPMHookPoint *HP_status_get_party_id_pre;
+struct HPMHookPoint *HP_status_get_party_id_post;
+struct HPMHookPoint *HP_status_get_guild_id_pre;
+struct HPMHookPoint *HP_status_get_guild_id_post;
+struct HPMHookPoint *HP_status_get_emblem_id_pre;
+struct HPMHookPoint *HP_status_get_emblem_id_post;
+struct HPMHookPoint *HP_status_get_mexp_pre;
+struct HPMHookPoint *HP_status_get_mexp_post;
+struct HPMHookPoint *HP_status_get_race2_pre;
+struct HPMHookPoint *HP_status_get_race2_post;
+struct HPMHookPoint *HP_status_get_viewdata_pre;
+struct HPMHookPoint *HP_status_get_viewdata_post;
+struct HPMHookPoint *HP_status_set_viewdata_pre;
+struct HPMHookPoint *HP_status_set_viewdata_post;
+struct HPMHookPoint *HP_status_change_init_pre;
+struct HPMHookPoint *HP_status_change_init_post;
+struct HPMHookPoint *HP_status_get_sc_pre;
+struct HPMHookPoint *HP_status_get_sc_post;
+struct HPMHookPoint *HP_status_isdead_pre;
+struct HPMHookPoint *HP_status_isdead_post;
+struct HPMHookPoint *HP_status_isimmune_pre;
+struct HPMHookPoint *HP_status_isimmune_post;
+struct HPMHookPoint *HP_status_get_sc_def_pre;
+struct HPMHookPoint *HP_status_get_sc_def_post;
+struct HPMHookPoint *HP_status_change_start_pre;
+struct HPMHookPoint *HP_status_change_start_post;
+struct HPMHookPoint *HP_status_change_end__pre;
+struct HPMHookPoint *HP_status_change_end__post;
+struct HPMHookPoint *HP_status_kaahi_heal_timer_pre;
+struct HPMHookPoint *HP_status_kaahi_heal_timer_post;
+struct HPMHookPoint *HP_status_change_timer_pre;
+struct HPMHookPoint *HP_status_change_timer_post;
+struct HPMHookPoint *HP_status_change_timer_sub_pre;
+struct HPMHookPoint *HP_status_change_timer_sub_post;
+struct HPMHookPoint *HP_status_change_clear_pre;
+struct HPMHookPoint *HP_status_change_clear_post;
+struct HPMHookPoint *HP_status_change_clear_buffs_pre;
+struct HPMHookPoint *HP_status_change_clear_buffs_post;
+struct HPMHookPoint *HP_status_calc_bl__pre;
+struct HPMHookPoint *HP_status_calc_bl__post;
+struct HPMHookPoint *HP_status_calc_mob__pre;
+struct HPMHookPoint *HP_status_calc_mob__post;
+struct HPMHookPoint *HP_status_calc_pet__pre;
+struct HPMHookPoint *HP_status_calc_pet__post;
+struct HPMHookPoint *HP_status_calc_pc__pre;
+struct HPMHookPoint *HP_status_calc_pc__post;
+struct HPMHookPoint *HP_status_calc_homunculus__pre;
+struct HPMHookPoint *HP_status_calc_homunculus__post;
+struct HPMHookPoint *HP_status_calc_mercenary__pre;
+struct HPMHookPoint *HP_status_calc_mercenary__post;
+struct HPMHookPoint *HP_status_calc_elemental__pre;
+struct HPMHookPoint *HP_status_calc_elemental__post;
+struct HPMHookPoint *HP_status_calc_misc_pre;
+struct HPMHookPoint *HP_status_calc_misc_post;
+struct HPMHookPoint *HP_status_calc_regen_pre;
+struct HPMHookPoint *HP_status_calc_regen_post;
+struct HPMHookPoint *HP_status_calc_regen_rate_pre;
+struct HPMHookPoint *HP_status_calc_regen_rate_post;
+struct HPMHookPoint *HP_status_check_skilluse_pre;
+struct HPMHookPoint *HP_status_check_skilluse_post;
+struct HPMHookPoint *HP_status_check_visibility_pre;
+struct HPMHookPoint *HP_status_check_visibility_post;
+struct HPMHookPoint *HP_status_change_spread_pre;
+struct HPMHookPoint *HP_status_change_spread_post;
+struct HPMHookPoint *HP_status_calc_def_pre;
+struct HPMHookPoint *HP_status_calc_def_post;
+struct HPMHookPoint *HP_status_calc_def2_pre;
+struct HPMHookPoint *HP_status_calc_def2_post;
+struct HPMHookPoint *HP_status_calc_mdef_pre;
+struct HPMHookPoint *HP_status_calc_mdef_post;
+struct HPMHookPoint *HP_status_calc_mdef2_pre;
+struct HPMHookPoint *HP_status_calc_mdef2_post;
+struct HPMHookPoint *HP_status_calc_batk_pre;
+struct HPMHookPoint *HP_status_calc_batk_post;
+struct HPMHookPoint *HP_status_base_matk_pre;
+struct HPMHookPoint *HP_status_base_matk_post;
+struct HPMHookPoint *HP_status_get_weapon_atk_pre;
+struct HPMHookPoint *HP_status_get_weapon_atk_post;
+struct HPMHookPoint *HP_status_get_total_mdef_pre;
+struct HPMHookPoint *HP_status_get_total_mdef_post;
+struct HPMHookPoint *HP_status_get_total_def_pre;
+struct HPMHookPoint *HP_status_get_total_def_post;
+struct HPMHookPoint *HP_status_get_matk_pre;
+struct HPMHookPoint *HP_status_get_matk_post;
+struct HPMHookPoint *HP_status_readdb_pre;
+struct HPMHookPoint *HP_status_readdb_post;
+struct HPMHookPoint *HP_status_initChangeTables_pre;
+struct HPMHookPoint *HP_status_initChangeTables_post;
+struct HPMHookPoint *HP_status_initDummyData_pre;
+struct HPMHookPoint *HP_status_initDummyData_post;
+struct HPMHookPoint *HP_status_base_amotion_pc_pre;
+struct HPMHookPoint *HP_status_base_amotion_pc_post;
+struct HPMHookPoint *HP_status_base_atk_pre;
+struct HPMHookPoint *HP_status_base_atk_post;
+struct HPMHookPoint *HP_status_calc_sigma_pre;
+struct HPMHookPoint *HP_status_calc_sigma_post;
+struct HPMHookPoint *HP_status_base_pc_maxhp_pre;
+struct HPMHookPoint *HP_status_base_pc_maxhp_post;
+struct HPMHookPoint *HP_status_base_pc_maxsp_pre;
+struct HPMHookPoint *HP_status_base_pc_maxsp_post;
+struct HPMHookPoint *HP_status_calc_npc__pre;
+struct HPMHookPoint *HP_status_calc_npc__post;
+struct HPMHookPoint *HP_status_calc_str_pre;
+struct HPMHookPoint *HP_status_calc_str_post;
+struct HPMHookPoint *HP_status_calc_agi_pre;
+struct HPMHookPoint *HP_status_calc_agi_post;
+struct HPMHookPoint *HP_status_calc_vit_pre;
+struct HPMHookPoint *HP_status_calc_vit_post;
+struct HPMHookPoint *HP_status_calc_int_pre;
+struct HPMHookPoint *HP_status_calc_int_post;
+struct HPMHookPoint *HP_status_calc_dex_pre;
+struct HPMHookPoint *HP_status_calc_dex_post;
+struct HPMHookPoint *HP_status_calc_luk_pre;
+struct HPMHookPoint *HP_status_calc_luk_post;
+struct HPMHookPoint *HP_status_calc_watk_pre;
+struct HPMHookPoint *HP_status_calc_watk_post;
+struct HPMHookPoint *HP_status_calc_matk_pre;
+struct HPMHookPoint *HP_status_calc_matk_post;
+struct HPMHookPoint *HP_status_calc_hit_pre;
+struct HPMHookPoint *HP_status_calc_hit_post;
+struct HPMHookPoint *HP_status_calc_critical_pre;
+struct HPMHookPoint *HP_status_calc_critical_post;
+struct HPMHookPoint *HP_status_calc_flee_pre;
+struct HPMHookPoint *HP_status_calc_flee_post;
+struct HPMHookPoint *HP_status_calc_flee2_pre;
+struct HPMHookPoint *HP_status_calc_flee2_post;
+struct HPMHookPoint *HP_status_calc_speed_pre;
+struct HPMHookPoint *HP_status_calc_speed_post;
+struct HPMHookPoint *HP_status_calc_aspd_rate_pre;
+struct HPMHookPoint *HP_status_calc_aspd_rate_post;
+struct HPMHookPoint *HP_status_calc_dmotion_pre;
+struct HPMHookPoint *HP_status_calc_dmotion_post;
+struct HPMHookPoint *HP_status_calc_aspd_pre;
+struct HPMHookPoint *HP_status_calc_aspd_post;
+struct HPMHookPoint *HP_status_calc_fix_aspd_pre;
+struct HPMHookPoint *HP_status_calc_fix_aspd_post;
+struct HPMHookPoint *HP_status_calc_maxhp_pre;
+struct HPMHookPoint *HP_status_calc_maxhp_post;
+struct HPMHookPoint *HP_status_calc_maxsp_pre;
+struct HPMHookPoint *HP_status_calc_maxsp_post;
+struct HPMHookPoint *HP_status_calc_element_pre;
+struct HPMHookPoint *HP_status_calc_element_post;
+struct HPMHookPoint *HP_status_calc_element_lv_pre;
+struct HPMHookPoint *HP_status_calc_element_lv_post;
+struct HPMHookPoint *HP_status_calc_mode_pre;
+struct HPMHookPoint *HP_status_calc_mode_post;
+struct HPMHookPoint *HP_status_calc_ematk_pre;
+struct HPMHookPoint *HP_status_calc_ematk_post;
+struct HPMHookPoint *HP_status_calc_bl_main_pre;
+struct HPMHookPoint *HP_status_calc_bl_main_post;
+struct HPMHookPoint *HP_status_display_add_pre;
+struct HPMHookPoint *HP_status_display_add_post;
+struct HPMHookPoint *HP_status_display_remove_pre;
+struct HPMHookPoint *HP_status_display_remove_post;
+struct HPMHookPoint *HP_status_natural_heal_pre;
+struct HPMHookPoint *HP_status_natural_heal_post;
+struct HPMHookPoint *HP_status_natural_heal_timer_pre;
+struct HPMHookPoint *HP_status_natural_heal_timer_post;
+struct HPMHookPoint *HP_status_readdb_job1_pre;
+struct HPMHookPoint *HP_status_readdb_job1_post;
+struct HPMHookPoint *HP_status_readdb_job2_pre;
+struct HPMHookPoint *HP_status_readdb_job2_post;
+struct HPMHookPoint *HP_status_readdb_sizefix_pre;
+struct HPMHookPoint *HP_status_readdb_sizefix_post;
+struct HPMHookPoint *HP_status_readdb_refine_pre;
+struct HPMHookPoint *HP_status_readdb_refine_post;
+struct HPMHookPoint *HP_status_readdb_scconfig_pre;
+struct HPMHookPoint *HP_status_readdb_scconfig_post;
+struct HPMHookPoint *HP_storage_reconnect_pre;
+struct HPMHookPoint *HP_storage_reconnect_post;
+struct HPMHookPoint *HP_storage_delitem_pre;
+struct HPMHookPoint *HP_storage_delitem_post;
+struct HPMHookPoint *HP_storage_open_pre;
+struct HPMHookPoint *HP_storage_open_post;
+struct HPMHookPoint *HP_storage_add_pre;
+struct HPMHookPoint *HP_storage_add_post;
+struct HPMHookPoint *HP_storage_get_pre;
+struct HPMHookPoint *HP_storage_get_post;
+struct HPMHookPoint *HP_storage_additem_pre;
+struct HPMHookPoint *HP_storage_additem_post;
+struct HPMHookPoint *HP_storage_addfromcart_pre;
+struct HPMHookPoint *HP_storage_addfromcart_post;
+struct HPMHookPoint *HP_storage_gettocart_pre;
+struct HPMHookPoint *HP_storage_gettocart_post;
+struct HPMHookPoint *HP_storage_close_pre;
+struct HPMHookPoint *HP_storage_close_post;
+struct HPMHookPoint *HP_storage_pc_quit_pre;
+struct HPMHookPoint *HP_storage_pc_quit_post;
+struct HPMHookPoint *HP_storage_comp_item_pre;
+struct HPMHookPoint *HP_storage_comp_item_post;
+struct HPMHookPoint *HP_storage_sortitem_pre;
+struct HPMHookPoint *HP_storage_sortitem_post;
+struct HPMHookPoint *HP_storage_reconnect_sub_pre;
+struct HPMHookPoint *HP_storage_reconnect_sub_post;
+struct HPMHookPoint *HP_trade_request_pre;
+struct HPMHookPoint *HP_trade_request_post;
+struct HPMHookPoint *HP_trade_ack_pre;
+struct HPMHookPoint *HP_trade_ack_post;
+struct HPMHookPoint *HP_trade_check_impossible_pre;
+struct HPMHookPoint *HP_trade_check_impossible_post;
+struct HPMHookPoint *HP_trade_check_pre;
+struct HPMHookPoint *HP_trade_check_post;
+struct HPMHookPoint *HP_trade_additem_pre;
+struct HPMHookPoint *HP_trade_additem_post;
+struct HPMHookPoint *HP_trade_addzeny_pre;
+struct HPMHookPoint *HP_trade_addzeny_post;
+struct HPMHookPoint *HP_trade_ok_pre;
+struct HPMHookPoint *HP_trade_ok_post;
+struct HPMHookPoint *HP_trade_cancel_pre;
+struct HPMHookPoint *HP_trade_cancel_post;
+struct HPMHookPoint *HP_trade_commit_pre;
+struct HPMHookPoint *HP_trade_commit_post;
+struct HPMHookPoint *HP_unit_init_pre;
+struct HPMHookPoint *HP_unit_init_post;
+struct HPMHookPoint *HP_unit_final_pre;
+struct HPMHookPoint *HP_unit_final_post;
+struct HPMHookPoint *HP_unit_bl2ud_pre;
+struct HPMHookPoint *HP_unit_bl2ud_post;
+struct HPMHookPoint *HP_unit_bl2ud2_pre;
+struct HPMHookPoint *HP_unit_bl2ud2_post;
+struct HPMHookPoint *HP_unit_attack_timer_pre;
+struct HPMHookPoint *HP_unit_attack_timer_post;
+struct HPMHookPoint *HP_unit_walktoxy_timer_pre;
+struct HPMHookPoint *HP_unit_walktoxy_timer_post;
+struct HPMHookPoint *HP_unit_walktoxy_sub_pre;
+struct HPMHookPoint *HP_unit_walktoxy_sub_post;
+struct HPMHookPoint *HP_unit_delay_walktoxy_timer_pre;
+struct HPMHookPoint *HP_unit_delay_walktoxy_timer_post;
+struct HPMHookPoint *HP_unit_walktoxy_pre;
+struct HPMHookPoint *HP_unit_walktoxy_post;
+struct HPMHookPoint *HP_unit_walktobl_sub_pre;
+struct HPMHookPoint *HP_unit_walktobl_sub_post;
+struct HPMHookPoint *HP_unit_walktobl_pre;
+struct HPMHookPoint *HP_unit_walktobl_post;
+struct HPMHookPoint *HP_unit_run_pre;
+struct HPMHookPoint *HP_unit_run_post;
+struct HPMHookPoint *HP_unit_wugdash_pre;
+struct HPMHookPoint *HP_unit_wugdash_post;
+struct HPMHookPoint *HP_unit_escape_pre;
+struct HPMHookPoint *HP_unit_escape_post;
+struct HPMHookPoint *HP_unit_movepos_pre;
+struct HPMHookPoint *HP_unit_movepos_post;
+struct HPMHookPoint *HP_unit_setdir_pre;
+struct HPMHookPoint *HP_unit_setdir_post;
+struct HPMHookPoint *HP_unit_getdir_pre;
+struct HPMHookPoint *HP_unit_getdir_post;
+struct HPMHookPoint *HP_unit_blown_pre;
+struct HPMHookPoint *HP_unit_blown_post;
+struct HPMHookPoint *HP_unit_warp_pre;
+struct HPMHookPoint *HP_unit_warp_post;
+struct HPMHookPoint *HP_unit_stop_walking_pre;
+struct HPMHookPoint *HP_unit_stop_walking_post;
+struct HPMHookPoint *HP_unit_skilluse_id_pre;
+struct HPMHookPoint *HP_unit_skilluse_id_post;
+struct HPMHookPoint *HP_unit_is_walking_pre;
+struct HPMHookPoint *HP_unit_is_walking_post;
+struct HPMHookPoint *HP_unit_can_move_pre;
+struct HPMHookPoint *HP_unit_can_move_post;
+struct HPMHookPoint *HP_unit_resume_running_pre;
+struct HPMHookPoint *HP_unit_resume_running_post;
+struct HPMHookPoint *HP_unit_set_walkdelay_pre;
+struct HPMHookPoint *HP_unit_set_walkdelay_post;
+struct HPMHookPoint *HP_unit_skilluse_id2_pre;
+struct HPMHookPoint *HP_unit_skilluse_id2_post;
+struct HPMHookPoint *HP_unit_skilluse_pos_pre;
+struct HPMHookPoint *HP_unit_skilluse_pos_post;
+struct HPMHookPoint *HP_unit_skilluse_pos2_pre;
+struct HPMHookPoint *HP_unit_skilluse_pos2_post;
+struct HPMHookPoint *HP_unit_set_target_pre;
+struct HPMHookPoint *HP_unit_set_target_post;
+struct HPMHookPoint *HP_unit_stop_attack_pre;
+struct HPMHookPoint *HP_unit_stop_attack_post;
+struct HPMHookPoint *HP_unit_unattackable_pre;
+struct HPMHookPoint *HP_unit_unattackable_post;
+struct HPMHookPoint *HP_unit_attack_pre;
+struct HPMHookPoint *HP_unit_attack_post;
+struct HPMHookPoint *HP_unit_cancel_combo_pre;
+struct HPMHookPoint *HP_unit_cancel_combo_post;
+struct HPMHookPoint *HP_unit_can_reach_pos_pre;
+struct HPMHookPoint *HP_unit_can_reach_pos_post;
+struct HPMHookPoint *HP_unit_can_reach_bl_pre;
+struct HPMHookPoint *HP_unit_can_reach_bl_post;
+struct HPMHookPoint *HP_unit_calc_pos_pre;
+struct HPMHookPoint *HP_unit_calc_pos_post;
+struct HPMHookPoint *HP_unit_attack_timer_sub_pre;
+struct HPMHookPoint *HP_unit_attack_timer_sub_post;
+struct HPMHookPoint *HP_unit_skillcastcancel_pre;
+struct HPMHookPoint *HP_unit_skillcastcancel_post;
+struct HPMHookPoint *HP_unit_dataset_pre;
+struct HPMHookPoint *HP_unit_dataset_post;
+struct HPMHookPoint *HP_unit_counttargeted_pre;
+struct HPMHookPoint *HP_unit_counttargeted_post;
+struct HPMHookPoint *HP_unit_fixdamage_pre;
+struct HPMHookPoint *HP_unit_fixdamage_post;
+struct HPMHookPoint *HP_unit_changeviewsize_pre;
+struct HPMHookPoint *HP_unit_changeviewsize_post;
+struct HPMHookPoint *HP_unit_remove_map_pre;
+struct HPMHookPoint *HP_unit_remove_map_post;
+struct HPMHookPoint *HP_unit_remove_map_pc_pre;
+struct HPMHookPoint *HP_unit_remove_map_pc_post;
+struct HPMHookPoint *HP_unit_free_pc_pre;
+struct HPMHookPoint *HP_unit_free_pc_post;
+struct HPMHookPoint *HP_unit_free_pre;
+struct HPMHookPoint *HP_unit_free_post;
+struct HPMHookPoint *HP_vending_init_pre;
+struct HPMHookPoint *HP_vending_init_post;
+struct HPMHookPoint *HP_vending_final_pre;
+struct HPMHookPoint *HP_vending_final_post;
+struct HPMHookPoint *HP_vending_close_pre;
+struct HPMHookPoint *HP_vending_close_post;
+struct HPMHookPoint *HP_vending_open_pre;
+struct HPMHookPoint *HP_vending_open_post;
+struct HPMHookPoint *HP_vending_list_pre;
+struct HPMHookPoint *HP_vending_list_post;
+struct HPMHookPoint *HP_vending_purchase_pre;
+struct HPMHookPoint *HP_vending_purchase_post;
+struct HPMHookPoint *HP_vending_search_pre;
+struct HPMHookPoint *HP_vending_search_post;
+struct HPMHookPoint *HP_vending_searchall_pre;
+struct HPMHookPoint *HP_vending_searchall_post;
+} list;
+struct {
+int HP_atcommand_init_pre;
+int HP_atcommand_init_post;
+int HP_atcommand_final_pre;
+int HP_atcommand_final_post;
+int HP_atcommand_parse_pre;
+int HP_atcommand_parse_post;
+int HP_atcommand_create_pre;
+int HP_atcommand_create_post;
+int HP_atcommand_can_use_pre;
+int HP_atcommand_can_use_post;
+int HP_atcommand_can_use2_pre;
+int HP_atcommand_can_use2_post;
+int HP_atcommand_load_groups_pre;
+int HP_atcommand_load_groups_post;
+int HP_atcommand_exists_pre;
+int HP_atcommand_exists_post;
+int HP_atcommand_msg_read_pre;
+int HP_atcommand_msg_read_post;
+int HP_atcommand_final_msg_pre;
+int HP_atcommand_final_msg_post;
+int HP_atcommand_get_bind_byname_pre;
+int HP_atcommand_get_bind_byname_post;
+int HP_atcommand_get_info_byname_pre;
+int HP_atcommand_get_info_byname_post;
+int HP_atcommand_check_alias_pre;
+int HP_atcommand_check_alias_post;
+int HP_atcommand_get_suggestions_pre;
+int HP_atcommand_get_suggestions_post;
+int HP_atcommand_config_read_pre;
+int HP_atcommand_config_read_post;
+int HP_atcommand_stopattack_pre;
+int HP_atcommand_stopattack_post;
+int HP_atcommand_pvpoff_sub_pre;
+int HP_atcommand_pvpoff_sub_post;
+int HP_atcommand_pvpon_sub_pre;
+int HP_atcommand_pvpon_sub_post;
+int HP_atcommand_atkillmonster_sub_pre;
+int HP_atcommand_atkillmonster_sub_post;
+int HP_atcommand_raise_sub_pre;
+int HP_atcommand_raise_sub_post;
+int HP_atcommand_get_jail_time_pre;
+int HP_atcommand_get_jail_time_post;
+int HP_atcommand_cleanfloor_sub_pre;
+int HP_atcommand_cleanfloor_sub_post;
+int HP_atcommand_mutearea_sub_pre;
+int HP_atcommand_mutearea_sub_post;
+int HP_atcommand_commands_sub_pre;
+int HP_atcommand_commands_sub_post;
+int HP_atcommand_cmd_db_clear_pre;
+int HP_atcommand_cmd_db_clear_post;
+int HP_atcommand_cmd_db_clear_sub_pre;
+int HP_atcommand_cmd_db_clear_sub_post;
+int HP_atcommand_doload_pre;
+int HP_atcommand_doload_post;
+int HP_atcommand_base_commands_pre;
+int HP_atcommand_base_commands_post;
+int HP_battle_init_pre;
+int HP_battle_init_post;
+int HP_battle_final_pre;
+int HP_battle_final_post;
+int HP_battle_calc_attack_pre;
+int HP_battle_calc_attack_post;
+int HP_battle_calc_damage_pre;
+int HP_battle_calc_damage_post;
+int HP_battle_calc_gvg_damage_pre;
+int HP_battle_calc_gvg_damage_post;
+int HP_battle_calc_bg_damage_pre;
+int HP_battle_calc_bg_damage_post;
+int HP_battle_weapon_attack_pre;
+int HP_battle_weapon_attack_post;
+int HP_battle_calc_weapon_attack_pre;
+int HP_battle_calc_weapon_attack_post;
+int HP_battle_delay_damage_pre;
+int HP_battle_delay_damage_post;
+int HP_battle_drain_pre;
+int HP_battle_drain_post;
+int HP_battle_calc_return_damage_pre;
+int HP_battle_calc_return_damage_post;
+int HP_battle_attr_ratio_pre;
+int HP_battle_attr_ratio_post;
+int HP_battle_attr_fix_pre;
+int HP_battle_attr_fix_post;
+int HP_battle_calc_cardfix_pre;
+int HP_battle_calc_cardfix_post;
+int HP_battle_calc_elefix_pre;
+int HP_battle_calc_elefix_post;
+int HP_battle_calc_masteryfix_pre;
+int HP_battle_calc_masteryfix_post;
+int HP_battle_calc_skillratio_pre;
+int HP_battle_calc_skillratio_post;
+int HP_battle_calc_sizefix_pre;
+int HP_battle_calc_sizefix_post;
+int HP_battle_calc_weapon_damage_pre;
+int HP_battle_calc_weapon_damage_post;
+int HP_battle_calc_defense_pre;
+int HP_battle_calc_defense_post;
+int HP_battle_get_master_pre;
+int HP_battle_get_master_post;
+int HP_battle_get_targeted_pre;
+int HP_battle_get_targeted_post;
+int HP_battle_get_enemy_pre;
+int HP_battle_get_enemy_post;
+int HP_battle_get_target_pre;
+int HP_battle_get_target_post;
+int HP_battle_get_current_skill_pre;
+int HP_battle_get_current_skill_post;
+int HP_battle_check_undead_pre;
+int HP_battle_check_undead_post;
+int HP_battle_check_target_pre;
+int HP_battle_check_target_post;
+int HP_battle_check_range_pre;
+int HP_battle_check_range_post;
+int HP_battle_consume_ammo_pre;
+int HP_battle_consume_ammo_post;
+int HP_battle_get_targeted_sub_pre;
+int HP_battle_get_targeted_sub_post;
+int HP_battle_get_enemy_sub_pre;
+int HP_battle_get_enemy_sub_post;
+int HP_battle_get_enemy_area_sub_pre;
+int HP_battle_get_enemy_area_sub_post;
+int HP_battle_delay_damage_sub_pre;
+int HP_battle_delay_damage_sub_post;
+int HP_battle_blewcount_bonus_pre;
+int HP_battle_blewcount_bonus_post;
+int HP_battle_range_type_pre;
+int HP_battle_range_type_post;
+int HP_battle_calc_base_damage_pre;
+int HP_battle_calc_base_damage_post;
+int HP_battle_calc_base_damage2_pre;
+int HP_battle_calc_base_damage2_post;
+int HP_battle_calc_misc_attack_pre;
+int HP_battle_calc_misc_attack_post;
+int HP_battle_calc_magic_attack_pre;
+int HP_battle_calc_magic_attack_post;
+int HP_battle_adjust_skill_damage_pre;
+int HP_battle_adjust_skill_damage_post;
+int HP_battle_add_mastery_pre;
+int HP_battle_add_mastery_post;
+int HP_battle_calc_drain_pre;
+int HP_battle_calc_drain_post;
+int HP_battle_config_read_pre;
+int HP_battle_config_read_post;
+int HP_battle_config_set_defaults_pre;
+int HP_battle_config_set_defaults_post;
+int HP_battle_config_set_value_pre;
+int HP_battle_config_set_value_post;
+int HP_battle_config_get_value_pre;
+int HP_battle_config_get_value_post;
+int HP_battle_config_adjust_pre;
+int HP_battle_config_adjust_post;
+int HP_battle_get_enemy_area_pre;
+int HP_battle_get_enemy_area_post;
+int HP_battle_damage_area_pre;
+int HP_battle_damage_area_post;
+int HP_bg_init_pre;
+int HP_bg_init_post;
+int HP_bg_final_pre;
+int HP_bg_final_post;
+int HP_bg_name2arena_pre;
+int HP_bg_name2arena_post;
+int HP_bg_queue_add_pre;
+int HP_bg_queue_add_post;
+int HP_bg_can_queue_pre;
+int HP_bg_can_queue_post;
+int HP_bg_id2pos_pre;
+int HP_bg_id2pos_post;
+int HP_bg_queue_pc_cleanup_pre;
+int HP_bg_queue_pc_cleanup_post;
+int HP_bg_begin_pre;
+int HP_bg_begin_post;
+int HP_bg_begin_timer_pre;
+int HP_bg_begin_timer_post;
+int HP_bg_queue_pregame_pre;
+int HP_bg_queue_pregame_post;
+int HP_bg_fillup_timer_pre;
+int HP_bg_fillup_timer_post;
+int HP_bg_queue_ready_ack_pre;
+int HP_bg_queue_ready_ack_post;
+int HP_bg_match_over_pre;
+int HP_bg_match_over_post;
+int HP_bg_queue_check_pre;
+int HP_bg_queue_check_post;
+int HP_bg_team_search_pre;
+int HP_bg_team_search_post;
+int HP_bg_getavailablesd_pre;
+int HP_bg_getavailablesd_post;
+int HP_bg_team_delete_pre;
+int HP_bg_team_delete_post;
+int HP_bg_team_warp_pre;
+int HP_bg_team_warp_post;
+int HP_bg_send_dot_remove_pre;
+int HP_bg_send_dot_remove_post;
+int HP_bg_team_join_pre;
+int HP_bg_team_join_post;
+int HP_bg_team_leave_pre;
+int HP_bg_team_leave_post;
+int HP_bg_member_respawn_pre;
+int HP_bg_member_respawn_post;
+int HP_bg_create_pre;
+int HP_bg_create_post;
+int HP_bg_team_get_id_pre;
+int HP_bg_team_get_id_post;
+int HP_bg_send_message_pre;
+int HP_bg_send_message_post;
+int HP_bg_send_xy_timer_sub_pre;
+int HP_bg_send_xy_timer_sub_post;
+int HP_bg_send_xy_timer_pre;
+int HP_bg_send_xy_timer_post;
+int HP_bg_config_read_pre;
+int HP_bg_config_read_post;
+int HP_buyingstore_setup_pre;
+int HP_buyingstore_setup_post;
+int HP_buyingstore_create_pre;
+int HP_buyingstore_create_post;
+int HP_buyingstore_close_pre;
+int HP_buyingstore_close_post;
+int HP_buyingstore_open_pre;
+int HP_buyingstore_open_post;
+int HP_buyingstore_trade_pre;
+int HP_buyingstore_trade_post;
+int HP_buyingstore_search_pre;
+int HP_buyingstore_search_post;
+int HP_buyingstore_searchall_pre;
+int HP_buyingstore_searchall_post;
+int HP_buyingstore_getuid_pre;
+int HP_buyingstore_getuid_post;
+int HP_chat_create_pc_chat_pre;
+int HP_chat_create_pc_chat_post;
+int HP_chat_join_pre;
+int HP_chat_join_post;
+int HP_chat_leave_pre;
+int HP_chat_leave_post;
+int HP_chat_change_owner_pre;
+int HP_chat_change_owner_post;
+int HP_chat_change_status_pre;
+int HP_chat_change_status_post;
+int HP_chat_kick_pre;
+int HP_chat_kick_post;
+int HP_chat_create_npc_chat_pre;
+int HP_chat_create_npc_chat_post;
+int HP_chat_delete_npc_chat_pre;
+int HP_chat_delete_npc_chat_post;
+int HP_chat_enable_event_pre;
+int HP_chat_enable_event_post;
+int HP_chat_disable_event_pre;
+int HP_chat_disable_event_post;
+int HP_chat_npc_kick_all_pre;
+int HP_chat_npc_kick_all_post;
+int HP_chat_trigger_event_pre;
+int HP_chat_trigger_event_post;
+int HP_chat_create_pre;
+int HP_chat_create_post;
+int HP_chrif_final_pre;
+int HP_chrif_final_post;
+int HP_chrif_init_pre;
+int HP_chrif_init_post;
+int HP_chrif_setuserid_pre;
+int HP_chrif_setuserid_post;
+int HP_chrif_setpasswd_pre;
+int HP_chrif_setpasswd_post;
+int HP_chrif_checkdefaultlogin_pre;
+int HP_chrif_checkdefaultlogin_post;
+int HP_chrif_setip_pre;
+int HP_chrif_setip_post;
+int HP_chrif_setport_pre;
+int HP_chrif_setport_post;
+int HP_chrif_isconnected_pre;
+int HP_chrif_isconnected_post;
+int HP_chrif_check_shutdown_pre;
+int HP_chrif_check_shutdown_post;
+int HP_chrif_search_pre;
+int HP_chrif_search_post;
+int HP_chrif_auth_check_pre;
+int HP_chrif_auth_check_post;
+int HP_chrif_auth_delete_pre;
+int HP_chrif_auth_delete_post;
+int HP_chrif_auth_finished_pre;
+int HP_chrif_auth_finished_post;
+int HP_chrif_authreq_pre;
+int HP_chrif_authreq_post;
+int HP_chrif_authok_pre;
+int HP_chrif_authok_post;
+int HP_chrif_scdata_request_pre;
+int HP_chrif_scdata_request_post;
+int HP_chrif_save_pre;
+int HP_chrif_save_post;
+int HP_chrif_charselectreq_pre;
+int HP_chrif_charselectreq_post;
+int HP_chrif_changemapserver_pre;
+int HP_chrif_changemapserver_post;
+int HP_chrif_searchcharid_pre;
+int HP_chrif_searchcharid_post;
+int HP_chrif_changeemail_pre;
+int HP_chrif_changeemail_post;
+int HP_chrif_char_ask_name_pre;
+int HP_chrif_char_ask_name_post;
+int HP_chrif_updatefamelist_pre;
+int HP_chrif_updatefamelist_post;
+int HP_chrif_buildfamelist_pre;
+int HP_chrif_buildfamelist_post;
+int HP_chrif_save_scdata_pre;
+int HP_chrif_save_scdata_post;
+int HP_chrif_ragsrvinfo_pre;
+int HP_chrif_ragsrvinfo_post;
+int HP_chrif_char_offline_pre;
+int HP_chrif_char_offline_post;
+int HP_chrif_char_offline_nsd_pre;
+int HP_chrif_char_offline_nsd_post;
+int HP_chrif_char_reset_offline_pre;
+int HP_chrif_char_reset_offline_post;
+int HP_chrif_send_users_tochar_pre;
+int HP_chrif_send_users_tochar_post;
+int HP_chrif_char_online_pre;
+int HP_chrif_char_online_post;
+int HP_chrif_changesex_pre;
+int HP_chrif_changesex_post;
+int HP_chrif_divorce_pre;
+int HP_chrif_divorce_post;
+int HP_chrif_removefriend_pre;
+int HP_chrif_removefriend_post;
+int HP_chrif_send_report_pre;
+int HP_chrif_send_report_post;
+int HP_chrif_flush_fifo_pre;
+int HP_chrif_flush_fifo_post;
+int HP_chrif_skillid2idx_pre;
+int HP_chrif_skillid2idx_post;
+int HP_chrif_sd_to_auth_pre;
+int HP_chrif_sd_to_auth_post;
+int HP_chrif_check_connect_char_server_pre;
+int HP_chrif_check_connect_char_server_post;
+int HP_chrif_auth_logout_pre;
+int HP_chrif_auth_logout_post;
+int HP_chrif_save_ack_pre;
+int HP_chrif_save_ack_post;
+int HP_chrif_reconnect_pre;
+int HP_chrif_reconnect_post;
+int HP_chrif_auth_db_cleanup_sub_pre;
+int HP_chrif_auth_db_cleanup_sub_post;
+int HP_chrif_char_ask_name_answer_pre;
+int HP_chrif_char_ask_name_answer_post;
+int HP_chrif_auth_db_final_pre;
+int HP_chrif_auth_db_final_post;
+int HP_chrif_send_usercount_tochar_pre;
+int HP_chrif_send_usercount_tochar_post;
+int HP_chrif_auth_db_cleanup_pre;
+int HP_chrif_auth_db_cleanup_post;
+int HP_chrif_connect_pre;
+int HP_chrif_connect_post;
+int HP_chrif_connectack_pre;
+int HP_chrif_connectack_post;
+int HP_chrif_sendmap_pre;
+int HP_chrif_sendmap_post;
+int HP_chrif_sendmapack_pre;
+int HP_chrif_sendmapack_post;
+int HP_chrif_recvmap_pre;
+int HP_chrif_recvmap_post;
+int HP_chrif_changemapserverack_pre;
+int HP_chrif_changemapserverack_post;
+int HP_chrif_changedsex_pre;
+int HP_chrif_changedsex_post;
+int HP_chrif_divorceack_pre;
+int HP_chrif_divorceack_post;
+int HP_chrif_accountban_pre;
+int HP_chrif_accountban_post;
+int HP_chrif_recvfamelist_pre;
+int HP_chrif_recvfamelist_post;
+int HP_chrif_load_scdata_pre;
+int HP_chrif_load_scdata_post;
+int HP_chrif_update_ip_pre;
+int HP_chrif_update_ip_post;
+int HP_chrif_disconnectplayer_pre;
+int HP_chrif_disconnectplayer_post;
+int HP_chrif_removemap_pre;
+int HP_chrif_removemap_post;
+int HP_chrif_updatefamelist_ack_pre;
+int HP_chrif_updatefamelist_ack_post;
+int HP_chrif_keepalive_pre;
+int HP_chrif_keepalive_post;
+int HP_chrif_keepalive_ack_pre;
+int HP_chrif_keepalive_ack_post;
+int HP_chrif_deadopt_pre;
+int HP_chrif_deadopt_post;
+int HP_chrif_authfail_pre;
+int HP_chrif_authfail_post;
+int HP_chrif_on_ready_pre;
+int HP_chrif_on_ready_post;
+int HP_chrif_on_disconnect_pre;
+int HP_chrif_on_disconnect_post;
+int HP_chrif_parse_pre;
+int HP_chrif_parse_post;
+int HP_clif_init_pre;
+int HP_clif_init_post;
+int HP_clif_final_pre;
+int HP_clif_final_post;
+int HP_clif_setip_pre;
+int HP_clif_setip_post;
+int HP_clif_setbindip_pre;
+int HP_clif_setbindip_post;
+int HP_clif_setport_pre;
+int HP_clif_setport_post;
+int HP_clif_refresh_ip_pre;
+int HP_clif_refresh_ip_post;
+int HP_clif_send_pre;
+int HP_clif_send_post;
+int HP_clif_send_sub_pre;
+int HP_clif_send_sub_post;
+int HP_clif_parse_pre;
+int HP_clif_parse_post;
+int HP_clif_parse_cmd_pre;
+int HP_clif_parse_cmd_post;
+int HP_clif_decrypt_cmd_pre;
+int HP_clif_decrypt_cmd_post;
+int HP_clif_authok_pre;
+int HP_clif_authok_post;
+int HP_clif_authrefuse_pre;
+int HP_clif_authrefuse_post;
+int HP_clif_authfail_fd_pre;
+int HP_clif_authfail_fd_post;
+int HP_clif_charselectok_pre;
+int HP_clif_charselectok_post;
+int HP_clif_dropflooritem_pre;
+int HP_clif_dropflooritem_post;
+int HP_clif_clearflooritem_pre;
+int HP_clif_clearflooritem_post;
+int HP_clif_additem_pre;
+int HP_clif_additem_post;
+int HP_clif_dropitem_pre;
+int HP_clif_dropitem_post;
+int HP_clif_delitem_pre;
+int HP_clif_delitem_post;
+int HP_clif_takeitem_pre;
+int HP_clif_takeitem_post;
+int HP_clif_arrowequip_pre;
+int HP_clif_arrowequip_post;
+int HP_clif_arrow_fail_pre;
+int HP_clif_arrow_fail_post;
+int HP_clif_use_card_pre;
+int HP_clif_use_card_post;
+int HP_clif_cart_additem_pre;
+int HP_clif_cart_additem_post;
+int HP_clif_cart_delitem_pre;
+int HP_clif_cart_delitem_post;
+int HP_clif_equipitemack_pre;
+int HP_clif_equipitemack_post;
+int HP_clif_unequipitemack_pre;
+int HP_clif_unequipitemack_post;
+int HP_clif_useitemack_pre;
+int HP_clif_useitemack_post;
+int HP_clif_addcards_pre;
+int HP_clif_addcards_post;
+int HP_clif_addcards2_pre;
+int HP_clif_addcards2_post;
+int HP_clif_item_sub_pre;
+int HP_clif_item_sub_post;
+int HP_clif_getareachar_item_pre;
+int HP_clif_getareachar_item_post;
+int HP_clif_cart_additem_ack_pre;
+int HP_clif_cart_additem_ack_post;
+int HP_clif_cashshop_load_pre;
+int HP_clif_cashshop_load_post;
+int HP_clif_package_announce_pre;
+int HP_clif_package_announce_post;
+int HP_clif_clearunit_single_pre;
+int HP_clif_clearunit_single_post;
+int HP_clif_clearunit_area_pre;
+int HP_clif_clearunit_area_post;
+int HP_clif_clearunit_delayed_pre;
+int HP_clif_clearunit_delayed_post;
+int HP_clif_walkok_pre;
+int HP_clif_walkok_post;
+int HP_clif_move_pre;
+int HP_clif_move_post;
+int HP_clif_move2_pre;
+int HP_clif_move2_post;
+int HP_clif_blown_pre;
+int HP_clif_blown_post;
+int HP_clif_slide_pre;
+int HP_clif_slide_post;
+int HP_clif_fixpos_pre;
+int HP_clif_fixpos_post;
+int HP_clif_changelook_pre;
+int HP_clif_changelook_post;
+int HP_clif_changetraplook_pre;
+int HP_clif_changetraplook_post;
+int HP_clif_refreshlook_pre;
+int HP_clif_refreshlook_post;
+int HP_clif_class_change_pre;
+int HP_clif_class_change_post;
+int HP_clif_skill_setunit_pre;
+int HP_clif_skill_setunit_post;
+int HP_clif_skill_delunit_pre;
+int HP_clif_skill_delunit_post;
+int HP_clif_skillunit_update_pre;
+int HP_clif_skillunit_update_post;
+int HP_clif_clearunit_delayed_sub_pre;
+int HP_clif_clearunit_delayed_sub_post;
+int HP_clif_set_unit_idle_pre;
+int HP_clif_set_unit_idle_post;
+int HP_clif_spawn_unit_pre;
+int HP_clif_spawn_unit_post;
+int HP_clif_spawn_unit2_pre;
+int HP_clif_spawn_unit2_post;
+int HP_clif_set_unit_idle2_pre;
+int HP_clif_set_unit_idle2_post;
+int HP_clif_set_unit_walking_pre;
+int HP_clif_set_unit_walking_post;
+int HP_clif_calc_walkdelay_pre;
+int HP_clif_calc_walkdelay_post;
+int HP_clif_getareachar_skillunit_pre;
+int HP_clif_getareachar_skillunit_post;
+int HP_clif_getareachar_unit_pre;
+int HP_clif_getareachar_unit_post;
+int HP_clif_clearchar_skillunit_pre;
+int HP_clif_clearchar_skillunit_post;
+int HP_clif_getareachar_pre;
+int HP_clif_getareachar_post;
+int HP_clif_spawn_pre;
+int HP_clif_spawn_post;
+int HP_clif_changemap_pre;
+int HP_clif_changemap_post;
+int HP_clif_changemapcell_pre;
+int HP_clif_changemapcell_post;
+int HP_clif_map_property_pre;
+int HP_clif_map_property_post;
+int HP_clif_pvpset_pre;
+int HP_clif_pvpset_post;
+int HP_clif_map_property_mapall_pre;
+int HP_clif_map_property_mapall_post;
+int HP_clif_bossmapinfo_pre;
+int HP_clif_bossmapinfo_post;
+int HP_clif_map_type_pre;
+int HP_clif_map_type_post;
+int HP_clif_maptypeproperty2_pre;
+int HP_clif_maptypeproperty2_post;
+int HP_clif_changemapserver_pre;
+int HP_clif_changemapserver_post;
+int HP_clif_npcbuysell_pre;
+int HP_clif_npcbuysell_post;
+int HP_clif_buylist_pre;
+int HP_clif_buylist_post;
+int HP_clif_selllist_pre;
+int HP_clif_selllist_post;
+int HP_clif_cashshop_show_pre;
+int HP_clif_cashshop_show_post;
+int HP_clif_npc_buy_result_pre;
+int HP_clif_npc_buy_result_post;
+int HP_clif_npc_sell_result_pre;
+int HP_clif_npc_sell_result_post;
+int HP_clif_cashshop_ack_pre;
+int HP_clif_cashshop_ack_post;
+int HP_clif_scriptmes_pre;
+int HP_clif_scriptmes_post;
+int HP_clif_scriptnext_pre;
+int HP_clif_scriptnext_post;
+int HP_clif_scriptclose_pre;
+int HP_clif_scriptclose_post;
+int HP_clif_scriptmenu_pre;
+int HP_clif_scriptmenu_post;
+int HP_clif_scriptinput_pre;
+int HP_clif_scriptinput_post;
+int HP_clif_scriptinputstr_pre;
+int HP_clif_scriptinputstr_post;
+int HP_clif_cutin_pre;
+int HP_clif_cutin_post;
+int HP_clif_sendfakenpc_pre;
+int HP_clif_sendfakenpc_post;
+int HP_clif_scriptclear_pre;
+int HP_clif_scriptclear_post;
+int HP_clif_viewpoint_pre;
+int HP_clif_viewpoint_post;
+int HP_clif_damage_pre;
+int HP_clif_damage_post;
+int HP_clif_sitting_pre;
+int HP_clif_sitting_post;
+int HP_clif_standing_pre;
+int HP_clif_standing_post;
+int HP_clif_arrow_create_list_pre;
+int HP_clif_arrow_create_list_post;
+int HP_clif_refresh_pre;
+int HP_clif_refresh_post;
+int HP_clif_fame_blacksmith_pre;
+int HP_clif_fame_blacksmith_post;
+int HP_clif_fame_alchemist_pre;
+int HP_clif_fame_alchemist_post;
+int HP_clif_fame_taekwon_pre;
+int HP_clif_fame_taekwon_post;
+int HP_clif_ranklist_pre;
+int HP_clif_ranklist_post;
+int HP_clif_update_rankingpoint_pre;
+int HP_clif_update_rankingpoint_post;
+int HP_clif_pRanklist_pre;
+int HP_clif_pRanklist_post;
+int HP_clif_hotkeys_pre;
+int HP_clif_hotkeys_post;
+int HP_clif_insight_pre;
+int HP_clif_insight_post;
+int HP_clif_outsight_pre;
+int HP_clif_outsight_post;
+int HP_clif_skillcastcancel_pre;
+int HP_clif_skillcastcancel_post;
+int HP_clif_skill_fail_pre;
+int HP_clif_skill_fail_post;
+int HP_clif_skill_cooldown_pre;
+int HP_clif_skill_cooldown_post;
+int HP_clif_skill_memomessage_pre;
+int HP_clif_skill_memomessage_post;
+int HP_clif_skill_mapinfomessage_pre;
+int HP_clif_skill_mapinfomessage_post;
+int HP_clif_skill_produce_mix_list_pre;
+int HP_clif_skill_produce_mix_list_post;
+int HP_clif_cooking_list_pre;
+int HP_clif_cooking_list_post;
+int HP_clif_autospell_pre;
+int HP_clif_autospell_post;
+int HP_clif_combo_delay_pre;
+int HP_clif_combo_delay_post;
+int HP_clif_status_change_pre;
+int HP_clif_status_change_post;
+int HP_clif_insert_card_pre;
+int HP_clif_insert_card_post;
+int HP_clif_inventorylist_pre;
+int HP_clif_inventorylist_post;
+int HP_clif_equiplist_pre;
+int HP_clif_equiplist_post;
+int HP_clif_cartlist_pre;
+int HP_clif_cartlist_post;
+int HP_clif_favorite_item_pre;
+int HP_clif_favorite_item_post;
+int HP_clif_clearcart_pre;
+int HP_clif_clearcart_post;
+int HP_clif_item_identify_list_pre;
+int HP_clif_item_identify_list_post;
+int HP_clif_item_identified_pre;
+int HP_clif_item_identified_post;
+int HP_clif_item_repair_list_pre;
+int HP_clif_item_repair_list_post;
+int HP_clif_item_repaireffect_pre;
+int HP_clif_item_repaireffect_post;
+int HP_clif_item_damaged_pre;
+int HP_clif_item_damaged_post;
+int HP_clif_item_refine_list_pre;
+int HP_clif_item_refine_list_post;
+int HP_clif_item_skill_pre;
+int HP_clif_item_skill_post;
+int HP_clif_mvp_item_pre;
+int HP_clif_mvp_item_post;
+int HP_clif_mvp_exp_pre;
+int HP_clif_mvp_exp_post;
+int HP_clif_mvp_noitem_pre;
+int HP_clif_mvp_noitem_post;
+int HP_clif_changed_dir_pre;
+int HP_clif_changed_dir_post;
+int HP_clif_charnameack_pre;
+int HP_clif_charnameack_post;
+int HP_clif_monster_hp_bar_pre;
+int HP_clif_monster_hp_bar_post;
+int HP_clif_hpmeter_pre;
+int HP_clif_hpmeter_post;
+int HP_clif_hpmeter_single_pre;
+int HP_clif_hpmeter_single_post;
+int HP_clif_hpmeter_sub_pre;
+int HP_clif_hpmeter_sub_post;
+int HP_clif_upgrademessage_pre;
+int HP_clif_upgrademessage_post;
+int HP_clif_get_weapon_view_pre;
+int HP_clif_get_weapon_view_post;
+int HP_clif_gospel_info_pre;
+int HP_clif_gospel_info_post;
+int HP_clif_feel_req_pre;
+int HP_clif_feel_req_post;
+int HP_clif_starskill_pre;
+int HP_clif_starskill_post;
+int HP_clif_feel_info_pre;
+int HP_clif_feel_info_post;
+int HP_clif_hate_info_pre;
+int HP_clif_hate_info_post;
+int HP_clif_mission_info_pre;
+int HP_clif_mission_info_post;
+int HP_clif_feel_hate_reset_pre;
+int HP_clif_feel_hate_reset_post;
+int HP_clif_partytickack_pre;
+int HP_clif_partytickack_post;
+int HP_clif_equiptickack_pre;
+int HP_clif_equiptickack_post;
+int HP_clif_viewequip_ack_pre;
+int HP_clif_viewequip_ack_post;
+int HP_clif_viewequip_fail_pre;
+int HP_clif_viewequip_fail_post;
+int HP_clif_equpcheckbox_pre;
+int HP_clif_equpcheckbox_post;
+int HP_clif_displayexp_pre;
+int HP_clif_displayexp_post;
+int HP_clif_font_pre;
+int HP_clif_font_post;
+int HP_clif_progressbar_pre;
+int HP_clif_progressbar_post;
+int HP_clif_progressbar_abort_pre;
+int HP_clif_progressbar_abort_post;
+int HP_clif_showdigit_pre;
+int HP_clif_showdigit_post;
+int HP_clif_elementalconverter_list_pre;
+int HP_clif_elementalconverter_list_post;
+int HP_clif_spellbook_list_pre;
+int HP_clif_spellbook_list_post;
+int HP_clif_magicdecoy_list_pre;
+int HP_clif_magicdecoy_list_post;
+int HP_clif_poison_list_pre;
+int HP_clif_poison_list_post;
+int HP_clif_autoshadowspell_list_pre;
+int HP_clif_autoshadowspell_list_post;
+int HP_clif_skill_itemlistwindow_pre;
+int HP_clif_skill_itemlistwindow_post;
+int HP_clif_sc_load_pre;
+int HP_clif_sc_load_post;
+int HP_clif_sc_end_pre;
+int HP_clif_sc_end_post;
+int HP_clif_initialstatus_pre;
+int HP_clif_initialstatus_post;
+int HP_clif_cooldown_list_pre;
+int HP_clif_cooldown_list_post;
+int HP_clif_updatestatus_pre;
+int HP_clif_updatestatus_post;
+int HP_clif_changestatus_pre;
+int HP_clif_changestatus_post;
+int HP_clif_statusupack_pre;
+int HP_clif_statusupack_post;
+int HP_clif_movetoattack_pre;
+int HP_clif_movetoattack_post;
+int HP_clif_solved_charname_pre;
+int HP_clif_solved_charname_post;
+int HP_clif_charnameupdate_pre;
+int HP_clif_charnameupdate_post;
+int HP_clif_delayquit_pre;
+int HP_clif_delayquit_post;
+int HP_clif_getareachar_pc_pre;
+int HP_clif_getareachar_pc_post;
+int HP_clif_disconnect_ack_pre;
+int HP_clif_disconnect_ack_post;
+int HP_clif_PVPInfo_pre;
+int HP_clif_PVPInfo_post;
+int HP_clif_blacksmith_pre;
+int HP_clif_blacksmith_post;
+int HP_clif_alchemist_pre;
+int HP_clif_alchemist_post;
+int HP_clif_taekwon_pre;
+int HP_clif_taekwon_post;
+int HP_clif_ranking_pk_pre;
+int HP_clif_ranking_pk_post;
+int HP_clif_quitsave_pre;
+int HP_clif_quitsave_post;
+int HP_clif_misceffect_pre;
+int HP_clif_misceffect_post;
+int HP_clif_changeoption_pre;
+int HP_clif_changeoption_post;
+int HP_clif_changeoption2_pre;
+int HP_clif_changeoption2_post;
+int HP_clif_emotion_pre;
+int HP_clif_emotion_post;
+int HP_clif_talkiebox_pre;
+int HP_clif_talkiebox_post;
+int HP_clif_wedding_effect_pre;
+int HP_clif_wedding_effect_post;
+int HP_clif_divorced_pre;
+int HP_clif_divorced_post;
+int HP_clif_callpartner_pre;
+int HP_clif_callpartner_post;
+int HP_clif_skill_damage_pre;
+int HP_clif_skill_damage_post;
+int HP_clif_skill_nodamage_pre;
+int HP_clif_skill_nodamage_post;
+int HP_clif_skill_poseffect_pre;
+int HP_clif_skill_poseffect_post;
+int HP_clif_skill_estimation_pre;
+int HP_clif_skill_estimation_post;
+int HP_clif_skill_warppoint_pre;
+int HP_clif_skill_warppoint_post;
+int HP_clif_skillcasting_pre;
+int HP_clif_skillcasting_post;
+int HP_clif_produce_effect_pre;
+int HP_clif_produce_effect_post;
+int HP_clif_devotion_pre;
+int HP_clif_devotion_post;
+int HP_clif_spiritball_pre;
+int HP_clif_spiritball_post;
+int HP_clif_spiritball_single_pre;
+int HP_clif_spiritball_single_post;
+int HP_clif_bladestop_pre;
+int HP_clif_bladestop_post;
+int HP_clif_mvp_effect_pre;
+int HP_clif_mvp_effect_post;
+int HP_clif_heal_pre;
+int HP_clif_heal_post;
+int HP_clif_resurrection_pre;
+int HP_clif_resurrection_post;
+int HP_clif_refine_pre;
+int HP_clif_refine_post;
+int HP_clif_weather_pre;
+int HP_clif_weather_post;
+int HP_clif_specialeffect_pre;
+int HP_clif_specialeffect_post;
+int HP_clif_specialeffect_single_pre;
+int HP_clif_specialeffect_single_post;
+int HP_clif_specialeffect_value_pre;
+int HP_clif_specialeffect_value_post;
+int HP_clif_millenniumshield_pre;
+int HP_clif_millenniumshield_post;
+int HP_clif_charm_pre;
+int HP_clif_charm_post;
+int HP_clif_charm_single_pre;
+int HP_clif_charm_single_post;
+int HP_clif_snap_pre;
+int HP_clif_snap_post;
+int HP_clif_weather_check_pre;
+int HP_clif_weather_check_post;
+int HP_clif_playBGM_pre;
+int HP_clif_playBGM_post;
+int HP_clif_soundeffect_pre;
+int HP_clif_soundeffect_post;
+int HP_clif_soundeffectall_pre;
+int HP_clif_soundeffectall_post;
+int HP_clif_GlobalMessage_pre;
+int HP_clif_GlobalMessage_post;
+int HP_clif_createchat_pre;
+int HP_clif_createchat_post;
+int HP_clif_dispchat_pre;
+int HP_clif_dispchat_post;
+int HP_clif_joinchatfail_pre;
+int HP_clif_joinchatfail_post;
+int HP_clif_joinchatok_pre;
+int HP_clif_joinchatok_post;
+int HP_clif_addchat_pre;
+int HP_clif_addchat_post;
+int HP_clif_changechatowner_pre;
+int HP_clif_changechatowner_post;
+int HP_clif_clearchat_pre;
+int HP_clif_clearchat_post;
+int HP_clif_leavechat_pre;
+int HP_clif_leavechat_post;
+int HP_clif_changechatstatus_pre;
+int HP_clif_changechatstatus_post;
+int HP_clif_wis_message_pre;
+int HP_clif_wis_message_post;
+int HP_clif_wis_end_pre;
+int HP_clif_wis_end_post;
+int HP_clif_disp_onlyself_pre;
+int HP_clif_disp_onlyself_post;
+int HP_clif_disp_message_pre;
+int HP_clif_disp_message_post;
+int HP_clif_broadcast_pre;
+int HP_clif_broadcast_post;
+int HP_clif_broadcast2_pre;
+int HP_clif_broadcast2_post;
+int HP_clif_messagecolor_pre;
+int HP_clif_messagecolor_post;
+int HP_clif_disp_overhead_pre;
+int HP_clif_disp_overhead_post;
+int HP_clif_msg_pre;
+int HP_clif_msg_post;
+int HP_clif_msg_value_pre;
+int HP_clif_msg_value_post;
+int HP_clif_msg_skill_pre;
+int HP_clif_msg_skill_post;
+int HP_clif_msgtable_pre;
+int HP_clif_msgtable_post;
+int HP_clif_msgtable_num_pre;
+int HP_clif_msgtable_num_post;
+int HP_clif_message_pre;
+int HP_clif_message_post;
+int HP_clif_messageln_pre;
+int HP_clif_messageln_post;
+int HP_clif_colormes_pre;
+int HP_clif_colormes_post;
+int HP_clif_process_message_pre;
+int HP_clif_process_message_post;
+int HP_clif_wisexin_pre;
+int HP_clif_wisexin_post;
+int HP_clif_wisall_pre;
+int HP_clif_wisall_post;
+int HP_clif_PMIgnoreList_pre;
+int HP_clif_PMIgnoreList_post;
+int HP_clif_traderequest_pre;
+int HP_clif_traderequest_post;
+int HP_clif_tradestart_pre;
+int HP_clif_tradestart_post;
+int HP_clif_tradeadditem_pre;
+int HP_clif_tradeadditem_post;
+int HP_clif_tradeitemok_pre;
+int HP_clif_tradeitemok_post;
+int HP_clif_tradedeal_lock_pre;
+int HP_clif_tradedeal_lock_post;
+int HP_clif_tradecancelled_pre;
+int HP_clif_tradecancelled_post;
+int HP_clif_tradecompleted_pre;
+int HP_clif_tradecompleted_post;
+int HP_clif_tradeundo_pre;
+int HP_clif_tradeundo_post;
+int HP_clif_openvendingreq_pre;
+int HP_clif_openvendingreq_post;
+int HP_clif_showvendingboard_pre;
+int HP_clif_showvendingboard_post;
+int HP_clif_closevendingboard_pre;
+int HP_clif_closevendingboard_post;
+int HP_clif_vendinglist_pre;
+int HP_clif_vendinglist_post;
+int HP_clif_buyvending_pre;
+int HP_clif_buyvending_post;
+int HP_clif_openvending_pre;
+int HP_clif_openvending_post;
+int HP_clif_vendingreport_pre;
+int HP_clif_vendingreport_post;
+int HP_clif_storagelist_pre;
+int HP_clif_storagelist_post;
+int HP_clif_updatestorageamount_pre;
+int HP_clif_updatestorageamount_post;
+int HP_clif_storageitemadded_pre;
+int HP_clif_storageitemadded_post;
+int HP_clif_storageitemremoved_pre;
+int HP_clif_storageitemremoved_post;
+int HP_clif_storageclose_pre;
+int HP_clif_storageclose_post;
+int HP_clif_skillinfoblock_pre;
+int HP_clif_skillinfoblock_post;
+int HP_clif_skillup_pre;
+int HP_clif_skillup_post;
+int HP_clif_skillinfo_pre;
+int HP_clif_skillinfo_post;
+int HP_clif_addskill_pre;
+int HP_clif_addskill_post;
+int HP_clif_deleteskill_pre;
+int HP_clif_deleteskill_post;
+int HP_clif_party_created_pre;
+int HP_clif_party_created_post;
+int HP_clif_party_member_info_pre;
+int HP_clif_party_member_info_post;
+int HP_clif_party_info_pre;
+int HP_clif_party_info_post;
+int HP_clif_party_invite_pre;
+int HP_clif_party_invite_post;
+int HP_clif_party_inviteack_pre;
+int HP_clif_party_inviteack_post;
+int HP_clif_party_option_pre;
+int HP_clif_party_option_post;
+int HP_clif_party_withdraw_pre;
+int HP_clif_party_withdraw_post;
+int HP_clif_party_message_pre;
+int HP_clif_party_message_post;
+int HP_clif_party_xy_pre;
+int HP_clif_party_xy_post;
+int HP_clif_party_xy_single_pre;
+int HP_clif_party_xy_single_post;
+int HP_clif_party_hp_pre;
+int HP_clif_party_hp_post;
+int HP_clif_party_xy_remove_pre;
+int HP_clif_party_xy_remove_post;
+int HP_clif_party_show_picker_pre;
+int HP_clif_party_show_picker_post;
+int HP_clif_partyinvitationstate_pre;
+int HP_clif_partyinvitationstate_post;
+int HP_clif_guild_created_pre;
+int HP_clif_guild_created_post;
+int HP_clif_guild_belonginfo_pre;
+int HP_clif_guild_belonginfo_post;
+int HP_clif_guild_masterormember_pre;
+int HP_clif_guild_masterormember_post;
+int HP_clif_guild_basicinfo_pre;
+int HP_clif_guild_basicinfo_post;
+int HP_clif_guild_allianceinfo_pre;
+int HP_clif_guild_allianceinfo_post;
+int HP_clif_guild_memberlist_pre;
+int HP_clif_guild_memberlist_post;
+int HP_clif_guild_skillinfo_pre;
+int HP_clif_guild_skillinfo_post;
+int HP_clif_guild_send_onlineinfo_pre;
+int HP_clif_guild_send_onlineinfo_post;
+int HP_clif_guild_memberlogin_notice_pre;
+int HP_clif_guild_memberlogin_notice_post;
+int HP_clif_guild_invite_pre;
+int HP_clif_guild_invite_post;
+int HP_clif_guild_inviteack_pre;
+int HP_clif_guild_inviteack_post;
+int HP_clif_guild_leave_pre;
+int HP_clif_guild_leave_post;
+int HP_clif_guild_expulsion_pre;
+int HP_clif_guild_expulsion_post;
+int HP_clif_guild_positionchanged_pre;
+int HP_clif_guild_positionchanged_post;
+int HP_clif_guild_memberpositionchanged_pre;
+int HP_clif_guild_memberpositionchanged_post;
+int HP_clif_guild_emblem_pre;
+int HP_clif_guild_emblem_post;
+int HP_clif_guild_emblem_area_pre;
+int HP_clif_guild_emblem_area_post;
+int HP_clif_guild_notice_pre;
+int HP_clif_guild_notice_post;
+int HP_clif_guild_message_pre;
+int HP_clif_guild_message_post;
+int HP_clif_guild_skillup_pre;
+int HP_clif_guild_skillup_post;
+int HP_clif_guild_reqalliance_pre;
+int HP_clif_guild_reqalliance_post;
+int HP_clif_guild_allianceack_pre;
+int HP_clif_guild_allianceack_post;
+int HP_clif_guild_delalliance_pre;
+int HP_clif_guild_delalliance_post;
+int HP_clif_guild_oppositionack_pre;
+int HP_clif_guild_oppositionack_post;
+int HP_clif_guild_broken_pre;
+int HP_clif_guild_broken_post;
+int HP_clif_guild_xy_pre;
+int HP_clif_guild_xy_post;
+int HP_clif_guild_xy_single_pre;
+int HP_clif_guild_xy_single_post;
+int HP_clif_guild_xy_remove_pre;
+int HP_clif_guild_xy_remove_post;
+int HP_clif_guild_positionnamelist_pre;
+int HP_clif_guild_positionnamelist_post;
+int HP_clif_guild_positioninfolist_pre;
+int HP_clif_guild_positioninfolist_post;
+int HP_clif_guild_expulsionlist_pre;
+int HP_clif_guild_expulsionlist_post;
+int HP_clif_validate_emblem_pre;
+int HP_clif_validate_emblem_post;
+int HP_clif_bg_hp_pre;
+int HP_clif_bg_hp_post;
+int HP_clif_bg_xy_pre;
+int HP_clif_bg_xy_post;
+int HP_clif_bg_xy_remove_pre;
+int HP_clif_bg_xy_remove_post;
+int HP_clif_bg_message_pre;
+int HP_clif_bg_message_post;
+int HP_clif_bg_updatescore_pre;
+int HP_clif_bg_updatescore_post;
+int HP_clif_bg_updatescore_single_pre;
+int HP_clif_bg_updatescore_single_post;
+int HP_clif_sendbgemblem_area_pre;
+int HP_clif_sendbgemblem_area_post;
+int HP_clif_sendbgemblem_single_pre;
+int HP_clif_sendbgemblem_single_post;
+int HP_clif_instance_pre;
+int HP_clif_instance_post;
+int HP_clif_instance_join_pre;
+int HP_clif_instance_join_post;
+int HP_clif_instance_leave_pre;
+int HP_clif_instance_leave_post;
+int HP_clif_catch_process_pre;
+int HP_clif_catch_process_post;
+int HP_clif_pet_roulette_pre;
+int HP_clif_pet_roulette_post;
+int HP_clif_sendegg_pre;
+int HP_clif_sendegg_post;
+int HP_clif_send_petstatus_pre;
+int HP_clif_send_petstatus_post;
+int HP_clif_send_petdata_pre;
+int HP_clif_send_petdata_post;
+int HP_clif_pet_emotion_pre;
+int HP_clif_pet_emotion_post;
+int HP_clif_pet_food_pre;
+int HP_clif_pet_food_post;
+int HP_clif_friendslist_toggle_sub_pre;
+int HP_clif_friendslist_toggle_sub_post;
+int HP_clif_friendslist_send_pre;
+int HP_clif_friendslist_send_post;
+int HP_clif_friendslist_reqack_pre;
+int HP_clif_friendslist_reqack_post;
+int HP_clif_friendslist_toggle_pre;
+int HP_clif_friendslist_toggle_post;
+int HP_clif_friendlist_req_pre;
+int HP_clif_friendlist_req_post;
+int HP_clif_GM_kickack_pre;
+int HP_clif_GM_kickack_post;
+int HP_clif_GM_kick_pre;
+int HP_clif_GM_kick_post;
+int HP_clif_manner_message_pre;
+int HP_clif_manner_message_post;
+int HP_clif_GM_silence_pre;
+int HP_clif_GM_silence_post;
+int HP_clif_account_name_pre;
+int HP_clif_account_name_post;
+int HP_clif_check_pre;
+int HP_clif_check_post;
+int HP_clif_hominfo_pre;
+int HP_clif_hominfo_post;
+int HP_clif_homskillinfoblock_pre;
+int HP_clif_homskillinfoblock_post;
+int HP_clif_homskillup_pre;
+int HP_clif_homskillup_post;
+int HP_clif_hom_food_pre;
+int HP_clif_hom_food_post;
+int HP_clif_send_homdata_pre;
+int HP_clif_send_homdata_post;
+int HP_clif_quest_send_list_pre;
+int HP_clif_quest_send_list_post;
+int HP_clif_quest_send_mission_pre;
+int HP_clif_quest_send_mission_post;
+int HP_clif_quest_add_pre;
+int HP_clif_quest_add_post;
+int HP_clif_quest_delete_pre;
+int HP_clif_quest_delete_post;
+int HP_clif_quest_update_status_pre;
+int HP_clif_quest_update_status_post;
+int HP_clif_quest_update_objective_pre;
+int HP_clif_quest_update_objective_post;
+int HP_clif_quest_show_event_pre;
+int HP_clif_quest_show_event_post;
+int HP_clif_mail_window_pre;
+int HP_clif_mail_window_post;
+int HP_clif_mail_read_pre;
+int HP_clif_mail_read_post;
+int HP_clif_mail_delete_pre;
+int HP_clif_mail_delete_post;
+int HP_clif_mail_return_pre;
+int HP_clif_mail_return_post;
+int HP_clif_mail_send_pre;
+int HP_clif_mail_send_post;
+int HP_clif_mail_new_pre;
+int HP_clif_mail_new_post;
+int HP_clif_mail_refreshinbox_pre;
+int HP_clif_mail_refreshinbox_post;
+int HP_clif_mail_getattachment_pre;
+int HP_clif_mail_getattachment_post;
+int HP_clif_mail_setattachment_pre;
+int HP_clif_mail_setattachment_post;
+int HP_clif_auction_openwindow_pre;
+int HP_clif_auction_openwindow_post;
+int HP_clif_auction_results_pre;
+int HP_clif_auction_results_post;
+int HP_clif_auction_message_pre;
+int HP_clif_auction_message_post;
+int HP_clif_auction_close_pre;
+int HP_clif_auction_close_post;
+int HP_clif_auction_setitem_pre;
+int HP_clif_auction_setitem_post;
+int HP_clif_mercenary_info_pre;
+int HP_clif_mercenary_info_post;
+int HP_clif_mercenary_skillblock_pre;
+int HP_clif_mercenary_skillblock_post;
+int HP_clif_mercenary_message_pre;
+int HP_clif_mercenary_message_post;
+int HP_clif_mercenary_updatestatus_pre;
+int HP_clif_mercenary_updatestatus_post;
+int HP_clif_rental_time_pre;
+int HP_clif_rental_time_post;
+int HP_clif_rental_expired_pre;
+int HP_clif_rental_expired_post;
+int HP_clif_PartyBookingRegisterAck_pre;
+int HP_clif_PartyBookingRegisterAck_post;
+int HP_clif_PartyBookingDeleteAck_pre;
+int HP_clif_PartyBookingDeleteAck_post;
+int HP_clif_PartyBookingSearchAck_pre;
+int HP_clif_PartyBookingSearchAck_post;
+int HP_clif_PartyBookingUpdateNotify_pre;
+int HP_clif_PartyBookingUpdateNotify_post;
+int HP_clif_PartyBookingDeleteNotify_pre;
+int HP_clif_PartyBookingDeleteNotify_post;
+int HP_clif_PartyBookingInsertNotify_pre;
+int HP_clif_PartyBookingInsertNotify_post;
+int HP_clif_PartyRecruitRegisterAck_pre;
+int HP_clif_PartyRecruitRegisterAck_post;
+int HP_clif_PartyRecruitDeleteAck_pre;
+int HP_clif_PartyRecruitDeleteAck_post;
+int HP_clif_PartyRecruitSearchAck_pre;
+int HP_clif_PartyRecruitSearchAck_post;
+int HP_clif_PartyRecruitUpdateNotify_pre;
+int HP_clif_PartyRecruitUpdateNotify_post;
+int HP_clif_PartyRecruitDeleteNotify_pre;
+int HP_clif_PartyRecruitDeleteNotify_post;
+int HP_clif_PartyRecruitInsertNotify_pre;
+int HP_clif_PartyRecruitInsertNotify_post;
+int HP_clif_PartyBookingVolunteerInfo_pre;
+int HP_clif_PartyBookingVolunteerInfo_post;
+int HP_clif_PartyBookingRefuseVolunteer_pre;
+int HP_clif_PartyBookingRefuseVolunteer_post;
+int HP_clif_PartyBookingCancelVolunteer_pre;
+int HP_clif_PartyBookingCancelVolunteer_post;
+int HP_clif_PartyBookingAddFilteringList_pre;
+int HP_clif_PartyBookingAddFilteringList_post;
+int HP_clif_PartyBookingSubFilteringList_pre;
+int HP_clif_PartyBookingSubFilteringList_post;
+int HP_clif_buyingstore_open_pre;
+int HP_clif_buyingstore_open_post;
+int HP_clif_buyingstore_open_failed_pre;
+int HP_clif_buyingstore_open_failed_post;
+int HP_clif_buyingstore_myitemlist_pre;
+int HP_clif_buyingstore_myitemlist_post;
+int HP_clif_buyingstore_entry_pre;
+int HP_clif_buyingstore_entry_post;
+int HP_clif_buyingstore_entry_single_pre;
+int HP_clif_buyingstore_entry_single_post;
+int HP_clif_buyingstore_disappear_entry_pre;
+int HP_clif_buyingstore_disappear_entry_post;
+int HP_clif_buyingstore_disappear_entry_single_pre;
+int HP_clif_buyingstore_disappear_entry_single_post;
+int HP_clif_buyingstore_itemlist_pre;
+int HP_clif_buyingstore_itemlist_post;
+int HP_clif_buyingstore_trade_failed_buyer_pre;
+int HP_clif_buyingstore_trade_failed_buyer_post;
+int HP_clif_buyingstore_update_item_pre;
+int HP_clif_buyingstore_update_item_post;
+int HP_clif_buyingstore_delete_item_pre;
+int HP_clif_buyingstore_delete_item_post;
+int HP_clif_buyingstore_trade_failed_seller_pre;
+int HP_clif_buyingstore_trade_failed_seller_post;
+int HP_clif_search_store_info_ack_pre;
+int HP_clif_search_store_info_ack_post;
+int HP_clif_search_store_info_failed_pre;
+int HP_clif_search_store_info_failed_post;
+int HP_clif_open_search_store_info_pre;
+int HP_clif_open_search_store_info_post;
+int HP_clif_search_store_info_click_ack_pre;
+int HP_clif_search_store_info_click_ack_post;
+int HP_clif_elemental_info_pre;
+int HP_clif_elemental_info_post;
+int HP_clif_elemental_updatestatus_pre;
+int HP_clif_elemental_updatestatus_post;
+int HP_clif_bgqueue_ack_pre;
+int HP_clif_bgqueue_ack_post;
+int HP_clif_bgqueue_notice_delete_pre;
+int HP_clif_bgqueue_notice_delete_post;
+int HP_clif_bgqueue_update_info_pre;
+int HP_clif_bgqueue_update_info_post;
+int HP_clif_bgqueue_joined_pre;
+int HP_clif_bgqueue_joined_post;
+int HP_clif_bgqueue_pcleft_pre;
+int HP_clif_bgqueue_pcleft_post;
+int HP_clif_bgqueue_battlebegins_pre;
+int HP_clif_bgqueue_battlebegins_post;
+int HP_clif_adopt_reply_pre;
+int HP_clif_adopt_reply_post;
+int HP_clif_adopt_request_pre;
+int HP_clif_adopt_request_post;
+int HP_clif_readbook_pre;
+int HP_clif_readbook_post;
+int HP_clif_notify_time_pre;
+int HP_clif_notify_time_post;
+int HP_clif_user_count_pre;
+int HP_clif_user_count_post;
+int HP_clif_noask_sub_pre;
+int HP_clif_noask_sub_post;
+int HP_clif_bc_ready_pre;
+int HP_clif_bc_ready_post;
+int HP_clif_undisguise_timer_pre;
+int HP_clif_undisguise_timer_post;
+int HP_clif_chsys_create_pre;
+int HP_clif_chsys_create_post;
+int HP_clif_chsys_msg_pre;
+int HP_clif_chsys_msg_post;
+int HP_clif_chsys_msg2_pre;
+int HP_clif_chsys_msg2_post;
+int HP_clif_chsys_send_pre;
+int HP_clif_chsys_send_post;
+int HP_clif_chsys_join_pre;
+int HP_clif_chsys_join_post;
+int HP_clif_chsys_left_pre;
+int HP_clif_chsys_left_post;
+int HP_clif_chsys_delete_pre;
+int HP_clif_chsys_delete_post;
+int HP_clif_chsys_mjoin_pre;
+int HP_clif_chsys_mjoin_post;
+int HP_clif_chsys_quit_pre;
+int HP_clif_chsys_quit_post;
+int HP_clif_chsys_quitg_pre;
+int HP_clif_chsys_quitg_post;
+int HP_clif_chsys_gjoin_pre;
+int HP_clif_chsys_gjoin_post;
+int HP_clif_chsys_gleave_pre;
+int HP_clif_chsys_gleave_post;
+int HP_clif_pWantToConnection_pre;
+int HP_clif_pWantToConnection_post;
+int HP_clif_pLoadEndAck_pre;
+int HP_clif_pLoadEndAck_post;
+int HP_clif_pTickSend_pre;
+int HP_clif_pTickSend_post;
+int HP_clif_pHotkey_pre;
+int HP_clif_pHotkey_post;
+int HP_clif_pProgressbar_pre;
+int HP_clif_pProgressbar_post;
+int HP_clif_pWalkToXY_pre;
+int HP_clif_pWalkToXY_post;
+int HP_clif_pQuitGame_pre;
+int HP_clif_pQuitGame_post;
+int HP_clif_pGetCharNameRequest_pre;
+int HP_clif_pGetCharNameRequest_post;
+int HP_clif_pGlobalMessage_pre;
+int HP_clif_pGlobalMessage_post;
+int HP_clif_pMapMove_pre;
+int HP_clif_pMapMove_post;
+int HP_clif_pChangeDir_pre;
+int HP_clif_pChangeDir_post;
+int HP_clif_pEmotion_pre;
+int HP_clif_pEmotion_post;
+int HP_clif_pHowManyConnections_pre;
+int HP_clif_pHowManyConnections_post;
+int HP_clif_pActionRequest_pre;
+int HP_clif_pActionRequest_post;
+int HP_clif_pActionRequest_sub_pre;
+int HP_clif_pActionRequest_sub_post;
+int HP_clif_pRestart_pre;
+int HP_clif_pRestart_post;
+int HP_clif_pWisMessage_pre;
+int HP_clif_pWisMessage_post;
+int HP_clif_pBroadcast_pre;
+int HP_clif_pBroadcast_post;
+int HP_clif_pTakeItem_pre;
+int HP_clif_pTakeItem_post;
+int HP_clif_pDropItem_pre;
+int HP_clif_pDropItem_post;
+int HP_clif_pUseItem_pre;
+int HP_clif_pUseItem_post;
+int HP_clif_pEquipItem_pre;
+int HP_clif_pEquipItem_post;
+int HP_clif_pUnequipItem_pre;
+int HP_clif_pUnequipItem_post;
+int HP_clif_pNpcClicked_pre;
+int HP_clif_pNpcClicked_post;
+int HP_clif_pNpcBuySellSelected_pre;
+int HP_clif_pNpcBuySellSelected_post;
+int HP_clif_pNpcBuyListSend_pre;
+int HP_clif_pNpcBuyListSend_post;
+int HP_clif_pNpcSellListSend_pre;
+int HP_clif_pNpcSellListSend_post;
+int HP_clif_pCreateChatRoom_pre;
+int HP_clif_pCreateChatRoom_post;
+int HP_clif_pChatAddMember_pre;
+int HP_clif_pChatAddMember_post;
+int HP_clif_pChatRoomStatusChange_pre;
+int HP_clif_pChatRoomStatusChange_post;
+int HP_clif_pChangeChatOwner_pre;
+int HP_clif_pChangeChatOwner_post;
+int HP_clif_pKickFromChat_pre;
+int HP_clif_pKickFromChat_post;
+int HP_clif_pChatLeave_pre;
+int HP_clif_pChatLeave_post;
+int HP_clif_pTradeRequest_pre;
+int HP_clif_pTradeRequest_post;
+int HP_clif_chann_config_read_pre;
+int HP_clif_chann_config_read_post;
+int HP_clif_pTradeAck_pre;
+int HP_clif_pTradeAck_post;
+int HP_clif_pTradeAddItem_pre;
+int HP_clif_pTradeAddItem_post;
+int HP_clif_pTradeOk_pre;
+int HP_clif_pTradeOk_post;
+int HP_clif_pTradeCancel_pre;
+int HP_clif_pTradeCancel_post;
+int HP_clif_pTradeCommit_pre;
+int HP_clif_pTradeCommit_post;
+int HP_clif_pStopAttack_pre;
+int HP_clif_pStopAttack_post;
+int HP_clif_pPutItemToCart_pre;
+int HP_clif_pPutItemToCart_post;
+int HP_clif_pGetItemFromCart_pre;
+int HP_clif_pGetItemFromCart_post;
+int HP_clif_pRemoveOption_pre;
+int HP_clif_pRemoveOption_post;
+int HP_clif_pChangeCart_pre;
+int HP_clif_pChangeCart_post;
+int HP_clif_pStatusUp_pre;
+int HP_clif_pStatusUp_post;
+int HP_clif_pSkillUp_pre;
+int HP_clif_pSkillUp_post;
+int HP_clif_pUseSkillToId_pre;
+int HP_clif_pUseSkillToId_post;
+int HP_clif_pUseSkillToId_homun_pre;
+int HP_clif_pUseSkillToId_homun_post;
+int HP_clif_pUseSkillToId_mercenary_pre;
+int HP_clif_pUseSkillToId_mercenary_post;
+int HP_clif_pUseSkillToPos_pre;
+int HP_clif_pUseSkillToPos_post;
+int HP_clif_pUseSkillToPosSub_pre;
+int HP_clif_pUseSkillToPosSub_post;
+int HP_clif_pUseSkillToPos_homun_pre;
+int HP_clif_pUseSkillToPos_homun_post;
+int HP_clif_pUseSkillToPos_mercenary_pre;
+int HP_clif_pUseSkillToPos_mercenary_post;
+int HP_clif_pUseSkillToPosMoreInfo_pre;
+int HP_clif_pUseSkillToPosMoreInfo_post;
+int HP_clif_pUseSkillMap_pre;
+int HP_clif_pUseSkillMap_post;
+int HP_clif_pRequestMemo_pre;
+int HP_clif_pRequestMemo_post;
+int HP_clif_pProduceMix_pre;
+int HP_clif_pProduceMix_post;
+int HP_clif_pCooking_pre;
+int HP_clif_pCooking_post;
+int HP_clif_pRepairItem_pre;
+int HP_clif_pRepairItem_post;
+int HP_clif_pWeaponRefine_pre;
+int HP_clif_pWeaponRefine_post;
+int HP_clif_pNpcSelectMenu_pre;
+int HP_clif_pNpcSelectMenu_post;
+int HP_clif_pNpcNextClicked_pre;
+int HP_clif_pNpcNextClicked_post;
+int HP_clif_pNpcAmountInput_pre;
+int HP_clif_pNpcAmountInput_post;
+int HP_clif_pNpcStringInput_pre;
+int HP_clif_pNpcStringInput_post;
+int HP_clif_pNpcCloseClicked_pre;
+int HP_clif_pNpcCloseClicked_post;
+int HP_clif_pItemIdentify_pre;
+int HP_clif_pItemIdentify_post;
+int HP_clif_pSelectArrow_pre;
+int HP_clif_pSelectArrow_post;
+int HP_clif_pAutoSpell_pre;
+int HP_clif_pAutoSpell_post;
+int HP_clif_pUseCard_pre;
+int HP_clif_pUseCard_post;
+int HP_clif_pInsertCard_pre;
+int HP_clif_pInsertCard_post;
+int HP_clif_pSolveCharName_pre;
+int HP_clif_pSolveCharName_post;
+int HP_clif_pResetChar_pre;
+int HP_clif_pResetChar_post;
+int HP_clif_pLocalBroadcast_pre;
+int HP_clif_pLocalBroadcast_post;
+int HP_clif_pMoveToKafra_pre;
+int HP_clif_pMoveToKafra_post;
+int HP_clif_pMoveFromKafra_pre;
+int HP_clif_pMoveFromKafra_post;
+int HP_clif_pMoveToKafraFromCart_pre;
+int HP_clif_pMoveToKafraFromCart_post;
+int HP_clif_pMoveFromKafraToCart_pre;
+int HP_clif_pMoveFromKafraToCart_post;
+int HP_clif_pCloseKafra_pre;
+int HP_clif_pCloseKafra_post;
+int HP_clif_pStoragePassword_pre;
+int HP_clif_pStoragePassword_post;
+int HP_clif_pCreateParty_pre;
+int HP_clif_pCreateParty_post;
+int HP_clif_pCreateParty2_pre;
+int HP_clif_pCreateParty2_post;
+int HP_clif_pPartyInvite_pre;
+int HP_clif_pPartyInvite_post;
+int HP_clif_pPartyInvite2_pre;
+int HP_clif_pPartyInvite2_post;
+int HP_clif_pReplyPartyInvite_pre;
+int HP_clif_pReplyPartyInvite_post;
+int HP_clif_pReplyPartyInvite2_pre;
+int HP_clif_pReplyPartyInvite2_post;
+int HP_clif_pLeaveParty_pre;
+int HP_clif_pLeaveParty_post;
+int HP_clif_pRemovePartyMember_pre;
+int HP_clif_pRemovePartyMember_post;
+int HP_clif_pPartyChangeOption_pre;
+int HP_clif_pPartyChangeOption_post;
+int HP_clif_pPartyMessage_pre;
+int HP_clif_pPartyMessage_post;
+int HP_clif_pPartyChangeLeader_pre;
+int HP_clif_pPartyChangeLeader_post;
+int HP_clif_pPartyBookingRegisterReq_pre;
+int HP_clif_pPartyBookingRegisterReq_post;
+int HP_clif_pPartyBookingSearchReq_pre;
+int HP_clif_pPartyBookingSearchReq_post;
+int HP_clif_pPartyBookingDeleteReq_pre;
+int HP_clif_pPartyBookingDeleteReq_post;
+int HP_clif_pPartyBookingUpdateReq_pre;
+int HP_clif_pPartyBookingUpdateReq_post;
+int HP_clif_pPartyRecruitRegisterReq_pre;
+int HP_clif_pPartyRecruitRegisterReq_post;
+int HP_clif_pPartyRecruitSearchReq_pre;
+int HP_clif_pPartyRecruitSearchReq_post;
+int HP_clif_pPartyRecruitDeleteReq_pre;
+int HP_clif_pPartyRecruitDeleteReq_post;
+int HP_clif_pPartyRecruitUpdateReq_pre;
+int HP_clif_pPartyRecruitUpdateReq_post;
+int HP_clif_pCloseVending_pre;
+int HP_clif_pCloseVending_post;
+int HP_clif_pVendingListReq_pre;
+int HP_clif_pVendingListReq_post;
+int HP_clif_pPurchaseReq_pre;
+int HP_clif_pPurchaseReq_post;
+int HP_clif_pPurchaseReq2_pre;
+int HP_clif_pPurchaseReq2_post;
+int HP_clif_pOpenVending_pre;
+int HP_clif_pOpenVending_post;
+int HP_clif_pCreateGuild_pre;
+int HP_clif_pCreateGuild_post;
+int HP_clif_pGuildCheckMaster_pre;
+int HP_clif_pGuildCheckMaster_post;
+int HP_clif_pGuildRequestInfo_pre;
+int HP_clif_pGuildRequestInfo_post;
+int HP_clif_pGuildChangePositionInfo_pre;
+int HP_clif_pGuildChangePositionInfo_post;
+int HP_clif_pGuildChangeMemberPosition_pre;
+int HP_clif_pGuildChangeMemberPosition_post;
+int HP_clif_pGuildRequestEmblem_pre;
+int HP_clif_pGuildRequestEmblem_post;
+int HP_clif_pGuildChangeEmblem_pre;
+int HP_clif_pGuildChangeEmblem_post;
+int HP_clif_pGuildChangeNotice_pre;
+int HP_clif_pGuildChangeNotice_post;
+int HP_clif_pGuildInvite_pre;
+int HP_clif_pGuildInvite_post;
+int HP_clif_pGuildReplyInvite_pre;
+int HP_clif_pGuildReplyInvite_post;
+int HP_clif_pGuildLeave_pre;
+int HP_clif_pGuildLeave_post;
+int HP_clif_pGuildExpulsion_pre;
+int HP_clif_pGuildExpulsion_post;
+int HP_clif_pGuildMessage_pre;
+int HP_clif_pGuildMessage_post;
+int HP_clif_pGuildRequestAlliance_pre;
+int HP_clif_pGuildRequestAlliance_post;
+int HP_clif_pGuildReplyAlliance_pre;
+int HP_clif_pGuildReplyAlliance_post;
+int HP_clif_pGuildDelAlliance_pre;
+int HP_clif_pGuildDelAlliance_post;
+int HP_clif_pGuildOpposition_pre;
+int HP_clif_pGuildOpposition_post;
+int HP_clif_pGuildBreak_pre;
+int HP_clif_pGuildBreak_post;
+int HP_clif_pPetMenu_pre;
+int HP_clif_pPetMenu_post;
+int HP_clif_pCatchPet_pre;
+int HP_clif_pCatchPet_post;
+int HP_clif_pSelectEgg_pre;
+int HP_clif_pSelectEgg_post;
+int HP_clif_pSendEmotion_pre;
+int HP_clif_pSendEmotion_post;
+int HP_clif_pChangePetName_pre;
+int HP_clif_pChangePetName_post;
+int HP_clif_pGMKick_pre;
+int HP_clif_pGMKick_post;
+int HP_clif_pGMKickAll_pre;
+int HP_clif_pGMKickAll_post;
+int HP_clif_pGMShift_pre;
+int HP_clif_pGMShift_post;
+int HP_clif_pGMRemove2_pre;
+int HP_clif_pGMRemove2_post;
+int HP_clif_pGMRecall_pre;
+int HP_clif_pGMRecall_post;
+int HP_clif_pGMRecall2_pre;
+int HP_clif_pGMRecall2_post;
+int HP_clif_pGM_Monster_Item_pre;
+int HP_clif_pGM_Monster_Item_post;
+int HP_clif_pGMHide_pre;
+int HP_clif_pGMHide_post;
+int HP_clif_pGMReqNoChat_pre;
+int HP_clif_pGMReqNoChat_post;
+int HP_clif_pGMRc_pre;
+int HP_clif_pGMRc_post;
+int HP_clif_pGMReqAccountName_pre;
+int HP_clif_pGMReqAccountName_post;
+int HP_clif_pGMChangeMapType_pre;
+int HP_clif_pGMChangeMapType_post;
+int HP_clif_pPMIgnore_pre;
+int HP_clif_pPMIgnore_post;
+int HP_clif_pPMIgnoreAll_pre;
+int HP_clif_pPMIgnoreAll_post;
+int HP_clif_pPMIgnoreList_pre;
+int HP_clif_pPMIgnoreList_post;
+int HP_clif_pNoviceDoriDori_pre;
+int HP_clif_pNoviceDoriDori_post;
+int HP_clif_pNoviceExplosionSpirits_pre;
+int HP_clif_pNoviceExplosionSpirits_post;
+int HP_clif_pFriendsListAdd_pre;
+int HP_clif_pFriendsListAdd_post;
+int HP_clif_pFriendsListReply_pre;
+int HP_clif_pFriendsListReply_post;
+int HP_clif_pFriendsListRemove_pre;
+int HP_clif_pFriendsListRemove_post;
+int HP_clif_pPVPInfo_pre;
+int HP_clif_pPVPInfo_post;
+int HP_clif_pBlacksmith_pre;
+int HP_clif_pBlacksmith_post;
+int HP_clif_pAlchemist_pre;
+int HP_clif_pAlchemist_post;
+int HP_clif_pTaekwon_pre;
+int HP_clif_pTaekwon_post;
+int HP_clif_pRankingPk_pre;
+int HP_clif_pRankingPk_post;
+int HP_clif_pFeelSaveOk_pre;
+int HP_clif_pFeelSaveOk_post;
+int HP_clif_pChangeHomunculusName_pre;
+int HP_clif_pChangeHomunculusName_post;
+int HP_clif_pHomMoveToMaster_pre;
+int HP_clif_pHomMoveToMaster_post;
+int HP_clif_pHomMoveTo_pre;
+int HP_clif_pHomMoveTo_post;
+int HP_clif_pHomAttack_pre;
+int HP_clif_pHomAttack_post;
+int HP_clif_pHomMenu_pre;
+int HP_clif_pHomMenu_post;
+int HP_clif_pAutoRevive_pre;
+int HP_clif_pAutoRevive_post;
+int HP_clif_pCheck_pre;
+int HP_clif_pCheck_post;
+int HP_clif_pMail_refreshinbox_pre;
+int HP_clif_pMail_refreshinbox_post;
+int HP_clif_pMail_read_pre;
+int HP_clif_pMail_read_post;
+int HP_clif_pMail_getattach_pre;
+int HP_clif_pMail_getattach_post;
+int HP_clif_pMail_delete_pre;
+int HP_clif_pMail_delete_post;
+int HP_clif_pMail_return_pre;
+int HP_clif_pMail_return_post;
+int HP_clif_pMail_setattach_pre;
+int HP_clif_pMail_setattach_post;
+int HP_clif_pMail_winopen_pre;
+int HP_clif_pMail_winopen_post;
+int HP_clif_pMail_send_pre;
+int HP_clif_pMail_send_post;
+int HP_clif_pAuction_cancelreg_pre;
+int HP_clif_pAuction_cancelreg_post;
+int HP_clif_pAuction_setitem_pre;
+int HP_clif_pAuction_setitem_post;
+int HP_clif_pAuction_register_pre;
+int HP_clif_pAuction_register_post;
+int HP_clif_pAuction_cancel_pre;
+int HP_clif_pAuction_cancel_post;
+int HP_clif_pAuction_close_pre;
+int HP_clif_pAuction_close_post;
+int HP_clif_pAuction_bid_pre;
+int HP_clif_pAuction_bid_post;
+int HP_clif_pAuction_search_pre;
+int HP_clif_pAuction_search_post;
+int HP_clif_pAuction_buysell_pre;
+int HP_clif_pAuction_buysell_post;
+int HP_clif_pcashshop_buy_pre;
+int HP_clif_pcashshop_buy_post;
+int HP_clif_pAdopt_request_pre;
+int HP_clif_pAdopt_request_post;
+int HP_clif_pAdopt_reply_pre;
+int HP_clif_pAdopt_reply_post;
+int HP_clif_pViewPlayerEquip_pre;
+int HP_clif_pViewPlayerEquip_post;
+int HP_clif_pEquipTick_pre;
+int HP_clif_pEquipTick_post;
+int HP_clif_pquestStateAck_pre;
+int HP_clif_pquestStateAck_post;
+int HP_clif_pmercenary_action_pre;
+int HP_clif_pmercenary_action_post;
+int HP_clif_pBattleChat_pre;
+int HP_clif_pBattleChat_post;
+int HP_clif_pLessEffect_pre;
+int HP_clif_pLessEffect_post;
+int HP_clif_pItemListWindowSelected_pre;
+int HP_clif_pItemListWindowSelected_post;
+int HP_clif_pReqOpenBuyingStore_pre;
+int HP_clif_pReqOpenBuyingStore_post;
+int HP_clif_pReqCloseBuyingStore_pre;
+int HP_clif_pReqCloseBuyingStore_post;
+int HP_clif_pReqClickBuyingStore_pre;
+int HP_clif_pReqClickBuyingStore_post;
+int HP_clif_pReqTradeBuyingStore_pre;
+int HP_clif_pReqTradeBuyingStore_post;
+int HP_clif_pSearchStoreInfo_pre;
+int HP_clif_pSearchStoreInfo_post;
+int HP_clif_pSearchStoreInfoNextPage_pre;
+int HP_clif_pSearchStoreInfoNextPage_post;
+int HP_clif_pCloseSearchStoreInfo_pre;
+int HP_clif_pCloseSearchStoreInfo_post;
+int HP_clif_pSearchStoreInfoListItemClick_pre;
+int HP_clif_pSearchStoreInfoListItemClick_post;
+int HP_clif_pDebug_pre;
+int HP_clif_pDebug_post;
+int HP_clif_pSkillSelectMenu_pre;
+int HP_clif_pSkillSelectMenu_post;
+int HP_clif_pMoveItem_pre;
+int HP_clif_pMoveItem_post;
+int HP_clif_pDull_pre;
+int HP_clif_pDull_post;
+int HP_clif_pBGQueueRegister_pre;
+int HP_clif_pBGQueueRegister_post;
+int HP_clif_pBGQueueCheckState_pre;
+int HP_clif_pBGQueueCheckState_post;
+int HP_clif_pBGQueueRevokeReq_pre;
+int HP_clif_pBGQueueRevokeReq_post;
+int HP_clif_pBGQueueBattleBeginAck_pre;
+int HP_clif_pBGQueueBattleBeginAck_post;
+int HP_clif_pCashShopOpen_pre;
+int HP_clif_pCashShopOpen_post;
+int HP_clif_pCashShopClose_pre;
+int HP_clif_pCashShopClose_post;
+int HP_clif_pCashShopReqTab_pre;
+int HP_clif_pCashShopReqTab_post;
+int HP_clif_pCashShopSchedule_pre;
+int HP_clif_pCashShopSchedule_post;
+int HP_clif_pCashShopBuy_pre;
+int HP_clif_pCashShopBuy_post;
+int HP_clif_pPartyTick_pre;
+int HP_clif_pPartyTick_post;
+int HP_clif_pGuildInvite2_pre;
+int HP_clif_pGuildInvite2_post;
+int HP_clif_pPartyBookingAddFilter_pre;
+int HP_clif_pPartyBookingAddFilter_post;
+int HP_clif_pPartyBookingSubFilter_pre;
+int HP_clif_pPartyBookingSubFilter_post;
+int HP_clif_pPartyBookingReqVolunteer_pre;
+int HP_clif_pPartyBookingReqVolunteer_post;
+int HP_clif_pPartyBookingRefuseVolunteer_pre;
+int HP_clif_pPartyBookingRefuseVolunteer_post;
+int HP_clif_pPartyBookingCancelVolunteer_pre;
+int HP_clif_pPartyBookingCancelVolunteer_post;
+int HP_duel_create_pre;
+int HP_duel_create_post;
+int HP_duel_invite_pre;
+int HP_duel_invite_post;
+int HP_duel_accept_pre;
+int HP_duel_accept_post;
+int HP_duel_reject_pre;
+int HP_duel_reject_post;
+int HP_duel_leave_pre;
+int HP_duel_leave_post;
+int HP_duel_showinfo_pre;
+int HP_duel_showinfo_post;
+int HP_duel_checktime_pre;
+int HP_duel_checktime_post;
+int HP_duel_init_pre;
+int HP_duel_init_post;
+int HP_duel_final_pre;
+int HP_duel_final_post;
+int HP_elemental_init_pre;
+int HP_elemental_init_post;
+int HP_elemental_final_pre;
+int HP_elemental_final_post;
+int HP_elemental_class_pre;
+int HP_elemental_class_post;
+int HP_elemental_get_viewdata_pre;
+int HP_elemental_get_viewdata_post;
+int HP_elemental_create_pre;
+int HP_elemental_create_post;
+int HP_elemental_data_received_pre;
+int HP_elemental_data_received_post;
+int HP_elemental_save_pre;
+int HP_elemental_save_post;
+int HP_elemental_change_mode_ack_pre;
+int HP_elemental_change_mode_ack_post;
+int HP_elemental_change_mode_pre;
+int HP_elemental_change_mode_post;
+int HP_elemental_heal_pre;
+int HP_elemental_heal_post;
+int HP_elemental_dead_pre;
+int HP_elemental_dead_post;
+int HP_elemental_delete_pre;
+int HP_elemental_delete_post;
+int HP_elemental_summon_stop_pre;
+int HP_elemental_summon_stop_post;
+int HP_elemental_get_lifetime_pre;
+int HP_elemental_get_lifetime_post;
+int HP_elemental_unlocktarget_pre;
+int HP_elemental_unlocktarget_post;
+int HP_elemental_skillnotok_pre;
+int HP_elemental_skillnotok_post;
+int HP_elemental_set_target_pre;
+int HP_elemental_set_target_post;
+int HP_elemental_clean_single_effect_pre;
+int HP_elemental_clean_single_effect_post;
+int HP_elemental_clean_effect_pre;
+int HP_elemental_clean_effect_post;
+int HP_elemental_action_pre;
+int HP_elemental_action_post;
+int HP_elemental_skill_get_requirements_pre;
+int HP_elemental_skill_get_requirements_post;
+int HP_elemental_read_skilldb_pre;
+int HP_elemental_read_skilldb_post;
+int HP_elemental_reload_db_pre;
+int HP_elemental_reload_db_post;
+int HP_elemental_reload_skilldb_pre;
+int HP_elemental_reload_skilldb_post;
+int HP_elemental_search_index_pre;
+int HP_elemental_search_index_post;
+int HP_elemental_summon_init_pre;
+int HP_elemental_summon_init_post;
+int HP_elemental_summon_end_timer_pre;
+int HP_elemental_summon_end_timer_post;
+int HP_elemental_ai_sub_timer_activesearch_pre;
+int HP_elemental_ai_sub_timer_activesearch_post;
+int HP_elemental_ai_sub_timer_pre;
+int HP_elemental_ai_sub_timer_post;
+int HP_elemental_ai_sub_foreachclient_pre;
+int HP_elemental_ai_sub_foreachclient_post;
+int HP_elemental_ai_timer_pre;
+int HP_elemental_ai_timer_post;
+int HP_elemental_read_db_pre;
+int HP_elemental_read_db_post;
+int HP_guild_init_pre;
+int HP_guild_init_post;
+int HP_guild_final_pre;
+int HP_guild_final_post;
+int HP_guild_skill_get_max_pre;
+int HP_guild_skill_get_max_post;
+int HP_guild_checkskill_pre;
+int HP_guild_checkskill_post;
+int HP_guild_check_skill_require_pre;
+int HP_guild_check_skill_require_post;
+int HP_guild_checkcastles_pre;
+int HP_guild_checkcastles_post;
+int HP_guild_isallied_pre;
+int HP_guild_isallied_post;
+int HP_guild_search_pre;
+int HP_guild_search_post;
+int HP_guild_searchname_pre;
+int HP_guild_searchname_post;
+int HP_guild_castle_search_pre;
+int HP_guild_castle_search_post;
+int HP_guild_mapname2gc_pre;
+int HP_guild_mapname2gc_post;
+int HP_guild_mapindex2gc_pre;
+int HP_guild_mapindex2gc_post;
+int HP_guild_getavailablesd_pre;
+int HP_guild_getavailablesd_post;
+int HP_guild_getindex_pre;
+int HP_guild_getindex_post;
+int HP_guild_getposition_pre;
+int HP_guild_getposition_post;
+int HP_guild_payexp_pre;
+int HP_guild_payexp_post;
+int HP_guild_getexp_pre;
+int HP_guild_getexp_post;
+int HP_guild_create_pre;
+int HP_guild_create_post;
+int HP_guild_created_pre;
+int HP_guild_created_post;
+int HP_guild_request_info_pre;
+int HP_guild_request_info_post;
+int HP_guild_recv_noinfo_pre;
+int HP_guild_recv_noinfo_post;
+int HP_guild_recv_info_pre;
+int HP_guild_recv_info_post;
+int HP_guild_npc_request_info_pre;
+int HP_guild_npc_request_info_post;
+int HP_guild_invite_pre;
+int HP_guild_invite_post;
+int HP_guild_reply_invite_pre;
+int HP_guild_reply_invite_post;
+int HP_guild_member_joined_pre;
+int HP_guild_member_joined_post;
+int HP_guild_member_added_pre;
+int HP_guild_member_added_post;
+int HP_guild_leave_pre;
+int HP_guild_leave_post;
+int HP_guild_member_withdraw_pre;
+int HP_guild_member_withdraw_post;
+int HP_guild_expulsion_pre;
+int HP_guild_expulsion_post;
+int HP_guild_skillup_pre;
+int HP_guild_skillup_post;
+int HP_guild_block_skill_pre;
+int HP_guild_block_skill_post;
+int HP_guild_reqalliance_pre;
+int HP_guild_reqalliance_post;
+int HP_guild_reply_reqalliance_pre;
+int HP_guild_reply_reqalliance_post;
+int HP_guild_allianceack_pre;
+int HP_guild_allianceack_post;
+int HP_guild_delalliance_pre;
+int HP_guild_delalliance_post;
+int HP_guild_opposition_pre;
+int HP_guild_opposition_post;
+int HP_guild_check_alliance_pre;
+int HP_guild_check_alliance_post;
+int HP_guild_send_memberinfoshort_pre;
+int HP_guild_send_memberinfoshort_post;
+int HP_guild_recv_memberinfoshort_pre;
+int HP_guild_recv_memberinfoshort_post;
+int HP_guild_change_memberposition_pre;
+int HP_guild_change_memberposition_post;
+int HP_guild_memberposition_changed_pre;
+int HP_guild_memberposition_changed_post;
+int HP_guild_change_position_pre;
+int HP_guild_change_position_post;
+int HP_guild_position_changed_pre;
+int HP_guild_position_changed_post;
+int HP_guild_change_notice_pre;
+int HP_guild_change_notice_post;
+int HP_guild_notice_changed_pre;
+int HP_guild_notice_changed_post;
+int HP_guild_change_emblem_pre;
+int HP_guild_change_emblem_post;
+int HP_guild_emblem_changed_pre;
+int HP_guild_emblem_changed_post;
+int HP_guild_send_message_pre;
+int HP_guild_send_message_post;
+int HP_guild_recv_message_pre;
+int HP_guild_recv_message_post;
+int HP_guild_send_dot_remove_pre;
+int HP_guild_send_dot_remove_post;
+int HP_guild_skillupack_pre;
+int HP_guild_skillupack_post;
+int HP_guild_dobreak_pre;
+int HP_guild_dobreak_post;
+int HP_guild_broken_pre;
+int HP_guild_broken_post;
+int HP_guild_gm_change_pre;
+int HP_guild_gm_change_post;
+int HP_guild_gm_changed_pre;
+int HP_guild_gm_changed_post;
+int HP_guild_castle_map_init_pre;
+int HP_guild_castle_map_init_post;
+int HP_guild_castledatasave_pre;
+int HP_guild_castledatasave_post;
+int HP_guild_castledataloadack_pre;
+int HP_guild_castledataloadack_post;
+int HP_guild_castle_reconnect_pre;
+int HP_guild_castle_reconnect_post;
+int HP_guild_agit_start_pre;
+int HP_guild_agit_start_post;
+int HP_guild_agit_end_pre;
+int HP_guild_agit_end_post;
+int HP_guild_agit2_start_pre;
+int HP_guild_agit2_start_post;
+int HP_guild_agit2_end_pre;
+int HP_guild_agit2_end_post;
+int HP_guild_flag_add_pre;
+int HP_guild_flag_add_post;
+int HP_guild_flag_remove_pre;
+int HP_guild_flag_remove_post;
+int HP_guild_flags_clear_pre;
+int HP_guild_flags_clear_post;
+int HP_guild_aura_refresh_pre;
+int HP_guild_aura_refresh_post;
+int HP_guild_payexp_timer_pre;
+int HP_guild_payexp_timer_post;
+int HP_guild_sd_check_pre;
+int HP_guild_sd_check_post;
+int HP_guild_read_guildskill_tree_db_pre;
+int HP_guild_read_guildskill_tree_db_post;
+int HP_guild_read_castledb_pre;
+int HP_guild_read_castledb_post;
+int HP_guild_payexp_timer_sub_pre;
+int HP_guild_payexp_timer_sub_post;
+int HP_guild_send_xy_timer_sub_pre;
+int HP_guild_send_xy_timer_sub_post;
+int HP_guild_send_xy_timer_pre;
+int HP_guild_send_xy_timer_post;
+int HP_guild_create_expcache_pre;
+int HP_guild_create_expcache_post;
+int HP_guild_eventlist_db_final_pre;
+int HP_guild_eventlist_db_final_post;
+int HP_guild_expcache_db_final_pre;
+int HP_guild_expcache_db_final_post;
+int HP_guild_castle_db_final_pre;
+int HP_guild_castle_db_final_post;
+int HP_guild_broken_sub_pre;
+int HP_guild_broken_sub_post;
+int HP_guild_castle_broken_sub_pre;
+int HP_guild_castle_broken_sub_post;
+int HP_guild_makemember_pre;
+int HP_guild_makemember_post;
+int HP_guild_check_member_pre;
+int HP_guild_check_member_post;
+int HP_guild_get_alliance_count_pre;
+int HP_guild_get_alliance_count_post;
+int HP_guild_castle_reconnect_sub_pre;
+int HP_guild_castle_reconnect_sub_post;
+int HP_gstorage_id2storage_pre;
+int HP_gstorage_id2storage_post;
+int HP_gstorage_id2storage2_pre;
+int HP_gstorage_id2storage2_post;
+int HP_gstorage_init_pre;
+int HP_gstorage_init_post;
+int HP_gstorage_final_pre;
+int HP_gstorage_final_post;
+int HP_gstorage_delete_pre;
+int HP_gstorage_delete_post;
+int HP_gstorage_open_pre;
+int HP_gstorage_open_post;
+int HP_gstorage_additem_pre;
+int HP_gstorage_additem_post;
+int HP_gstorage_delitem_pre;
+int HP_gstorage_delitem_post;
+int HP_gstorage_add_pre;
+int HP_gstorage_add_post;
+int HP_gstorage_get_pre;
+int HP_gstorage_get_post;
+int HP_gstorage_addfromcart_pre;
+int HP_gstorage_addfromcart_post;
+int HP_gstorage_gettocart_pre;
+int HP_gstorage_gettocart_post;
+int HP_gstorage_close_pre;
+int HP_gstorage_close_post;
+int HP_gstorage_pc_quit_pre;
+int HP_gstorage_pc_quit_post;
+int HP_gstorage_save_pre;
+int HP_gstorage_save_post;
+int HP_gstorage_saved_pre;
+int HP_gstorage_saved_post;
+int HP_gstorage_create_pre;
+int HP_gstorage_create_post;
+int HP_homun_init_pre;
+int HP_homun_init_post;
+int HP_homun_final_pre;
+int HP_homun_final_post;
+int HP_homun_reload_pre;
+int HP_homun_reload_post;
+int HP_homun_reload_skill_pre;
+int HP_homun_reload_skill_post;
+int HP_homun_get_viewdata_pre;
+int HP_homun_get_viewdata_post;
+int HP_homun_class2type_pre;
+int HP_homun_class2type_post;
+int HP_homun_damaged_pre;
+int HP_homun_damaged_post;
+int HP_homun_dead_pre;
+int HP_homun_dead_post;
+int HP_homun_vaporize_pre;
+int HP_homun_vaporize_post;
+int HP_homun_delete_pre;
+int HP_homun_delete_post;
+int HP_homun_checkskill_pre;
+int HP_homun_checkskill_post;
+int HP_homun_calc_skilltree_pre;
+int HP_homun_calc_skilltree_post;
+int HP_homun_skill_tree_get_max_pre;
+int HP_homun_skill_tree_get_max_post;
+int HP_homun_skillup_pre;
+int HP_homun_skillup_post;
+int HP_homun_levelup_pre;
+int HP_homun_levelup_post;
+int HP_homun_change_class_pre;
+int HP_homun_change_class_post;
+int HP_homun_evolve_pre;
+int HP_homun_evolve_post;
+int HP_homun_mutate_pre;
+int HP_homun_mutate_post;
+int HP_homun_gainexp_pre;
+int HP_homun_gainexp_post;
+int HP_homun_add_intimacy_pre;
+int HP_homun_add_intimacy_post;
+int HP_homun_consume_intimacy_pre;
+int HP_homun_consume_intimacy_post;
+int HP_homun_healed_pre;
+int HP_homun_healed_post;
+int HP_homun_save_pre;
+int HP_homun_save_post;
+int HP_homun_menu_pre;
+int HP_homun_menu_post;
+int HP_homun_feed_pre;
+int HP_homun_feed_post;
+int HP_homun_hunger_timer_pre;
+int HP_homun_hunger_timer_post;
+int HP_homun_hunger_timer_delete_pre;
+int HP_homun_hunger_timer_delete_post;
+int HP_homun_change_name_pre;
+int HP_homun_change_name_post;
+int HP_homun_change_name_ack_pre;
+int HP_homun_change_name_ack_post;
+int HP_homun_db_search_pre;
+int HP_homun_db_search_post;
+int HP_homun_create_pre;
+int HP_homun_create_post;
+int HP_homun_init_timers_pre;
+int HP_homun_init_timers_post;
+int HP_homun_call_pre;
+int HP_homun_call_post;
+int HP_homun_recv_data_pre;
+int HP_homun_recv_data_post;
+int HP_homun_creation_request_pre;
+int HP_homun_creation_request_post;
+int HP_homun_ressurect_pre;
+int HP_homun_ressurect_post;
+int HP_homun_revive_pre;
+int HP_homun_revive_post;
+int HP_homun_stat_reset_pre;
+int HP_homun_stat_reset_post;
+int HP_homun_shuffle_pre;
+int HP_homun_shuffle_post;
+int HP_homun_read_db_sub_pre;
+int HP_homun_read_db_sub_post;
+int HP_homun_read_db_pre;
+int HP_homun_read_db_post;
+int HP_homun_read_skill_db_sub_pre;
+int HP_homun_read_skill_db_sub_post;
+int HP_homun_skill_db_read_pre;
+int HP_homun_skill_db_read_post;
+int HP_homun_exp_db_read_pre;
+int HP_homun_exp_db_read_post;
+int HP_homun_addspiritball_pre;
+int HP_homun_addspiritball_post;
+int HP_homun_delspiritball_pre;
+int HP_homun_delspiritball_post;
+int HP_instance_init_pre;
+int HP_instance_init_post;
+int HP_instance_final_pre;
+int HP_instance_final_post;
+int HP_instance_create_pre;
+int HP_instance_create_post;
+int HP_instance_add_map_pre;
+int HP_instance_add_map_post;
+int HP_instance_del_map_pre;
+int HP_instance_del_map_post;
+int HP_instance_map2imap_pre;
+int HP_instance_map2imap_post;
+int HP_instance_mapid2imapid_pre;
+int HP_instance_mapid2imapid_post;
+int HP_instance_destroy_pre;
+int HP_instance_destroy_post;
+int HP_instance_start_pre;
+int HP_instance_start_post;
+int HP_instance_check_idle_pre;
+int HP_instance_check_idle_post;
+int HP_instance_check_kick_pre;
+int HP_instance_check_kick_post;
+int HP_instance_set_timeout_pre;
+int HP_instance_set_timeout_post;
+int HP_instance_valid_pre;
+int HP_instance_valid_post;
+int HP_instance_destroy_timer_pre;
+int HP_instance_destroy_timer_post;
+int HP_intif_parse_pre;
+int HP_intif_parse_post;
+int HP_intif_create_pet_pre;
+int HP_intif_create_pet_post;
+int HP_intif_broadcast_pre;
+int HP_intif_broadcast_post;
+int HP_intif_broadcast2_pre;
+int HP_intif_broadcast2_post;
+int HP_intif_main_message_pre;
+int HP_intif_main_message_post;
+int HP_intif_wis_message_pre;
+int HP_intif_wis_message_post;
+int HP_intif_wis_message_to_gm_pre;
+int HP_intif_wis_message_to_gm_post;
+int HP_intif_saveregistry_pre;
+int HP_intif_saveregistry_post;
+int HP_intif_request_registry_pre;
+int HP_intif_request_registry_post;
+int HP_intif_request_guild_storage_pre;
+int HP_intif_request_guild_storage_post;
+int HP_intif_send_guild_storage_pre;
+int HP_intif_send_guild_storage_post;
+int HP_intif_create_party_pre;
+int HP_intif_create_party_post;
+int HP_intif_request_partyinfo_pre;
+int HP_intif_request_partyinfo_post;
+int HP_intif_party_addmember_pre;
+int HP_intif_party_addmember_post;
+int HP_intif_party_changeoption_pre;
+int HP_intif_party_changeoption_post;
+int HP_intif_party_leave_pre;
+int HP_intif_party_leave_post;
+int HP_intif_party_changemap_pre;
+int HP_intif_party_changemap_post;
+int HP_intif_break_party_pre;
+int HP_intif_break_party_post;
+int HP_intif_party_message_pre;
+int HP_intif_party_message_post;
+int HP_intif_party_leaderchange_pre;
+int HP_intif_party_leaderchange_post;
+int HP_intif_guild_create_pre;
+int HP_intif_guild_create_post;
+int HP_intif_guild_request_info_pre;
+int HP_intif_guild_request_info_post;
+int HP_intif_guild_addmember_pre;
+int HP_intif_guild_addmember_post;
+int HP_intif_guild_leave_pre;
+int HP_intif_guild_leave_post;
+int HP_intif_guild_memberinfoshort_pre;
+int HP_intif_guild_memberinfoshort_post;
+int HP_intif_guild_break_pre;
+int HP_intif_guild_break_post;
+int HP_intif_guild_message_pre;
+int HP_intif_guild_message_post;
+int HP_intif_guild_change_gm_pre;
+int HP_intif_guild_change_gm_post;
+int HP_intif_guild_change_basicinfo_pre;
+int HP_intif_guild_change_basicinfo_post;
+int HP_intif_guild_change_memberinfo_pre;
+int HP_intif_guild_change_memberinfo_post;
+int HP_intif_guild_position_pre;
+int HP_intif_guild_position_post;
+int HP_intif_guild_skillup_pre;
+int HP_intif_guild_skillup_post;
+int HP_intif_guild_alliance_pre;
+int HP_intif_guild_alliance_post;
+int HP_intif_guild_notice_pre;
+int HP_intif_guild_notice_post;
+int HP_intif_guild_emblem_pre;
+int HP_intif_guild_emblem_post;
+int HP_intif_guild_castle_dataload_pre;
+int HP_intif_guild_castle_dataload_post;
+int HP_intif_guild_castle_datasave_pre;
+int HP_intif_guild_castle_datasave_post;
+int HP_intif_request_petdata_pre;
+int HP_intif_request_petdata_post;
+int HP_intif_save_petdata_pre;
+int HP_intif_save_petdata_post;
+int HP_intif_delete_petdata_pre;
+int HP_intif_delete_petdata_post;
+int HP_intif_rename_pre;
+int HP_intif_rename_post;
+int HP_intif_homunculus_create_pre;
+int HP_intif_homunculus_create_post;
+int HP_intif_homunculus_requestload_pre;
+int HP_intif_homunculus_requestload_post;
+int HP_intif_homunculus_requestsave_pre;
+int HP_intif_homunculus_requestsave_post;
+int HP_intif_homunculus_requestdelete_pre;
+int HP_intif_homunculus_requestdelete_post;
+int HP_intif_request_questlog_pre;
+int HP_intif_request_questlog_post;
+int HP_intif_quest_save_pre;
+int HP_intif_quest_save_post;
+int HP_intif_mercenary_create_pre;
+int HP_intif_mercenary_create_post;
+int HP_intif_mercenary_request_pre;
+int HP_intif_mercenary_request_post;
+int HP_intif_mercenary_delete_pre;
+int HP_intif_mercenary_delete_post;
+int HP_intif_mercenary_save_pre;
+int HP_intif_mercenary_save_post;
+int HP_intif_Mail_requestinbox_pre;
+int HP_intif_Mail_requestinbox_post;
+int HP_intif_Mail_read_pre;
+int HP_intif_Mail_read_post;
+int HP_intif_Mail_getattach_pre;
+int HP_intif_Mail_getattach_post;
+int HP_intif_Mail_delete_pre;
+int HP_intif_Mail_delete_post;
+int HP_intif_Mail_return_pre;
+int HP_intif_Mail_return_post;
+int HP_intif_Mail_send_pre;
+int HP_intif_Mail_send_post;
+int HP_intif_Auction_requestlist_pre;
+int HP_intif_Auction_requestlist_post;
+int HP_intif_Auction_register_pre;
+int HP_intif_Auction_register_post;
+int HP_intif_Auction_cancel_pre;
+int HP_intif_Auction_cancel_post;
+int HP_intif_Auction_close_pre;
+int HP_intif_Auction_close_post;
+int HP_intif_Auction_bid_pre;
+int HP_intif_Auction_bid_post;
+int HP_intif_elemental_create_pre;
+int HP_intif_elemental_create_post;
+int HP_intif_elemental_request_pre;
+int HP_intif_elemental_request_post;
+int HP_intif_elemental_delete_pre;
+int HP_intif_elemental_delete_post;
+int HP_intif_elemental_save_pre;
+int HP_intif_elemental_save_post;
+int HP_intif_request_accinfo_pre;
+int HP_intif_request_accinfo_post;
+int HP_intif_CheckForCharServer_pre;
+int HP_intif_CheckForCharServer_post;
+int HP_intif_pWisMessage_pre;
+int HP_intif_pWisMessage_post;
+int HP_intif_pWisEnd_pre;
+int HP_intif_pWisEnd_post;
+int HP_intif_pWisToGM_sub_pre;
+int HP_intif_pWisToGM_sub_post;
+int HP_intif_pWisToGM_pre;
+int HP_intif_pWisToGM_post;
+int HP_intif_pRegisters_pre;
+int HP_intif_pRegisters_post;
+int HP_intif_pChangeNameOk_pre;
+int HP_intif_pChangeNameOk_post;
+int HP_intif_pMessageToFD_pre;
+int HP_intif_pMessageToFD_post;
+int HP_intif_pLoadGuildStorage_pre;
+int HP_intif_pLoadGuildStorage_post;
+int HP_intif_pSaveGuildStorage_pre;
+int HP_intif_pSaveGuildStorage_post;
+int HP_intif_pPartyCreated_pre;
+int HP_intif_pPartyCreated_post;
+int HP_intif_pPartyInfo_pre;
+int HP_intif_pPartyInfo_post;
+int HP_intif_pPartyMemberAdded_pre;
+int HP_intif_pPartyMemberAdded_post;
+int HP_intif_pPartyOptionChanged_pre;
+int HP_intif_pPartyOptionChanged_post;
+int HP_intif_pPartyMemberWithdraw_pre;
+int HP_intif_pPartyMemberWithdraw_post;
+int HP_intif_pPartyMove_pre;
+int HP_intif_pPartyMove_post;
+int HP_intif_pPartyBroken_pre;
+int HP_intif_pPartyBroken_post;
+int HP_intif_pPartyMessage_pre;
+int HP_intif_pPartyMessage_post;
+int HP_intif_pGuildCreated_pre;
+int HP_intif_pGuildCreated_post;
+int HP_intif_pGuildInfo_pre;
+int HP_intif_pGuildInfo_post;
+int HP_intif_pGuildMemberAdded_pre;
+int HP_intif_pGuildMemberAdded_post;
+int HP_intif_pGuildMemberWithdraw_pre;
+int HP_intif_pGuildMemberWithdraw_post;
+int HP_intif_pGuildMemberInfoShort_pre;
+int HP_intif_pGuildMemberInfoShort_post;
+int HP_intif_pGuildBroken_pre;
+int HP_intif_pGuildBroken_post;
+int HP_intif_pGuildMessage_pre;
+int HP_intif_pGuildMessage_post;
+int HP_intif_pGuildBasicInfoChanged_pre;
+int HP_intif_pGuildBasicInfoChanged_post;
+int HP_intif_pGuildMemberInfoChanged_pre;
+int HP_intif_pGuildMemberInfoChanged_post;
+int HP_intif_pGuildPosition_pre;
+int HP_intif_pGuildPosition_post;
+int HP_intif_pGuildSkillUp_pre;
+int HP_intif_pGuildSkillUp_post;
+int HP_intif_pGuildAlliance_pre;
+int HP_intif_pGuildAlliance_post;
+int HP_intif_pGuildNotice_pre;
+int HP_intif_pGuildNotice_post;
+int HP_intif_pGuildEmblem_pre;
+int HP_intif_pGuildEmblem_post;
+int HP_intif_pGuildCastleDataLoad_pre;
+int HP_intif_pGuildCastleDataLoad_post;
+int HP_intif_pGuildMasterChanged_pre;
+int HP_intif_pGuildMasterChanged_post;
+int HP_intif_pQuestLog_pre;
+int HP_intif_pQuestLog_post;
+int HP_intif_pQuestSave_pre;
+int HP_intif_pQuestSave_post;
+int HP_intif_pMailInboxReceived_pre;
+int HP_intif_pMailInboxReceived_post;
+int HP_intif_pMailNew_pre;
+int HP_intif_pMailNew_post;
+int HP_intif_pMailGetAttach_pre;
+int HP_intif_pMailGetAttach_post;
+int HP_intif_pMailDelete_pre;
+int HP_intif_pMailDelete_post;
+int HP_intif_pMailReturn_pre;
+int HP_intif_pMailReturn_post;
+int HP_intif_pMailSend_pre;
+int HP_intif_pMailSend_post;
+int HP_intif_pAuctionResults_pre;
+int HP_intif_pAuctionResults_post;
+int HP_intif_pAuctionRegister_pre;
+int HP_intif_pAuctionRegister_post;
+int HP_intif_pAuctionCancel_pre;
+int HP_intif_pAuctionCancel_post;
+int HP_intif_pAuctionClose_pre;
+int HP_intif_pAuctionClose_post;
+int HP_intif_pAuctionMessage_pre;
+int HP_intif_pAuctionMessage_post;
+int HP_intif_pAuctionBid_pre;
+int HP_intif_pAuctionBid_post;
+int HP_intif_pMercenaryReceived_pre;
+int HP_intif_pMercenaryReceived_post;
+int HP_intif_pMercenaryDeleted_pre;
+int HP_intif_pMercenaryDeleted_post;
+int HP_intif_pMercenarySaved_pre;
+int HP_intif_pMercenarySaved_post;
+int HP_intif_pElementalReceived_pre;
+int HP_intif_pElementalReceived_post;
+int HP_intif_pElementalDeleted_pre;
+int HP_intif_pElementalDeleted_post;
+int HP_intif_pElementalSaved_pre;
+int HP_intif_pElementalSaved_post;
+int HP_intif_pCreatePet_pre;
+int HP_intif_pCreatePet_post;
+int HP_intif_pRecvPetData_pre;
+int HP_intif_pRecvPetData_post;
+int HP_intif_pSavePetOk_pre;
+int HP_intif_pSavePetOk_post;
+int HP_intif_pDeletePetOk_pre;
+int HP_intif_pDeletePetOk_post;
+int HP_intif_pCreateHomunculus_pre;
+int HP_intif_pCreateHomunculus_post;
+int HP_intif_pRecvHomunculusData_pre;
+int HP_intif_pRecvHomunculusData_post;
+int HP_intif_pSaveHomunculusOk_pre;
+int HP_intif_pSaveHomunculusOk_post;
+int HP_intif_pDeleteHomunculusOk_pre;
+int HP_intif_pDeleteHomunculusOk_post;
+int HP_ircbot_init_pre;
+int HP_ircbot_init_post;
+int HP_ircbot_final_pre;
+int HP_ircbot_final_post;
+int HP_ircbot_parse_pre;
+int HP_ircbot_parse_post;
+int HP_ircbot_parse_sub_pre;
+int HP_ircbot_parse_sub_post;
+int HP_ircbot_parse_source_pre;
+int HP_ircbot_parse_source_post;
+int HP_ircbot_func_search_pre;
+int HP_ircbot_func_search_post;
+int HP_ircbot_connect_timer_pre;
+int HP_ircbot_connect_timer_post;
+int HP_ircbot_identify_timer_pre;
+int HP_ircbot_identify_timer_post;
+int HP_ircbot_join_timer_pre;
+int HP_ircbot_join_timer_post;
+int HP_ircbot_send_pre;
+int HP_ircbot_send_post;
+int HP_ircbot_relay_pre;
+int HP_ircbot_relay_post;
+int HP_ircbot_pong_pre;
+int HP_ircbot_pong_post;
+int HP_ircbot_privmsg_pre;
+int HP_ircbot_privmsg_post;
+int HP_ircbot_userjoin_pre;
+int HP_ircbot_userjoin_post;
+int HP_ircbot_userleave_pre;
+int HP_ircbot_userleave_post;
+int HP_ircbot_usernick_pre;
+int HP_ircbot_usernick_post;
+int HP_itemdb_init_pre;
+int HP_itemdb_init_post;
+int HP_itemdb_final_pre;
+int HP_itemdb_final_post;
+int HP_itemdb_reload_pre;
+int HP_itemdb_reload_post;
+int HP_itemdb_name_constants_pre;
+int HP_itemdb_name_constants_post;
+int HP_itemdb_force_name_constants_pre;
+int HP_itemdb_force_name_constants_post;
+int HP_itemdb_read_groups_pre;
+int HP_itemdb_read_groups_post;
+int HP_itemdb_read_chains_pre;
+int HP_itemdb_read_chains_post;
+int HP_itemdb_read_packages_pre;
+int HP_itemdb_read_packages_post;
+int HP_itemdb_write_cached_packages_pre;
+int HP_itemdb_write_cached_packages_post;
+int HP_itemdb_read_cached_packages_pre;
+int HP_itemdb_read_cached_packages_post;
+int HP_itemdb_name2id_pre;
+int HP_itemdb_name2id_post;
+int HP_itemdb_search_name_pre;
+int HP_itemdb_search_name_post;
+int HP_itemdb_search_name_array_pre;
+int HP_itemdb_search_name_array_post;
+int HP_itemdb_load_pre;
+int HP_itemdb_load_post;
+int HP_itemdb_search_pre;
+int HP_itemdb_search_post;
+int HP_itemdb_parse_dbrow_pre;
+int HP_itemdb_parse_dbrow_post;
+int HP_itemdb_exists_pre;
+int HP_itemdb_exists_post;
+int HP_itemdb_in_group_pre;
+int HP_itemdb_in_group_post;
+int HP_itemdb_group_item_pre;
+int HP_itemdb_group_item_post;
+int HP_itemdb_chain_item_pre;
+int HP_itemdb_chain_item_post;
+int HP_itemdb_package_item_pre;
+int HP_itemdb_package_item_post;
+int HP_itemdb_searchname_sub_pre;
+int HP_itemdb_searchname_sub_post;
+int HP_itemdb_searchname_array_sub_pre;
+int HP_itemdb_searchname_array_sub_post;
+int HP_itemdb_searchrandomid_pre;
+int HP_itemdb_searchrandomid_post;
+int HP_itemdb_typename_pre;
+int HP_itemdb_typename_post;
+int HP_itemdb_jobid2mapid_pre;
+int HP_itemdb_jobid2mapid_post;
+int HP_itemdb_create_dummy_data_pre;
+int HP_itemdb_create_dummy_data_post;
+int HP_itemdb_create_item_data_pre;
+int HP_itemdb_create_item_data_post;
+int HP_itemdb_isequip_pre;
+int HP_itemdb_isequip_post;
+int HP_itemdb_isequip2_pre;
+int HP_itemdb_isequip2_post;
+int HP_itemdb_isstackable_pre;
+int HP_itemdb_isstackable_post;
+int HP_itemdb_isstackable2_pre;
+int HP_itemdb_isstackable2_post;
+int HP_itemdb_isdropable_sub_pre;
+int HP_itemdb_isdropable_sub_post;
+int HP_itemdb_cantrade_sub_pre;
+int HP_itemdb_cantrade_sub_post;
+int HP_itemdb_canpartnertrade_sub_pre;
+int HP_itemdb_canpartnertrade_sub_post;
+int HP_itemdb_cansell_sub_pre;
+int HP_itemdb_cansell_sub_post;
+int HP_itemdb_cancartstore_sub_pre;
+int HP_itemdb_cancartstore_sub_post;
+int HP_itemdb_canstore_sub_pre;
+int HP_itemdb_canstore_sub_post;
+int HP_itemdb_canguildstore_sub_pre;
+int HP_itemdb_canguildstore_sub_post;
+int HP_itemdb_canmail_sub_pre;
+int HP_itemdb_canmail_sub_post;
+int HP_itemdb_canauction_sub_pre;
+int HP_itemdb_canauction_sub_post;
+int HP_itemdb_isrestricted_pre;
+int HP_itemdb_isrestricted_post;
+int HP_itemdb_isidentified_pre;
+int HP_itemdb_isidentified_post;
+int HP_itemdb_isidentified2_pre;
+int HP_itemdb_isidentified2_post;
+int HP_itemdb_read_itemavail_pre;
+int HP_itemdb_read_itemavail_post;
+int HP_itemdb_read_itemtrade_pre;
+int HP_itemdb_read_itemtrade_post;
+int HP_itemdb_read_itemdelay_pre;
+int HP_itemdb_read_itemdelay_post;
+int HP_itemdb_read_stack_pre;
+int HP_itemdb_read_stack_post;
+int HP_itemdb_read_buyingstore_pre;
+int HP_itemdb_read_buyingstore_post;
+int HP_itemdb_read_nouse_pre;
+int HP_itemdb_read_nouse_post;
+int HP_itemdb_combo_split_atoi_pre;
+int HP_itemdb_combo_split_atoi_post;
+int HP_itemdb_read_combos_pre;
+int HP_itemdb_read_combos_post;
+int HP_itemdb_gendercheck_pre;
+int HP_itemdb_gendercheck_post;
+int HP_itemdb_re_split_atoi_pre;
+int HP_itemdb_re_split_atoi_post;
+int HP_itemdb_readdb_pre;
+int HP_itemdb_readdb_post;
+int HP_itemdb_read_sqldb_pre;
+int HP_itemdb_read_sqldb_post;
+int HP_itemdb_unique_id_pre;
+int HP_itemdb_unique_id_post;
+int HP_itemdb_uid_load_pre;
+int HP_itemdb_uid_load_post;
+int HP_itemdb_read_pre;
+int HP_itemdb_read_post;
+int HP_itemdb_destroy_item_data_pre;
+int HP_itemdb_destroy_item_data_post;
+int HP_itemdb_final_sub_pre;
+int HP_itemdb_final_sub_post;
+int HP_logs_pick_pc_pre;
+int HP_logs_pick_pc_post;
+int HP_logs_pick_mob_pre;
+int HP_logs_pick_mob_post;
+int HP_logs_zeny_pre;
+int HP_logs_zeny_post;
+int HP_logs_npc_pre;
+int HP_logs_npc_post;
+int HP_logs_chat_pre;
+int HP_logs_chat_post;
+int HP_logs_atcommand_pre;
+int HP_logs_atcommand_post;
+int HP_logs_branch_pre;
+int HP_logs_branch_post;
+int HP_logs_mvpdrop_pre;
+int HP_logs_mvpdrop_post;
+int HP_logs_pick_sub_pre;
+int HP_logs_pick_sub_post;
+int HP_logs_zeny_sub_pre;
+int HP_logs_zeny_sub_post;
+int HP_logs_npc_sub_pre;
+int HP_logs_npc_sub_post;
+int HP_logs_chat_sub_pre;
+int HP_logs_chat_sub_post;
+int HP_logs_atcommand_sub_pre;
+int HP_logs_atcommand_sub_post;
+int HP_logs_branch_sub_pre;
+int HP_logs_branch_sub_post;
+int HP_logs_mvpdrop_sub_pre;
+int HP_logs_mvpdrop_sub_post;
+int HP_logs_config_read_pre;
+int HP_logs_config_read_post;
+int HP_logs_config_done_pre;
+int HP_logs_config_done_post;
+int HP_logs_sql_init_pre;
+int HP_logs_sql_init_post;
+int HP_logs_sql_final_pre;
+int HP_logs_sql_final_post;
+int HP_logs_picktype2char_pre;
+int HP_logs_picktype2char_post;
+int HP_logs_chattype2char_pre;
+int HP_logs_chattype2char_post;
+int HP_logs_should_log_item_pre;
+int HP_logs_should_log_item_post;
+int HP_mail_clear_pre;
+int HP_mail_clear_post;
+int HP_mail_removeitem_pre;
+int HP_mail_removeitem_post;
+int HP_mail_removezeny_pre;
+int HP_mail_removezeny_post;
+int HP_mail_setitem_pre;
+int HP_mail_setitem_post;
+int HP_mail_setattachment_pre;
+int HP_mail_setattachment_post;
+int HP_mail_getattachment_pre;
+int HP_mail_getattachment_post;
+int HP_mail_openmail_pre;
+int HP_mail_openmail_post;
+int HP_mail_deliveryfail_pre;
+int HP_mail_deliveryfail_post;
+int HP_mail_invalid_operation_pre;
+int HP_mail_invalid_operation_post;
+int HP_map_zone_init_pre;
+int HP_map_zone_init_post;
+int HP_map_zone_remove_pre;
+int HP_map_zone_remove_post;
+int HP_map_zone_apply_pre;
+int HP_map_zone_apply_post;
+int HP_map_zone_change_pre;
+int HP_map_zone_change_post;
+int HP_map_zone_change2_pre;
+int HP_map_zone_change2_post;
+int HP_map_getcell_pre;
+int HP_map_getcell_post;
+int HP_map_setgatcell_pre;
+int HP_map_setgatcell_post;
+int HP_map_cellfromcache_pre;
+int HP_map_cellfromcache_post;
+int HP_map_setusers_pre;
+int HP_map_setusers_post;
+int HP_map_getusers_pre;
+int HP_map_getusers_post;
+int HP_map_usercount_pre;
+int HP_map_usercount_post;
+int HP_map_freeblock_pre;
+int HP_map_freeblock_post;
+int HP_map_freeblock_lock_pre;
+int HP_map_freeblock_lock_post;
+int HP_map_freeblock_unlock_pre;
+int HP_map_freeblock_unlock_post;
+int HP_map_addblock_pre;
+int HP_map_addblock_post;
+int HP_map_delblock_pre;
+int HP_map_delblock_post;
+int HP_map_moveblock_pre;
+int HP_map_moveblock_post;
+int HP_map_count_oncell_pre;
+int HP_map_count_oncell_post;
+int HP_map_find_skill_unit_oncell_pre;
+int HP_map_find_skill_unit_oncell_post;
+int HP_map_get_new_object_id_pre;
+int HP_map_get_new_object_id_post;
+int HP_map_search_freecell_pre;
+int HP_map_search_freecell_post;
+int HP_map_quit_pre;
+int HP_map_quit_post;
+int HP_map_addnpc_pre;
+int HP_map_addnpc_post;
+int HP_map_clearflooritem_timer_pre;
+int HP_map_clearflooritem_timer_post;
+int HP_map_removemobs_timer_pre;
+int HP_map_removemobs_timer_post;
+int HP_map_clearflooritem_pre;
+int HP_map_clearflooritem_post;
+int HP_map_addflooritem_pre;
+int HP_map_addflooritem_post;
+int HP_map_addnickdb_pre;
+int HP_map_addnickdb_post;
+int HP_map_delnickdb_pre;
+int HP_map_delnickdb_post;
+int HP_map_reqnickdb_pre;
+int HP_map_reqnickdb_post;
+int HP_map_charid2nick_pre;
+int HP_map_charid2nick_post;
+int HP_map_charid2sd_pre;
+int HP_map_charid2sd_post;
+int HP_map_vforeachpc_pre;
+int HP_map_vforeachpc_post;
+int HP_map_vforeachmob_pre;
+int HP_map_vforeachmob_post;
+int HP_map_vforeachnpc_pre;
+int HP_map_vforeachnpc_post;
+int HP_map_vforeachregen_pre;
+int HP_map_vforeachregen_post;
+int HP_map_vforeachiddb_pre;
+int HP_map_vforeachiddb_post;
+int HP_map_vforeachinrange_pre;
+int HP_map_vforeachinrange_post;
+int HP_map_vforeachinshootrange_pre;
+int HP_map_vforeachinshootrange_post;
+int HP_map_vforeachinarea_pre;
+int HP_map_vforeachinarea_post;
+int HP_map_vforcountinrange_pre;
+int HP_map_vforcountinrange_post;
+int HP_map_vforcountinarea_pre;
+int HP_map_vforcountinarea_post;
+int HP_map_vforeachinmovearea_pre;
+int HP_map_vforeachinmovearea_post;
+int HP_map_vforeachincell_pre;
+int HP_map_vforeachincell_post;
+int HP_map_vforeachinpath_pre;
+int HP_map_vforeachinpath_post;
+int HP_map_vforeachinmap_pre;
+int HP_map_vforeachinmap_post;
+int HP_map_vforeachininstance_pre;
+int HP_map_vforeachininstance_post;
+int HP_map_id2sd_pre;
+int HP_map_id2sd_post;
+int HP_map_id2md_pre;
+int HP_map_id2md_post;
+int HP_map_id2nd_pre;
+int HP_map_id2nd_post;
+int HP_map_id2hd_pre;
+int HP_map_id2hd_post;
+int HP_map_id2mc_pre;
+int HP_map_id2mc_post;
+int HP_map_id2cd_pre;
+int HP_map_id2cd_post;
+int HP_map_id2bl_pre;
+int HP_map_id2bl_post;
+int HP_map_blid_exists_pre;
+int HP_map_blid_exists_post;
+int HP_map_mapindex2mapid_pre;
+int HP_map_mapindex2mapid_post;
+int HP_map_mapname2mapid_pre;
+int HP_map_mapname2mapid_post;
+int HP_map_mapname2ipport_pre;
+int HP_map_mapname2ipport_post;
+int HP_map_setipport_pre;
+int HP_map_setipport_post;
+int HP_map_eraseipport_pre;
+int HP_map_eraseipport_post;
+int HP_map_eraseallipport_pre;
+int HP_map_eraseallipport_post;
+int HP_map_addiddb_pre;
+int HP_map_addiddb_post;
+int HP_map_deliddb_pre;
+int HP_map_deliddb_post;
+int HP_map_nick2sd_pre;
+int HP_map_nick2sd_post;
+int HP_map_getmob_boss_pre;
+int HP_map_getmob_boss_post;
+int HP_map_id2boss_pre;
+int HP_map_id2boss_post;
+int HP_map_reloadnpc_pre;
+int HP_map_reloadnpc_post;
+int HP_map_check_dir_pre;
+int HP_map_check_dir_post;
+int HP_map_calc_dir_pre;
+int HP_map_calc_dir_post;
+int HP_map_random_dir_pre;
+int HP_map_random_dir_post;
+int HP_map_cleanup_sub_pre;
+int HP_map_cleanup_sub_post;
+int HP_map_delmap_pre;
+int HP_map_delmap_post;
+int HP_map_flags_init_pre;
+int HP_map_flags_init_post;
+int HP_map_iwall_set_pre;
+int HP_map_iwall_set_post;
+int HP_map_iwall_get_pre;
+int HP_map_iwall_get_post;
+int HP_map_iwall_remove_pre;
+int HP_map_iwall_remove_post;
+int HP_map_addmobtolist_pre;
+int HP_map_addmobtolist_post;
+int HP_map_spawnmobs_pre;
+int HP_map_spawnmobs_post;
+int HP_map_removemobs_pre;
+int HP_map_removemobs_post;
+int HP_map_addmap2db_pre;
+int HP_map_addmap2db_post;
+int HP_map_removemapdb_pre;
+int HP_map_removemapdb_post;
+int HP_map_clean_pre;
+int HP_map_clean_post;
+int HP_map_do_shutdown_pre;
+int HP_map_do_shutdown_post;
+int HP_map_freeblock_timer_pre;
+int HP_map_freeblock_timer_post;
+int HP_map_searchrandfreecell_pre;
+int HP_map_searchrandfreecell_post;
+int HP_map_count_sub_pre;
+int HP_map_count_sub_post;
+int HP_map_create_charid2nick_pre;
+int HP_map_create_charid2nick_post;
+int HP_map_removemobs_sub_pre;
+int HP_map_removemobs_sub_post;
+int HP_map_gat2cell_pre;
+int HP_map_gat2cell_post;
+int HP_map_cell2gat_pre;
+int HP_map_cell2gat_post;
+int HP_map_getcellp_pre;
+int HP_map_getcellp_post;
+int HP_map_setcell_pre;
+int HP_map_setcell_post;
+int HP_map_sub_getcellp_pre;
+int HP_map_sub_getcellp_post;
+int HP_map_sub_setcell_pre;
+int HP_map_sub_setcell_post;
+int HP_map_iwall_nextxy_pre;
+int HP_map_iwall_nextxy_post;
+int HP_map_create_map_data_other_server_pre;
+int HP_map_create_map_data_other_server_post;
+int HP_map_eraseallipport_sub_pre;
+int HP_map_eraseallipport_sub_post;
+int HP_map_init_mapcache_pre;
+int HP_map_init_mapcache_post;
+int HP_map_readfromcache_pre;
+int HP_map_readfromcache_post;
+int HP_map_addmap_pre;
+int HP_map_addmap_post;
+int HP_map_delmapid_pre;
+int HP_map_delmapid_post;
+int HP_map_zone_db_clear_pre;
+int HP_map_zone_db_clear_post;
+int HP_map_list_final_pre;
+int HP_map_list_final_post;
+int HP_map_waterheight_pre;
+int HP_map_waterheight_post;
+int HP_map_readgat_pre;
+int HP_map_readgat_post;
+int HP_map_readallmaps_pre;
+int HP_map_readallmaps_post;
+int HP_map_config_read_pre;
+int HP_map_config_read_post;
+int HP_map_config_read_sub_pre;
+int HP_map_config_read_sub_post;
+int HP_map_reloadnpc_sub_pre;
+int HP_map_reloadnpc_sub_post;
+int HP_map_inter_config_read_pre;
+int HP_map_inter_config_read_post;
+int HP_map_sql_init_pre;
+int HP_map_sql_init_post;
+int HP_map_sql_close_pre;
+int HP_map_sql_close_post;
+int HP_map_zone_mf_cache_pre;
+int HP_map_zone_mf_cache_post;
+int HP_map_zone_str2itemid_pre;
+int HP_map_zone_str2itemid_post;
+int HP_map_zone_str2skillid_pre;
+int HP_map_zone_str2skillid_post;
+int HP_map_zone_bl_type_pre;
+int HP_map_zone_bl_type_post;
+int HP_map_read_zone_db_pre;
+int HP_map_read_zone_db_post;
+int HP_map_db_final_pre;
+int HP_map_db_final_post;
+int HP_map_nick_db_final_pre;
+int HP_map_nick_db_final_post;
+int HP_map_cleanup_db_sub_pre;
+int HP_map_cleanup_db_sub_post;
+int HP_map_abort_sub_pre;
+int HP_map_abort_sub_post;
+int HP_map_helpscreen_pre;
+int HP_map_helpscreen_post;
+int HP_map_versionscreen_pre;
+int HP_map_versionscreen_post;
+int HP_map_arg_next_value_pre;
+int HP_map_arg_next_value_post;
+int HP_map_addblcell_pre;
+int HP_map_addblcell_post;
+int HP_map_delblcell_pre;
+int HP_map_delblcell_post;
+int HP_mapit_alloc_pre;
+int HP_mapit_alloc_post;
+int HP_mapit_free_pre;
+int HP_mapit_free_post;
+int HP_mapit_first_pre;
+int HP_mapit_first_post;
+int HP_mapit_last_pre;
+int HP_mapit_last_post;
+int HP_mapit_next_pre;
+int HP_mapit_next_post;
+int HP_mapit_prev_pre;
+int HP_mapit_prev_post;
+int HP_mapit_exists_pre;
+int HP_mapit_exists_post;
+int HP_mapreg_init_pre;
+int HP_mapreg_init_post;
+int HP_mapreg_final_pre;
+int HP_mapreg_final_post;
+int HP_mapreg_readreg_pre;
+int HP_mapreg_readreg_post;
+int HP_mapreg_readregstr_pre;
+int HP_mapreg_readregstr_post;
+int HP_mapreg_setreg_pre;
+int HP_mapreg_setreg_post;
+int HP_mapreg_setregstr_pre;
+int HP_mapreg_setregstr_post;
+int HP_mapreg_load_pre;
+int HP_mapreg_load_post;
+int HP_mapreg_save_pre;
+int HP_mapreg_save_post;
+int HP_mapreg_save_timer_pre;
+int HP_mapreg_save_timer_post;
+int HP_mapreg_reload_pre;
+int HP_mapreg_reload_post;
+int HP_mapreg_config_read_pre;
+int HP_mapreg_config_read_post;
+int HP_mercenary_init_pre;
+int HP_mercenary_init_post;
+int HP_mercenary_class_pre;
+int HP_mercenary_class_post;
+int HP_mercenary_get_viewdata_pre;
+int HP_mercenary_get_viewdata_post;
+int HP_mercenary_create_pre;
+int HP_mercenary_create_post;
+int HP_mercenary_data_received_pre;
+int HP_mercenary_data_received_post;
+int HP_mercenary_save_pre;
+int HP_mercenary_save_post;
+int HP_mercenary_heal_pre;
+int HP_mercenary_heal_post;
+int HP_mercenary_dead_pre;
+int HP_mercenary_dead_post;
+int HP_mercenary_delete_pre;
+int HP_mercenary_delete_post;
+int HP_mercenary_contract_stop_pre;
+int HP_mercenary_contract_stop_post;
+int HP_mercenary_get_lifetime_pre;
+int HP_mercenary_get_lifetime_post;
+int HP_mercenary_get_guild_pre;
+int HP_mercenary_get_guild_post;
+int HP_mercenary_get_faith_pre;
+int HP_mercenary_get_faith_post;
+int HP_mercenary_set_faith_pre;
+int HP_mercenary_set_faith_post;
+int HP_mercenary_get_calls_pre;
+int HP_mercenary_get_calls_post;
+int HP_mercenary_set_calls_pre;
+int HP_mercenary_set_calls_post;
+int HP_mercenary_kills_pre;
+int HP_mercenary_kills_post;
+int HP_mercenary_checkskill_pre;
+int HP_mercenary_checkskill_post;
+int HP_mercenary_read_db_pre;
+int HP_mercenary_read_db_post;
+int HP_mercenary_read_skilldb_pre;
+int HP_mercenary_read_skilldb_post;
+int HP_mercenary_killbonus_pre;
+int HP_mercenary_killbonus_post;
+int HP_mercenary_search_index_pre;
+int HP_mercenary_search_index_post;
+int HP_mercenary_contract_end_timer_pre;
+int HP_mercenary_contract_end_timer_post;
+int HP_mercenary_read_db_sub_pre;
+int HP_mercenary_read_db_sub_post;
+int HP_mercenary_read_skill_db_sub_pre;
+int HP_mercenary_read_skill_db_sub_post;
+int HP_mob_init_pre;
+int HP_mob_init_post;
+int HP_mob_final_pre;
+int HP_mob_final_post;
+int HP_mob_reload_pre;
+int HP_mob_reload_post;
+int HP_mob_db_pre;
+int HP_mob_db_post;
+int HP_mob_chat_pre;
+int HP_mob_chat_post;
+int HP_mob_makedummymobdb_pre;
+int HP_mob_makedummymobdb_post;
+int HP_mob_spawn_guardian_sub_pre;
+int HP_mob_spawn_guardian_sub_post;
+int HP_mob_skill_id2skill_idx_pre;
+int HP_mob_skill_id2skill_idx_post;
+int HP_mob_db_searchname_pre;
+int HP_mob_db_searchname_post;
+int HP_mob_db_searchname_array_sub_pre;
+int HP_mob_db_searchname_array_sub_post;
+int HP_mob_mvptomb_create_pre;
+int HP_mob_mvptomb_create_post;
+int HP_mob_mvptomb_destroy_pre;
+int HP_mob_mvptomb_destroy_post;
+int HP_mob_db_searchname_array_pre;
+int HP_mob_db_searchname_array_post;
+int HP_mob_db_checkid_pre;
+int HP_mob_db_checkid_post;
+int HP_mob_get_viewdata_pre;
+int HP_mob_get_viewdata_post;
+int HP_mob_parse_dataset_pre;
+int HP_mob_parse_dataset_post;
+int HP_mob_spawn_dataset_pre;
+int HP_mob_spawn_dataset_post;
+int HP_mob_get_random_id_pre;
+int HP_mob_get_random_id_post;
+int HP_mob_ksprotected_pre;
+int HP_mob_ksprotected_post;
+int HP_mob_once_spawn_sub_pre;
+int HP_mob_once_spawn_sub_post;
+int HP_mob_once_spawn_pre;
+int HP_mob_once_spawn_post;
+int HP_mob_once_spawn_area_pre;
+int HP_mob_once_spawn_area_post;
+int HP_mob_spawn_guardian_pre;
+int HP_mob_spawn_guardian_post;
+int HP_mob_spawn_bg_pre;
+int HP_mob_spawn_bg_post;
+int HP_mob_can_reach_pre;
+int HP_mob_can_reach_post;
+int HP_mob_linksearch_pre;
+int HP_mob_linksearch_post;
+int HP_mob_delayspawn_pre;
+int HP_mob_delayspawn_post;
+int HP_mob_setdelayspawn_pre;
+int HP_mob_setdelayspawn_post;
+int HP_mob_count_sub_pre;
+int HP_mob_count_sub_post;
+int HP_mob_spawn_pre;
+int HP_mob_spawn_post;
+int HP_mob_can_changetarget_pre;
+int HP_mob_can_changetarget_post;
+int HP_mob_target_pre;
+int HP_mob_target_post;
+int HP_mob_ai_sub_hard_activesearch_pre;
+int HP_mob_ai_sub_hard_activesearch_post;
+int HP_mob_ai_sub_hard_changechase_pre;
+int HP_mob_ai_sub_hard_changechase_post;
+int HP_mob_ai_sub_hard_bg_ally_pre;
+int HP_mob_ai_sub_hard_bg_ally_post;
+int HP_mob_ai_sub_hard_lootsearch_pre;
+int HP_mob_ai_sub_hard_lootsearch_post;
+int HP_mob_warpchase_sub_pre;
+int HP_mob_warpchase_sub_post;
+int HP_mob_ai_sub_hard_slavemob_pre;
+int HP_mob_ai_sub_hard_slavemob_post;
+int HP_mob_unlocktarget_pre;
+int HP_mob_unlocktarget_post;
+int HP_mob_randomwalk_pre;
+int HP_mob_randomwalk_post;
+int HP_mob_warpchase_pre;
+int HP_mob_warpchase_post;
+int HP_mob_ai_sub_hard_pre;
+int HP_mob_ai_sub_hard_post;
+int HP_mob_ai_sub_hard_timer_pre;
+int HP_mob_ai_sub_hard_timer_post;
+int HP_mob_ai_sub_foreachclient_pre;
+int HP_mob_ai_sub_foreachclient_post;
+int HP_mob_ai_sub_lazy_pre;
+int HP_mob_ai_sub_lazy_post;
+int HP_mob_ai_lazy_pre;
+int HP_mob_ai_lazy_post;
+int HP_mob_ai_hard_pre;
+int HP_mob_ai_hard_post;
+int HP_mob_setdropitem_pre;
+int HP_mob_setdropitem_post;
+int HP_mob_setlootitem_pre;
+int HP_mob_setlootitem_post;
+int HP_mob_delay_item_drop_pre;
+int HP_mob_delay_item_drop_post;
+int HP_mob_item_drop_pre;
+int HP_mob_item_drop_post;
+int HP_mob_timer_delete_pre;
+int HP_mob_timer_delete_post;
+int HP_mob_deleteslave_sub_pre;
+int HP_mob_deleteslave_sub_post;
+int HP_mob_deleteslave_pre;
+int HP_mob_deleteslave_post;
+int HP_mob_respawn_pre;
+int HP_mob_respawn_post;
+int HP_mob_log_damage_pre;
+int HP_mob_log_damage_post;
+int HP_mob_damage_pre;
+int HP_mob_damage_post;
+int HP_mob_dead_pre;
+int HP_mob_dead_post;
+int HP_mob_revive_pre;
+int HP_mob_revive_post;
+int HP_mob_guardian_guildchange_pre;
+int HP_mob_guardian_guildchange_post;
+int HP_mob_random_class_pre;
+int HP_mob_random_class_post;
+int HP_mob_class_change_pre;
+int HP_mob_class_change_post;
+int HP_mob_heal_pre;
+int HP_mob_heal_post;
+int HP_mob_warpslave_sub_pre;
+int HP_mob_warpslave_sub_post;
+int HP_mob_warpslave_pre;
+int HP_mob_warpslave_post;
+int HP_mob_countslave_sub_pre;
+int HP_mob_countslave_sub_post;
+int HP_mob_countslave_pre;
+int HP_mob_countslave_post;
+int HP_mob_summonslave_pre;
+int HP_mob_summonslave_post;
+int HP_mob_getfriendhprate_sub_pre;
+int HP_mob_getfriendhprate_sub_post;
+int HP_mob_getfriendhprate_pre;
+int HP_mob_getfriendhprate_post;
+int HP_mob_getmasterhpltmaxrate_pre;
+int HP_mob_getmasterhpltmaxrate_post;
+int HP_mob_getfriendstatus_sub_pre;
+int HP_mob_getfriendstatus_sub_post;
+int HP_mob_getfriendstatus_pre;
+int HP_mob_getfriendstatus_post;
+int HP_mob_skill_use_pre;
+int HP_mob_skill_use_post;
+int HP_mob_skill_event_pre;
+int HP_mob_skill_event_post;
+int HP_mob_is_clone_pre;
+int HP_mob_is_clone_post;
+int HP_mob_clone_spawn_pre;
+int HP_mob_clone_spawn_post;
+int HP_mob_clone_delete_pre;
+int HP_mob_clone_delete_post;
+int HP_mob_drop_adjust_pre;
+int HP_mob_drop_adjust_post;
+int HP_mob_item_dropratio_adjust_pre;
+int HP_mob_item_dropratio_adjust_post;
+int HP_mob_parse_dbrow_pre;
+int HP_mob_parse_dbrow_post;
+int HP_mob_readdb_sub_pre;
+int HP_mob_readdb_sub_post;
+int HP_mob_readdb_pre;
+int HP_mob_readdb_post;
+int HP_mob_read_sqldb_pre;
+int HP_mob_read_sqldb_post;
+int HP_mob_readdb_mobavail_pre;
+int HP_mob_readdb_mobavail_post;
+int HP_mob_read_randommonster_pre;
+int HP_mob_read_randommonster_post;
+int HP_mob_parse_row_chatdb_pre;
+int HP_mob_parse_row_chatdb_post;
+int HP_mob_readchatdb_pre;
+int HP_mob_readchatdb_post;
+int HP_mob_parse_row_mobskilldb_pre;
+int HP_mob_parse_row_mobskilldb_post;
+int HP_mob_readskilldb_pre;
+int HP_mob_readskilldb_post;
+int HP_mob_read_sqlskilldb_pre;
+int HP_mob_read_sqlskilldb_post;
+int HP_mob_readdb_race2_pre;
+int HP_mob_readdb_race2_post;
+int HP_mob_readdb_itemratio_pre;
+int HP_mob_readdb_itemratio_post;
+int HP_mob_load_pre;
+int HP_mob_load_post;
+int HP_mob_clear_spawninfo_pre;
+int HP_mob_clear_spawninfo_post;
+int HP_npc_init_pre;
+int HP_npc_init_post;
+int HP_npc_final_pre;
+int HP_npc_final_post;
+int HP_npc_get_new_npc_id_pre;
+int HP_npc_get_new_npc_id_post;
+int HP_npc_get_viewdata_pre;
+int HP_npc_get_viewdata_post;
+int HP_npc_isnear_sub_pre;
+int HP_npc_isnear_sub_post;
+int HP_npc_isnear_pre;
+int HP_npc_isnear_post;
+int HP_npc_ontouch_event_pre;
+int HP_npc_ontouch_event_post;
+int HP_npc_ontouch2_event_pre;
+int HP_npc_ontouch2_event_post;
+int HP_npc_enable_sub_pre;
+int HP_npc_enable_sub_post;
+int HP_npc_enable_pre;
+int HP_npc_enable_post;
+int HP_npc_name2id_pre;
+int HP_npc_name2id_post;
+int HP_npc_event_dequeue_pre;
+int HP_npc_event_dequeue_post;
+int HP_npc_event_export_create_pre;
+int HP_npc_event_export_create_post;
+int HP_npc_event_export_pre;
+int HP_npc_event_export_post;
+int HP_npc_event_sub_pre;
+int HP_npc_event_sub_post;
+int HP_npc_event_doall_sub_pre;
+int HP_npc_event_doall_sub_post;
+int HP_npc_event_do_pre;
+int HP_npc_event_do_post;
+int HP_npc_event_doall_id_pre;
+int HP_npc_event_doall_id_post;
+int HP_npc_event_doall_pre;
+int HP_npc_event_doall_post;
+int HP_npc_event_do_clock_pre;
+int HP_npc_event_do_clock_post;
+int HP_npc_event_do_oninit_pre;
+int HP_npc_event_do_oninit_post;
+int HP_npc_timerevent_export_pre;
+int HP_npc_timerevent_export_post;
+int HP_npc_timerevent_pre;
+int HP_npc_timerevent_post;
+int HP_npc_timerevent_start_pre;
+int HP_npc_timerevent_start_post;
+int HP_npc_timerevent_stop_pre;
+int HP_npc_timerevent_stop_post;
+int HP_npc_timerevent_quit_pre;
+int HP_npc_timerevent_quit_post;
+int HP_npc_gettimerevent_tick_pre;
+int HP_npc_gettimerevent_tick_post;
+int HP_npc_settimerevent_tick_pre;
+int HP_npc_settimerevent_tick_post;
+int HP_npc_event_pre;
+int HP_npc_event_post;
+int HP_npc_touch_areanpc_sub_pre;
+int HP_npc_touch_areanpc_sub_post;
+int HP_npc_touchnext_areanpc_pre;
+int HP_npc_touchnext_areanpc_post;
+int HP_npc_touch_areanpc_pre;
+int HP_npc_touch_areanpc_post;
+int HP_npc_touch_areanpc2_pre;
+int HP_npc_touch_areanpc2_post;
+int HP_npc_check_areanpc_pre;
+int HP_npc_check_areanpc_post;
+int HP_npc_checknear_pre;
+int HP_npc_checknear_post;
+int HP_npc_globalmessage_pre;
+int HP_npc_globalmessage_post;
+int HP_npc_run_tomb_pre;
+int HP_npc_run_tomb_post;
+int HP_npc_click_pre;
+int HP_npc_click_post;
+int HP_npc_scriptcont_pre;
+int HP_npc_scriptcont_post;
+int HP_npc_buysellsel_pre;
+int HP_npc_buysellsel_post;
+int HP_npc_cashshop_buylist_pre;
+int HP_npc_cashshop_buylist_post;
+int HP_npc_buylist_sub_pre;
+int HP_npc_buylist_sub_post;
+int HP_npc_cashshop_buy_pre;
+int HP_npc_cashshop_buy_post;
+int HP_npc_buylist_pre;
+int HP_npc_buylist_post;
+int HP_npc_selllist_sub_pre;
+int HP_npc_selllist_sub_post;
+int HP_npc_selllist_pre;
+int HP_npc_selllist_post;
+int HP_npc_remove_map_pre;
+int HP_npc_remove_map_post;
+int HP_npc_unload_ev_pre;
+int HP_npc_unload_ev_post;
+int HP_npc_unload_ev_label_pre;
+int HP_npc_unload_ev_label_post;
+int HP_npc_unload_dup_sub_pre;
+int HP_npc_unload_dup_sub_post;
+int HP_npc_unload_duplicates_pre;
+int HP_npc_unload_duplicates_post;
+int HP_npc_unload_pre;
+int HP_npc_unload_post;
+int HP_npc_clearsrcfile_pre;
+int HP_npc_clearsrcfile_post;
+int HP_npc_addsrcfile_pre;
+int HP_npc_addsrcfile_post;
+int HP_npc_delsrcfile_pre;
+int HP_npc_delsrcfile_post;
+int HP_npc_parsename_pre;
+int HP_npc_parsename_post;
+int HP_npc_add_warp_pre;
+int HP_npc_add_warp_post;
+int HP_npc_parse_warp_pre;
+int HP_npc_parse_warp_post;
+int HP_npc_parse_shop_pre;
+int HP_npc_parse_shop_post;
+int HP_npc_convertlabel_db_pre;
+int HP_npc_convertlabel_db_post;
+int HP_npc_skip_script_pre;
+int HP_npc_skip_script_post;
+int HP_npc_parse_script_pre;
+int HP_npc_parse_script_post;
+int HP_npc_parse_duplicate_pre;
+int HP_npc_parse_duplicate_post;
+int HP_npc_duplicate4instance_pre;
+int HP_npc_duplicate4instance_post;
+int HP_npc_setcells_pre;
+int HP_npc_setcells_post;
+int HP_npc_unsetcells_sub_pre;
+int HP_npc_unsetcells_sub_post;
+int HP_npc_unsetcells_pre;
+int HP_npc_unsetcells_post;
+int HP_npc_movenpc_pre;
+int HP_npc_movenpc_post;
+int HP_npc_setdisplayname_pre;
+int HP_npc_setdisplayname_post;
+int HP_npc_setclass_pre;
+int HP_npc_setclass_post;
+int HP_npc_do_atcmd_event_pre;
+int HP_npc_do_atcmd_event_post;
+int HP_npc_parse_function_pre;
+int HP_npc_parse_function_post;
+int HP_npc_parse_mob2_pre;
+int HP_npc_parse_mob2_post;
+int HP_npc_parse_mob_pre;
+int HP_npc_parse_mob_post;
+int HP_npc_parse_mapflag_pre;
+int HP_npc_parse_mapflag_post;
+int HP_npc_parsesrcfile_pre;
+int HP_npc_parsesrcfile_post;
+int HP_npc_script_event_pre;
+int HP_npc_script_event_post;
+int HP_npc_read_event_script_pre;
+int HP_npc_read_event_script_post;
+int HP_npc_path_db_clear_sub_pre;
+int HP_npc_path_db_clear_sub_post;
+int HP_npc_ev_label_db_clear_sub_pre;
+int HP_npc_ev_label_db_clear_sub_post;
+int HP_npc_reload_pre;
+int HP_npc_reload_post;
+int HP_npc_unloadfile_pre;
+int HP_npc_unloadfile_post;
+int HP_npc_do_clear_npc_pre;
+int HP_npc_do_clear_npc_post;
+int HP_npc_debug_warps_sub_pre;
+int HP_npc_debug_warps_sub_post;
+int HP_npc_debug_warps_pre;
+int HP_npc_debug_warps_post;
+int HP_npc_secure_timeout_timer_pre;
+int HP_npc_secure_timeout_timer_post;
+int HP_party_init_pre;
+int HP_party_init_post;
+int HP_party_final_pre;
+int HP_party_final_post;
+int HP_party_search_pre;
+int HP_party_search_post;
+int HP_party_searchname_pre;
+int HP_party_searchname_post;
+int HP_party_getmemberid_pre;
+int HP_party_getmemberid_post;
+int HP_party_getavailablesd_pre;
+int HP_party_getavailablesd_post;
+int HP_party_create_pre;
+int HP_party_create_post;
+int HP_party_created_pre;
+int HP_party_created_post;
+int HP_party_request_info_pre;
+int HP_party_request_info_post;
+int HP_party_invite_pre;
+int HP_party_invite_post;
+int HP_party_member_joined_pre;
+int HP_party_member_joined_post;
+int HP_party_member_added_pre;
+int HP_party_member_added_post;
+int HP_party_leave_pre;
+int HP_party_leave_post;
+int HP_party_removemember_pre;
+int HP_party_removemember_post;
+int HP_party_member_withdraw_pre;
+int HP_party_member_withdraw_post;
+int HP_party_reply_invite_pre;
+int HP_party_reply_invite_post;
+int HP_party_recv_noinfo_pre;
+int HP_party_recv_noinfo_post;
+int HP_party_recv_info_pre;
+int HP_party_recv_info_post;
+int HP_party_recv_movemap_pre;
+int HP_party_recv_movemap_post;
+int HP_party_broken_pre;
+int HP_party_broken_post;
+int HP_party_optionchanged_pre;
+int HP_party_optionchanged_post;
+int HP_party_changeoption_pre;
+int HP_party_changeoption_post;
+int HP_party_changeleader_pre;
+int HP_party_changeleader_post;
+int HP_party_send_movemap_pre;
+int HP_party_send_movemap_post;
+int HP_party_send_levelup_pre;
+int HP_party_send_levelup_post;
+int HP_party_send_logout_pre;
+int HP_party_send_logout_post;
+int HP_party_send_message_pre;
+int HP_party_send_message_post;
+int HP_party_recv_message_pre;
+int HP_party_recv_message_post;
+int HP_party_skill_check_pre;
+int HP_party_skill_check_post;
+int HP_party_send_xy_clear_pre;
+int HP_party_send_xy_clear_post;
+int HP_party_exp_share_pre;
+int HP_party_exp_share_post;
+int HP_party_share_loot_pre;
+int HP_party_share_loot_post;
+int HP_party_send_dot_remove_pre;
+int HP_party_send_dot_remove_post;
+int HP_party_sub_count_pre;
+int HP_party_sub_count_post;
+int HP_party_booking_register_pre;
+int HP_party_booking_register_post;
+int HP_party_booking_update_pre;
+int HP_party_booking_update_post;
+int HP_party_booking_search_pre;
+int HP_party_booking_search_post;
+int HP_party_recruit_register_pre;
+int HP_party_recruit_register_post;
+int HP_party_recruit_update_pre;
+int HP_party_recruit_update_post;
+int HP_party_recruit_search_pre;
+int HP_party_recruit_search_post;
+int HP_party_booking_delete_pre;
+int HP_party_booking_delete_post;
+int HP_party_vforeachsamemap_pre;
+int HP_party_vforeachsamemap_post;
+int HP_party_send_xy_timer_pre;
+int HP_party_send_xy_timer_post;
+int HP_party_fill_member_pre;
+int HP_party_fill_member_post;
+int HP_party_sd_check_pre;
+int HP_party_sd_check_post;
+int HP_party_check_state_pre;
+int HP_party_check_state_post;
+int HP_party_create_booking_data_pre;
+int HP_party_create_booking_data_post;
+int HP_party_db_final_pre;
+int HP_party_db_final_post;
+int HP_path_blownpos_pre;
+int HP_path_blownpos_post;
+int HP_path_search_pre;
+int HP_path_search_post;
+int HP_path_search_long_pre;
+int HP_path_search_long_post;
+int HP_path_check_distance_pre;
+int HP_path_check_distance_post;
+int HP_path_distance_pre;
+int HP_path_distance_post;
+int HP_pc_init_pre;
+int HP_pc_init_post;
+int HP_pc_final_pre;
+int HP_pc_final_post;
+int HP_pc_get_dummy_sd_pre;
+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_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;
+int HP_pc_should_log_commands_post;
+int HP_pc_setrestartvalue_pre;
+int HP_pc_setrestartvalue_post;
+int HP_pc_makesavestatus_pre;
+int HP_pc_makesavestatus_post;
+int HP_pc_respawn_pre;
+int HP_pc_respawn_post;
+int HP_pc_setnewpc_pre;
+int HP_pc_setnewpc_post;
+int HP_pc_authok_pre;
+int HP_pc_authok_post;
+int HP_pc_authfail_pre;
+int HP_pc_authfail_post;
+int HP_pc_reg_received_pre;
+int HP_pc_reg_received_post;
+int HP_pc_isequip_pre;
+int HP_pc_isequip_post;
+int HP_pc_equippoint_pre;
+int HP_pc_equippoint_post;
+int HP_pc_setinventorydata_pre;
+int HP_pc_setinventorydata_post;
+int HP_pc_checkskill_pre;
+int HP_pc_checkskill_post;
+int HP_pc_checkskill2_pre;
+int HP_pc_checkskill2_post;
+int HP_pc_checkallowskill_pre;
+int HP_pc_checkallowskill_post;
+int HP_pc_checkequip_pre;
+int HP_pc_checkequip_post;
+int HP_pc_calc_skilltree_pre;
+int HP_pc_calc_skilltree_post;
+int HP_pc_calc_skilltree_normalize_job_pre;
+int HP_pc_calc_skilltree_normalize_job_post;
+int HP_pc_clean_skilltree_pre;
+int HP_pc_clean_skilltree_post;
+int HP_pc_setpos_pre;
+int HP_pc_setpos_post;
+int HP_pc_setsavepoint_pre;
+int HP_pc_setsavepoint_post;
+int HP_pc_randomwarp_pre;
+int HP_pc_randomwarp_post;
+int HP_pc_memo_pre;
+int HP_pc_memo_post;
+int HP_pc_checkadditem_pre;
+int HP_pc_checkadditem_post;
+int HP_pc_inventoryblank_pre;
+int HP_pc_inventoryblank_post;
+int HP_pc_search_inventory_pre;
+int HP_pc_search_inventory_post;
+int HP_pc_payzeny_pre;
+int HP_pc_payzeny_post;
+int HP_pc_additem_pre;
+int HP_pc_additem_post;
+int HP_pc_getzeny_pre;
+int HP_pc_getzeny_post;
+int HP_pc_delitem_pre;
+int HP_pc_delitem_post;
+int HP_pc_paycash_pre;
+int HP_pc_paycash_post;
+int HP_pc_getcash_pre;
+int HP_pc_getcash_post;
+int HP_pc_cart_additem_pre;
+int HP_pc_cart_additem_post;
+int HP_pc_cart_delitem_pre;
+int HP_pc_cart_delitem_post;
+int HP_pc_putitemtocart_pre;
+int HP_pc_putitemtocart_post;
+int HP_pc_getitemfromcart_pre;
+int HP_pc_getitemfromcart_post;
+int HP_pc_cartitem_amount_pre;
+int HP_pc_cartitem_amount_post;
+int HP_pc_takeitem_pre;
+int HP_pc_takeitem_post;
+int HP_pc_dropitem_pre;
+int HP_pc_dropitem_post;
+int HP_pc_isequipped_pre;
+int HP_pc_isequipped_post;
+int HP_pc_can_Adopt_pre;
+int HP_pc_can_Adopt_post;
+int HP_pc_adoption_pre;
+int HP_pc_adoption_post;
+int HP_pc_updateweightstatus_pre;
+int HP_pc_updateweightstatus_post;
+int HP_pc_addautobonus_pre;
+int HP_pc_addautobonus_post;
+int HP_pc_exeautobonus_pre;
+int HP_pc_exeautobonus_post;
+int HP_pc_endautobonus_pre;
+int HP_pc_endautobonus_post;
+int HP_pc_delautobonus_pre;
+int HP_pc_delautobonus_post;
+int HP_pc_bonus_pre;
+int HP_pc_bonus_post;
+int HP_pc_bonus2_pre;
+int HP_pc_bonus2_post;
+int HP_pc_bonus3_pre;
+int HP_pc_bonus3_post;
+int HP_pc_bonus4_pre;
+int HP_pc_bonus4_post;
+int HP_pc_bonus5_pre;
+int HP_pc_bonus5_post;
+int HP_pc_skill_pre;
+int HP_pc_skill_post;
+int HP_pc_insert_card_pre;
+int HP_pc_insert_card_post;
+int HP_pc_steal_item_pre;
+int HP_pc_steal_item_post;
+int HP_pc_steal_coin_pre;
+int HP_pc_steal_coin_post;
+int HP_pc_modifybuyvalue_pre;
+int HP_pc_modifybuyvalue_post;
+int HP_pc_modifysellvalue_pre;
+int HP_pc_modifysellvalue_post;
+int HP_pc_follow_pre;
+int HP_pc_follow_post;
+int HP_pc_stop_following_pre;
+int HP_pc_stop_following_post;
+int HP_pc_maxbaselv_pre;
+int HP_pc_maxbaselv_post;
+int HP_pc_maxjoblv_pre;
+int HP_pc_maxjoblv_post;
+int HP_pc_checkbaselevelup_pre;
+int HP_pc_checkbaselevelup_post;
+int HP_pc_checkjoblevelup_pre;
+int HP_pc_checkjoblevelup_post;
+int HP_pc_gainexp_pre;
+int HP_pc_gainexp_post;
+int HP_pc_nextbaseexp_pre;
+int HP_pc_nextbaseexp_post;
+int HP_pc_thisbaseexp_pre;
+int HP_pc_thisbaseexp_post;
+int HP_pc_nextjobexp_pre;
+int HP_pc_nextjobexp_post;
+int HP_pc_thisjobexp_pre;
+int HP_pc_thisjobexp_post;
+int HP_pc_gets_status_point_pre;
+int HP_pc_gets_status_point_post;
+int HP_pc_need_status_point_pre;
+int HP_pc_need_status_point_post;
+int HP_pc_statusup_pre;
+int HP_pc_statusup_post;
+int HP_pc_statusup2_pre;
+int HP_pc_statusup2_post;
+int HP_pc_skillup_pre;
+int HP_pc_skillup_post;
+int HP_pc_allskillup_pre;
+int HP_pc_allskillup_post;
+int HP_pc_resetlvl_pre;
+int HP_pc_resetlvl_post;
+int HP_pc_resetstate_pre;
+int HP_pc_resetstate_post;
+int HP_pc_resetskill_pre;
+int HP_pc_resetskill_post;
+int HP_pc_resetfeel_pre;
+int HP_pc_resetfeel_post;
+int HP_pc_resethate_pre;
+int HP_pc_resethate_post;
+int HP_pc_equipitem_pre;
+int HP_pc_equipitem_post;
+int HP_pc_unequipitem_pre;
+int HP_pc_unequipitem_post;
+int HP_pc_checkitem_pre;
+int HP_pc_checkitem_post;
+int HP_pc_useitem_pre;
+int HP_pc_useitem_post;
+int HP_pc_skillatk_bonus_pre;
+int HP_pc_skillatk_bonus_post;
+int HP_pc_skillheal_bonus_pre;
+int HP_pc_skillheal_bonus_post;
+int HP_pc_skillheal2_bonus_pre;
+int HP_pc_skillheal2_bonus_post;
+int HP_pc_damage_pre;
+int HP_pc_damage_post;
+int HP_pc_dead_pre;
+int HP_pc_dead_post;
+int HP_pc_revive_pre;
+int HP_pc_revive_post;
+int HP_pc_heal_pre;
+int HP_pc_heal_post;
+int HP_pc_itemheal_pre;
+int HP_pc_itemheal_post;
+int HP_pc_percentheal_pre;
+int HP_pc_percentheal_post;
+int HP_pc_jobchange_pre;
+int HP_pc_jobchange_post;
+int HP_pc_setoption_pre;
+int HP_pc_setoption_post;
+int HP_pc_setcart_pre;
+int HP_pc_setcart_post;
+int HP_pc_setfalcon_pre;
+int HP_pc_setfalcon_post;
+int HP_pc_setriding_pre;
+int HP_pc_setriding_post;
+int HP_pc_setmadogear_pre;
+int HP_pc_setmadogear_post;
+int HP_pc_changelook_pre;
+int HP_pc_changelook_post;
+int HP_pc_equiplookall_pre;
+int HP_pc_equiplookall_post;
+int HP_pc_readparam_pre;
+int HP_pc_readparam_post;
+int HP_pc_setparam_pre;
+int HP_pc_setparam_post;
+int HP_pc_readreg_pre;
+int HP_pc_readreg_post;
+int HP_pc_setreg_pre;
+int HP_pc_setreg_post;
+int HP_pc_readregstr_pre;
+int HP_pc_readregstr_post;
+int HP_pc_setregstr_pre;
+int HP_pc_setregstr_post;
+int HP_pc_readregistry_pre;
+int HP_pc_readregistry_post;
+int HP_pc_setregistry_pre;
+int HP_pc_setregistry_post;
+int HP_pc_readregistry_str_pre;
+int HP_pc_readregistry_str_post;
+int HP_pc_setregistry_str_pre;
+int HP_pc_setregistry_str_post;
+int HP_pc_addeventtimer_pre;
+int HP_pc_addeventtimer_post;
+int HP_pc_deleventtimer_pre;
+int HP_pc_deleventtimer_post;
+int HP_pc_cleareventtimer_pre;
+int HP_pc_cleareventtimer_post;
+int HP_pc_addeventtimercount_pre;
+int HP_pc_addeventtimercount_post;
+int HP_pc_calc_pvprank_pre;
+int HP_pc_calc_pvprank_post;
+int HP_pc_calc_pvprank_timer_pre;
+int HP_pc_calc_pvprank_timer_post;
+int HP_pc_ismarried_pre;
+int HP_pc_ismarried_post;
+int HP_pc_marriage_pre;
+int HP_pc_marriage_post;
+int HP_pc_divorce_pre;
+int HP_pc_divorce_post;
+int HP_pc_get_partner_pre;
+int HP_pc_get_partner_post;
+int HP_pc_get_father_pre;
+int HP_pc_get_father_post;
+int HP_pc_get_mother_pre;
+int HP_pc_get_mother_post;
+int HP_pc_get_child_pre;
+int HP_pc_get_child_post;
+int HP_pc_bleeding_pre;
+int HP_pc_bleeding_post;
+int HP_pc_regen_pre;
+int HP_pc_regen_post;
+int HP_pc_setstand_pre;
+int HP_pc_setstand_post;
+int HP_pc_candrop_pre;
+int HP_pc_candrop_post;
+int HP_pc_jobid2mapid_pre;
+int HP_pc_jobid2mapid_post;
+int HP_pc_mapid2jobid_pre;
+int HP_pc_mapid2jobid_post;
+int HP_pc_job_name_pre;
+int HP_pc_job_name_post;
+int HP_pc_setinvincibletimer_pre;
+int HP_pc_setinvincibletimer_post;
+int HP_pc_delinvincibletimer_pre;
+int HP_pc_delinvincibletimer_post;
+int HP_pc_addspiritball_pre;
+int HP_pc_addspiritball_post;
+int HP_pc_delspiritball_pre;
+int HP_pc_delspiritball_post;
+int HP_pc_addfame_pre;
+int HP_pc_addfame_post;
+int HP_pc_famerank_pre;
+int HP_pc_famerank_post;
+int HP_pc_set_hate_mob_pre;
+int HP_pc_set_hate_mob_post;
+int HP_pc_readdb_pre;
+int HP_pc_readdb_post;
+int HP_pc_map_day_timer_pre;
+int HP_pc_map_day_timer_post;
+int HP_pc_map_night_timer_pre;
+int HP_pc_map_night_timer_post;
+int HP_pc_inventory_rentals_pre;
+int HP_pc_inventory_rentals_post;
+int HP_pc_inventory_rental_clear_pre;
+int HP_pc_inventory_rental_clear_post;
+int HP_pc_inventory_rental_add_pre;
+int HP_pc_inventory_rental_add_post;
+int HP_pc_disguise_pre;
+int HP_pc_disguise_post;
+int HP_pc_isautolooting_pre;
+int HP_pc_isautolooting_post;
+int HP_pc_overheat_pre;
+int HP_pc_overheat_post;
+int HP_pc_banding_pre;
+int HP_pc_banding_post;
+int HP_pc_itemcd_do_pre;
+int HP_pc_itemcd_do_post;
+int HP_pc_load_combo_pre;
+int HP_pc_load_combo_post;
+int HP_pc_add_charm_pre;
+int HP_pc_add_charm_post;
+int HP_pc_del_charm_pre;
+int HP_pc_del_charm_post;
+int HP_pc_baselevelchanged_pre;
+int HP_pc_baselevelchanged_post;
+int HP_pc_level_penalty_mod_pre;
+int HP_pc_level_penalty_mod_post;
+int HP_pc_calc_skillpoint_pre;
+int HP_pc_calc_skillpoint_post;
+int HP_pc_invincible_timer_pre;
+int HP_pc_invincible_timer_post;
+int HP_pc_spiritball_timer_pre;
+int HP_pc_spiritball_timer_post;
+int HP_pc_check_banding_pre;
+int HP_pc_check_banding_post;
+int HP_pc_inventory_rental_end_pre;
+int HP_pc_inventory_rental_end_post;
+int HP_pc_check_skilltree_pre;
+int HP_pc_check_skilltree_post;
+int HP_pc_bonus_autospell_pre;
+int HP_pc_bonus_autospell_post;
+int HP_pc_bonus_autospell_onskill_pre;
+int HP_pc_bonus_autospell_onskill_post;
+int HP_pc_bonus_addeff_pre;
+int HP_pc_bonus_addeff_post;
+int HP_pc_bonus_addeff_onskill_pre;
+int HP_pc_bonus_addeff_onskill_post;
+int HP_pc_bonus_item_drop_pre;
+int HP_pc_bonus_item_drop_post;
+int HP_pc_calcexp_pre;
+int HP_pc_calcexp_post;
+int HP_pc_respawn_timer_pre;
+int HP_pc_respawn_timer_post;
+int HP_pc_jobchange_killclone_pre;
+int HP_pc_jobchange_killclone_post;
+int HP_pc_getstat_pre;
+int HP_pc_getstat_post;
+int HP_pc_setstat_pre;
+int HP_pc_setstat_post;
+int HP_pc_eventtimer_pre;
+int HP_pc_eventtimer_post;
+int HP_pc_daynight_timer_sub_pre;
+int HP_pc_daynight_timer_sub_post;
+int HP_pc_charm_timer_pre;
+int HP_pc_charm_timer_post;
+int HP_pc_readdb_levelpenalty_pre;
+int HP_pc_readdb_levelpenalty_post;
+int HP_pc_autosave_pre;
+int HP_pc_autosave_post;
+int HP_pc_follow_timer_pre;
+int HP_pc_follow_timer_post;
+int HP_pc_read_skill_tree_pre;
+int HP_pc_read_skill_tree_post;
+int HP_pc_isUseitem_pre;
+int HP_pc_isUseitem_post;
+int HP_pc_show_steal_pre;
+int HP_pc_show_steal_post;
+int HP_pc_checkcombo_pre;
+int HP_pc_checkcombo_post;
+int HP_pc_calcweapontype_pre;
+int HP_pc_calcweapontype_post;
+int HP_pc_removecombo_pre;
+int HP_pc_removecombo_post;
+int HP_pet_init_pre;
+int HP_pet_init_post;
+int HP_pet_final_pre;
+int HP_pet_final_post;
+int HP_pet_hungry_val_pre;
+int HP_pet_hungry_val_post;
+int HP_pet_set_intimate_pre;
+int HP_pet_set_intimate_post;
+int HP_pet_create_egg_pre;
+int HP_pet_create_egg_post;
+int HP_pet_unlocktarget_pre;
+int HP_pet_unlocktarget_post;
+int HP_pet_attackskill_pre;
+int HP_pet_attackskill_post;
+int HP_pet_target_check_pre;
+int HP_pet_target_check_post;
+int HP_pet_sc_check_pre;
+int HP_pet_sc_check_post;
+int HP_pet_hungry_pre;
+int HP_pet_hungry_post;
+int HP_pet_search_petDB_index_pre;
+int HP_pet_search_petDB_index_post;
+int HP_pet_hungry_timer_delete_pre;
+int HP_pet_hungry_timer_delete_post;
+int HP_pet_performance_pre;
+int HP_pet_performance_post;
+int HP_pet_return_egg_pre;
+int HP_pet_return_egg_post;
+int HP_pet_data_init_pre;
+int HP_pet_data_init_post;
+int HP_pet_birth_process_pre;
+int HP_pet_birth_process_post;
+int HP_pet_recv_petdata_pre;
+int HP_pet_recv_petdata_post;
+int HP_pet_select_egg_pre;
+int HP_pet_select_egg_post;
+int HP_pet_catch_process1_pre;
+int HP_pet_catch_process1_post;
+int HP_pet_catch_process2_pre;
+int HP_pet_catch_process2_post;
+int HP_pet_get_egg_pre;
+int HP_pet_get_egg_post;
+int HP_pet_unequipitem_pre;
+int HP_pet_unequipitem_post;
+int HP_pet_food_pre;
+int HP_pet_food_post;
+int HP_pet_ai_sub_hard_lootsearch_pre;
+int HP_pet_ai_sub_hard_lootsearch_post;
+int HP_pet_menu_pre;
+int HP_pet_menu_post;
+int HP_pet_change_name_pre;
+int HP_pet_change_name_post;
+int HP_pet_change_name_ack_pre;
+int HP_pet_change_name_ack_post;
+int HP_pet_equipitem_pre;
+int HP_pet_equipitem_post;
+int HP_pet_randomwalk_pre;
+int HP_pet_randomwalk_post;
+int HP_pet_ai_sub_hard_pre;
+int HP_pet_ai_sub_hard_post;
+int HP_pet_ai_sub_foreachclient_pre;
+int HP_pet_ai_sub_foreachclient_post;
+int HP_pet_ai_hard_pre;
+int HP_pet_ai_hard_post;
+int HP_pet_delay_item_drop_pre;
+int HP_pet_delay_item_drop_post;
+int HP_pet_lootitem_drop_pre;
+int HP_pet_lootitem_drop_post;
+int HP_pet_skill_bonus_timer_pre;
+int HP_pet_skill_bonus_timer_post;
+int HP_pet_recovery_timer_pre;
+int HP_pet_recovery_timer_post;
+int HP_pet_heal_timer_pre;
+int HP_pet_heal_timer_post;
+int HP_pet_skill_support_timer_pre;
+int HP_pet_skill_support_timer_post;
+int HP_pet_read_db_pre;
+int HP_pet_read_db_post;
+int HP_quest_init_pre;
+int HP_quest_init_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_pc_login_pre;
+int HP_quest_pc_login_post;
+int HP_quest_add_pre;
+int HP_quest_add_post;
+int HP_quest_change_pre;
+int HP_quest_change_post;
+int HP_quest_delete_pre;
+int HP_quest_delete_post;
+int HP_quest_update_objective_sub_pre;
+int HP_quest_update_objective_sub_post;
+int HP_quest_update_objective_pre;
+int HP_quest_update_objective_post;
+int HP_quest_update_status_pre;
+int HP_quest_update_status_post;
+int HP_quest_check_pre;
+int HP_quest_check_post;
+int HP_quest_read_db_pre;
+int HP_quest_read_db_post;
+int HP_script_init_pre;
+int HP_script_init_post;
+int HP_script_final_pre;
+int HP_script_final_post;
+int HP_script_reload_pre;
+int HP_script_reload_post;
+int HP_script_parse_pre;
+int HP_script_parse_post;
+int HP_script_parse_builtin_pre;
+int HP_script_parse_builtin_post;
+int HP_script_parse_subexpr_pre;
+int HP_script_parse_subexpr_post;
+int HP_script_skip_space_pre;
+int HP_script_skip_space_post;
+int HP_script_error_pre;
+int HP_script_error_post;
+int HP_script_warning_pre;
+int HP_script_warning_post;
+int HP_script_addScript_pre;
+int HP_script_addScript_post;
+int HP_script_conv_num_pre;
+int HP_script_conv_num_post;
+int HP_script_conv_str_pre;
+int HP_script_conv_str_post;
+int HP_script_rid2sd_pre;
+int HP_script_rid2sd_post;
+int HP_script_detach_rid_pre;
+int HP_script_detach_rid_post;
+int HP_script_push_val_pre;
+int HP_script_push_val_post;
+int HP_script_get_val_pre;
+int HP_script_get_val_post;
+int HP_script_get_val2_pre;
+int HP_script_get_val2_post;
+int HP_script_push_str_pre;
+int HP_script_push_str_post;
+int HP_script_push_copy_pre;
+int HP_script_push_copy_post;
+int HP_script_pop_stack_pre;
+int HP_script_pop_stack_post;
+int HP_script_set_constant_pre;
+int HP_script_set_constant_post;
+int HP_script_set_constant2_pre;
+int HP_script_set_constant2_post;
+int HP_script_set_constant_force_pre;
+int HP_script_set_constant_force_post;
+int HP_script_get_constant_pre;
+int HP_script_get_constant_post;
+int HP_script_label_add_pre;
+int HP_script_label_add_post;
+int HP_script_run_pre;
+int HP_script_run_post;
+int HP_script_run_main_pre;
+int HP_script_run_main_post;
+int HP_script_run_timer_pre;
+int HP_script_run_timer_post;
+int HP_script_set_var_pre;
+int HP_script_set_var_post;
+int HP_script_stop_instances_pre;
+int HP_script_stop_instances_post;
+int HP_script_free_code_pre;
+int HP_script_free_code_post;
+int HP_script_free_vars_pre;
+int HP_script_free_vars_post;
+int HP_script_alloc_state_pre;
+int HP_script_alloc_state_post;
+int HP_script_free_state_pre;
+int HP_script_free_state_post;
+int HP_script_run_autobonus_pre;
+int HP_script_run_autobonus_post;
+int HP_script_cleararray_pc_pre;
+int HP_script_cleararray_pc_post;
+int HP_script_setarray_pc_pre;
+int HP_script_setarray_pc_post;
+int HP_script_config_read_pre;
+int HP_script_config_read_post;
+int HP_script_add_str_pre;
+int HP_script_add_str_post;
+int HP_script_get_str_pre;
+int HP_script_get_str_post;
+int HP_script_search_str_pre;
+int HP_script_search_str_post;
+int HP_script_setd_sub_pre;
+int HP_script_setd_sub_post;
+int HP_script_attach_state_pre;
+int HP_script_attach_state_post;
+int HP_script_queue_pre;
+int HP_script_queue_post;
+int HP_script_queue_add_pre;
+int HP_script_queue_add_post;
+int HP_script_queue_del_pre;
+int HP_script_queue_del_post;
+int HP_script_queue_remove_pre;
+int HP_script_queue_remove_post;
+int HP_script_queue_create_pre;
+int HP_script_queue_create_post;
+int HP_script_queue_clear_pre;
+int HP_script_queue_clear_post;
+int HP_script_parse_curly_close_pre;
+int HP_script_parse_curly_close_post;
+int HP_script_parse_syntax_close_pre;
+int HP_script_parse_syntax_close_post;
+int HP_script_parse_syntax_close_sub_pre;
+int HP_script_parse_syntax_close_sub_post;
+int HP_script_parse_syntax_pre;
+int HP_script_parse_syntax_post;
+int HP_script_get_com_pre;
+int HP_script_get_com_post;
+int HP_script_get_num_pre;
+int HP_script_get_num_post;
+int HP_script_op2name_pre;
+int HP_script_op2name_post;
+int HP_script_reportsrc_pre;
+int HP_script_reportsrc_post;
+int HP_script_reportdata_pre;
+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;
+int HP_script_check_event_post;
+int HP_script_calc_hash_pre;
+int HP_script_calc_hash_post;
+int HP_script_addb_pre;
+int HP_script_addb_post;
+int HP_script_addc_pre;
+int HP_script_addc_post;
+int HP_script_addi_pre;
+int HP_script_addi_post;
+int HP_script_addl_pre;
+int HP_script_addl_post;
+int HP_script_set_label_pre;
+int HP_script_set_label_post;
+int HP_script_skip_word_pre;
+int HP_script_skip_word_post;
+int HP_script_add_word_pre;
+int HP_script_add_word_post;
+int HP_script_parse_callfunc_pre;
+int HP_script_parse_callfunc_post;
+int HP_script_parse_nextline_pre;
+int HP_script_parse_nextline_post;
+int HP_script_parse_variable_pre;
+int HP_script_parse_variable_post;
+int HP_script_parse_simpleexpr_pre;
+int HP_script_parse_simpleexpr_post;
+int HP_script_parse_expr_pre;
+int HP_script_parse_expr_post;
+int HP_script_parse_line_pre;
+int HP_script_parse_line_post;
+int HP_script_read_constdb_pre;
+int HP_script_read_constdb_post;
+int HP_script_print_line_pre;
+int HP_script_print_line_post;
+int HP_script_errorwarning_sub_pre;
+int HP_script_errorwarning_sub_post;
+int HP_script_set_reg_pre;
+int HP_script_set_reg_post;
+int HP_script_stack_expand_pre;
+int HP_script_stack_expand_post;
+int HP_script_push_retinfo_pre;
+int HP_script_push_retinfo_post;
+int HP_script_pop_val_pre;
+int HP_script_pop_val_post;
+int HP_script_op_3_pre;
+int HP_script_op_3_post;
+int HP_script_op_2str_pre;
+int HP_script_op_2str_post;
+int HP_script_op_2num_pre;
+int HP_script_op_2num_post;
+int HP_script_op_2_pre;
+int HP_script_op_2_post;
+int HP_script_op_1_pre;
+int HP_script_op_1_post;
+int HP_script_check_buildin_argtype_pre;
+int HP_script_check_buildin_argtype_post;
+int HP_script_detach_state_pre;
+int HP_script_detach_state_post;
+int HP_script_db_free_code_sub_pre;
+int HP_script_db_free_code_sub_post;
+int HP_script_add_autobonus_pre;
+int HP_script_add_autobonus_post;
+int HP_script_menu_countoptions_pre;
+int HP_script_menu_countoptions_post;
+int HP_script_buildin_areawarp_sub_pre;
+int HP_script_buildin_areawarp_sub_post;
+int HP_script_buildin_areapercentheal_sub_pre;
+int HP_script_buildin_areapercentheal_sub_post;
+int HP_script_getarraysize_pre;
+int HP_script_getarraysize_post;
+int HP_script_buildin_delitem_delete_pre;
+int HP_script_buildin_delitem_delete_post;
+int HP_script_buildin_delitem_search_pre;
+int HP_script_buildin_delitem_search_post;
+int HP_script_buildin_killmonster_sub_strip_pre;
+int HP_script_buildin_killmonster_sub_strip_post;
+int HP_script_buildin_killmonster_sub_pre;
+int HP_script_buildin_killmonster_sub_post;
+int HP_script_buildin_killmonsterall_sub_strip_pre;
+int HP_script_buildin_killmonsterall_sub_strip_post;
+int HP_script_buildin_killmonsterall_sub_pre;
+int HP_script_buildin_killmonsterall_sub_post;
+int HP_script_buildin_announce_sub_pre;
+int HP_script_buildin_announce_sub_post;
+int HP_script_buildin_getareausers_sub_pre;
+int HP_script_buildin_getareausers_sub_post;
+int HP_script_buildin_getareadropitem_sub_pre;
+int HP_script_buildin_getareadropitem_sub_post;
+int HP_script_mapflag_pvp_sub_pre;
+int HP_script_mapflag_pvp_sub_post;
+int HP_script_buildin_pvpoff_sub_pre;
+int HP_script_buildin_pvpoff_sub_post;
+int HP_script_buildin_maprespawnguildid_sub_pc_pre;
+int HP_script_buildin_maprespawnguildid_sub_pc_post;
+int HP_script_buildin_maprespawnguildid_sub_mob_pre;
+int HP_script_buildin_maprespawnguildid_sub_mob_post;
+int HP_script_buildin_mobcount_sub_pre;
+int HP_script_buildin_mobcount_sub_post;
+int HP_script_playBGM_sub_pre;
+int HP_script_playBGM_sub_post;
+int HP_script_playBGM_foreachpc_sub_pre;
+int HP_script_playBGM_foreachpc_sub_post;
+int HP_script_soundeffect_sub_pre;
+int HP_script_soundeffect_sub_post;
+int HP_script_buildin_query_sql_sub_pre;
+int HP_script_buildin_query_sql_sub_post;
+int HP_script_axtoi_pre;
+int HP_script_axtoi_post;
+int HP_script_buildin_instance_warpall_sub_pre;
+int HP_script_buildin_instance_warpall_sub_post;
+int HP_script_buildin_mobuseskill_sub_pre;
+int HP_script_buildin_mobuseskill_sub_post;
+int HP_script_cleanfloor_sub_pre;
+int HP_script_cleanfloor_sub_post;
+int HP_script_run_func_pre;
+int HP_script_run_func_post;
+int HP_searchstore_open_pre;
+int HP_searchstore_open_post;
+int HP_searchstore_query_pre;
+int HP_searchstore_query_post;
+int HP_searchstore_querynext_pre;
+int HP_searchstore_querynext_post;
+int HP_searchstore_next_pre;
+int HP_searchstore_next_post;
+int HP_searchstore_clear_pre;
+int HP_searchstore_clear_post;
+int HP_searchstore_close_pre;
+int HP_searchstore_close_post;
+int HP_searchstore_click_pre;
+int HP_searchstore_click_post;
+int HP_searchstore_queryremote_pre;
+int HP_searchstore_queryremote_post;
+int HP_searchstore_clearremote_pre;
+int HP_searchstore_clearremote_post;
+int HP_searchstore_result_pre;
+int HP_searchstore_result_post;
+int HP_skill_init_pre;
+int HP_skill_init_post;
+int HP_skill_final_pre;
+int HP_skill_final_post;
+int HP_skill_reload_pre;
+int HP_skill_reload_post;
+int HP_skill_read_db_pre;
+int HP_skill_read_db_post;
+int HP_skill_get_index_pre;
+int HP_skill_get_index_post;
+int HP_skill_get_type_pre;
+int HP_skill_get_type_post;
+int HP_skill_get_hit_pre;
+int HP_skill_get_hit_post;
+int HP_skill_get_inf_pre;
+int HP_skill_get_inf_post;
+int HP_skill_get_ele_pre;
+int HP_skill_get_ele_post;
+int HP_skill_get_nk_pre;
+int HP_skill_get_nk_post;
+int HP_skill_get_max_pre;
+int HP_skill_get_max_post;
+int HP_skill_get_range_pre;
+int HP_skill_get_range_post;
+int HP_skill_get_range2_pre;
+int HP_skill_get_range2_post;
+int HP_skill_get_splash_pre;
+int HP_skill_get_splash_post;
+int HP_skill_get_hp_pre;
+int HP_skill_get_hp_post;
+int HP_skill_get_mhp_pre;
+int HP_skill_get_mhp_post;
+int HP_skill_get_sp_pre;
+int HP_skill_get_sp_post;
+int HP_skill_get_state_pre;
+int HP_skill_get_state_post;
+int HP_skill_get_spiritball_pre;
+int HP_skill_get_spiritball_post;
+int HP_skill_get_zeny_pre;
+int HP_skill_get_zeny_post;
+int HP_skill_get_num_pre;
+int HP_skill_get_num_post;
+int HP_skill_get_cast_pre;
+int HP_skill_get_cast_post;
+int HP_skill_get_delay_pre;
+int HP_skill_get_delay_post;
+int HP_skill_get_walkdelay_pre;
+int HP_skill_get_walkdelay_post;
+int HP_skill_get_time_pre;
+int HP_skill_get_time_post;
+int HP_skill_get_time2_pre;
+int HP_skill_get_time2_post;
+int HP_skill_get_castnodex_pre;
+int HP_skill_get_castnodex_post;
+int HP_skill_get_delaynodex_pre;
+int HP_skill_get_delaynodex_post;
+int HP_skill_get_castdef_pre;
+int HP_skill_get_castdef_post;
+int HP_skill_get_weapontype_pre;
+int HP_skill_get_weapontype_post;
+int HP_skill_get_ammotype_pre;
+int HP_skill_get_ammotype_post;
+int HP_skill_get_ammo_qty_pre;
+int HP_skill_get_ammo_qty_post;
+int HP_skill_get_unit_id_pre;
+int HP_skill_get_unit_id_post;
+int HP_skill_get_inf2_pre;
+int HP_skill_get_inf2_post;
+int HP_skill_get_castcancel_pre;
+int HP_skill_get_castcancel_post;
+int HP_skill_get_maxcount_pre;
+int HP_skill_get_maxcount_post;
+int HP_skill_get_blewcount_pre;
+int HP_skill_get_blewcount_post;
+int HP_skill_get_unit_flag_pre;
+int HP_skill_get_unit_flag_post;
+int HP_skill_get_unit_target_pre;
+int HP_skill_get_unit_target_post;
+int HP_skill_get_unit_interval_pre;
+int HP_skill_get_unit_interval_post;
+int HP_skill_get_unit_bl_target_pre;
+int HP_skill_get_unit_bl_target_post;
+int HP_skill_get_unit_layout_type_pre;
+int HP_skill_get_unit_layout_type_post;
+int HP_skill_get_unit_range_pre;
+int HP_skill_get_unit_range_post;
+int HP_skill_get_cooldown_pre;
+int HP_skill_get_cooldown_post;
+int HP_skill_tree_get_max_pre;
+int HP_skill_tree_get_max_post;
+int HP_skill_get_name_pre;
+int HP_skill_get_name_post;
+int HP_skill_get_desc_pre;
+int HP_skill_get_desc_post;
+int HP_skill_chk_pre;
+int HP_skill_chk_post;
+int HP_skill_get_casttype_pre;
+int HP_skill_get_casttype_post;
+int HP_skill_get_casttype2_pre;
+int HP_skill_get_casttype2_post;
+int HP_skill_name2id_pre;
+int HP_skill_name2id_post;
+int HP_skill_isammotype_pre;
+int HP_skill_isammotype_post;
+int HP_skill_castend_id_pre;
+int HP_skill_castend_id_post;
+int HP_skill_castend_pos_pre;
+int HP_skill_castend_pos_post;
+int HP_skill_castend_map_pre;
+int HP_skill_castend_map_post;
+int HP_skill_cleartimerskill_pre;
+int HP_skill_cleartimerskill_post;
+int HP_skill_addtimerskill_pre;
+int HP_skill_addtimerskill_post;
+int HP_skill_additional_effect_pre;
+int HP_skill_additional_effect_post;
+int HP_skill_counter_additional_effect_pre;
+int HP_skill_counter_additional_effect_post;
+int HP_skill_blown_pre;
+int HP_skill_blown_post;
+int HP_skill_break_equip_pre;
+int HP_skill_break_equip_post;
+int HP_skill_strip_equip_pre;
+int HP_skill_strip_equip_post;
+int HP_skill_id2group_pre;
+int HP_skill_id2group_post;
+int HP_skill_unitsetting_pre;
+int HP_skill_unitsetting_post;
+int HP_skill_initunit_pre;
+int HP_skill_initunit_post;
+int HP_skill_delunit_pre;
+int HP_skill_delunit_post;
+int HP_skill_init_unitgroup_pre;
+int HP_skill_init_unitgroup_post;
+int HP_skill_del_unitgroup_pre;
+int HP_skill_del_unitgroup_post;
+int HP_skill_clear_unitgroup_pre;
+int HP_skill_clear_unitgroup_post;
+int HP_skill_clear_group_pre;
+int HP_skill_clear_group_post;
+int HP_skill_unit_onplace_pre;
+int HP_skill_unit_onplace_post;
+int HP_skill_unit_ondamaged_pre;
+int HP_skill_unit_ondamaged_post;
+int HP_skill_cast_fix_pre;
+int HP_skill_cast_fix_post;
+int HP_skill_cast_fix_sc_pre;
+int HP_skill_cast_fix_sc_post;
+int HP_skill_vf_cast_fix_pre;
+int HP_skill_vf_cast_fix_post;
+int HP_skill_delay_fix_pre;
+int HP_skill_delay_fix_post;
+int HP_skill_check_condition_castbegin_pre;
+int HP_skill_check_condition_castbegin_post;
+int HP_skill_check_condition_castend_pre;
+int HP_skill_check_condition_castend_post;
+int HP_skill_consume_requirement_pre;
+int HP_skill_consume_requirement_post;
+int HP_skill_get_requirement_pre;
+int HP_skill_get_requirement_post;
+int HP_skill_check_pc_partner_pre;
+int HP_skill_check_pc_partner_post;
+int HP_skill_unit_move_pre;
+int HP_skill_unit_move_post;
+int HP_skill_unit_onleft_pre;
+int HP_skill_unit_onleft_post;
+int HP_skill_unit_onout_pre;
+int HP_skill_unit_onout_post;
+int HP_skill_unit_move_unit_group_pre;
+int HP_skill_unit_move_unit_group_post;
+int HP_skill_sit_pre;
+int HP_skill_sit_post;
+int HP_skill_brandishspear_pre;
+int HP_skill_brandishspear_post;
+int HP_skill_repairweapon_pre;
+int HP_skill_repairweapon_post;
+int HP_skill_identify_pre;
+int HP_skill_identify_post;
+int HP_skill_weaponrefine_pre;
+int HP_skill_weaponrefine_post;
+int HP_skill_autospell_pre;
+int HP_skill_autospell_post;
+int HP_skill_calc_heal_pre;
+int HP_skill_calc_heal_post;
+int HP_skill_check_cloaking_pre;
+int HP_skill_check_cloaking_post;
+int HP_skill_enchant_elemental_end_pre;
+int HP_skill_enchant_elemental_end_post;
+int HP_skill_not_ok_pre;
+int HP_skill_not_ok_post;
+int HP_skill_not_ok_hom_pre;
+int HP_skill_not_ok_hom_post;
+int HP_skill_not_ok_mercenary_pre;
+int HP_skill_not_ok_mercenary_post;
+int HP_skill_chastle_mob_changetarget_pre;
+int HP_skill_chastle_mob_changetarget_post;
+int HP_skill_can_produce_mix_pre;
+int HP_skill_can_produce_mix_post;
+int HP_skill_produce_mix_pre;
+int HP_skill_produce_mix_post;
+int HP_skill_arrow_create_pre;
+int HP_skill_arrow_create_post;
+int HP_skill_castend_nodamage_id_pre;
+int HP_skill_castend_nodamage_id_post;
+int HP_skill_castend_damage_id_pre;
+int HP_skill_castend_damage_id_post;
+int HP_skill_castend_pos2_pre;
+int HP_skill_castend_pos2_post;
+int HP_skill_blockpc_start_pre;
+int HP_skill_blockpc_start_post;
+int HP_skill_blockhomun_start_pre;
+int HP_skill_blockhomun_start_post;
+int HP_skill_blockmerc_start_pre;
+int HP_skill_blockmerc_start_post;
+int HP_skill_attack_pre;
+int HP_skill_attack_post;
+int HP_skill_attack_area_pre;
+int HP_skill_attack_area_post;
+int HP_skill_area_sub_pre;
+int HP_skill_area_sub_post;
+int HP_skill_area_sub_count_pre;
+int HP_skill_area_sub_count_post;
+int HP_skill_check_unit_range_pre;
+int HP_skill_check_unit_range_post;
+int HP_skill_check_unit_range_sub_pre;
+int HP_skill_check_unit_range_sub_post;
+int HP_skill_check_unit_range2_pre;
+int HP_skill_check_unit_range2_post;
+int HP_skill_check_unit_range2_sub_pre;
+int HP_skill_check_unit_range2_sub_post;
+int HP_skill_toggle_magicpower_pre;
+int HP_skill_toggle_magicpower_post;
+int HP_skill_magic_reflect_pre;
+int HP_skill_magic_reflect_post;
+int HP_skill_onskillusage_pre;
+int HP_skill_onskillusage_post;
+int HP_skill_cell_overlap_pre;
+int HP_skill_cell_overlap_post;
+int HP_skill_timerskill_pre;
+int HP_skill_timerskill_post;
+int HP_skill_trap_splash_pre;
+int HP_skill_trap_splash_post;
+int HP_skill_check_condition_mercenary_pre;
+int HP_skill_check_condition_mercenary_post;
+int HP_skill_locate_element_field_pre;
+int HP_skill_locate_element_field_post;
+int HP_skill_graffitiremover_pre;
+int HP_skill_graffitiremover_post;
+int HP_skill_activate_reverberation_pre;
+int HP_skill_activate_reverberation_post;
+int HP_skill_dance_overlap_sub_pre;
+int HP_skill_dance_overlap_sub_post;
+int HP_skill_dance_overlap_pre;
+int HP_skill_dance_overlap_post;
+int HP_skill_get_unit_layout_pre;
+int HP_skill_get_unit_layout_post;
+int HP_skill_frostjoke_scream_pre;
+int HP_skill_frostjoke_scream_post;
+int HP_skill_greed_pre;
+int HP_skill_greed_post;
+int HP_skill_destroy_trap_pre;
+int HP_skill_destroy_trap_post;
+int HP_skill_icewall_block_pre;
+int HP_skill_icewall_block_post;
+int HP_skill_unitgrouptickset_search_pre;
+int HP_skill_unitgrouptickset_search_post;
+int HP_skill_dance_switch_pre;
+int HP_skill_dance_switch_post;
+int HP_skill_check_condition_char_sub_pre;
+int HP_skill_check_condition_char_sub_post;
+int HP_skill_check_condition_mob_master_sub_pre;
+int HP_skill_check_condition_mob_master_sub_post;
+int HP_skill_brandishspear_first_pre;
+int HP_skill_brandishspear_first_post;
+int HP_skill_brandishspear_dir_pre;
+int HP_skill_brandishspear_dir_post;
+int HP_skill_get_fixed_cast_pre;
+int HP_skill_get_fixed_cast_post;
+int HP_skill_sit_count_pre;
+int HP_skill_sit_count_post;
+int HP_skill_sit_in_pre;
+int HP_skill_sit_in_post;
+int HP_skill_sit_out_pre;
+int HP_skill_sit_out_post;
+int HP_skill_unitsetmapcell_pre;
+int HP_skill_unitsetmapcell_post;
+int HP_skill_unit_onplace_timer_pre;
+int HP_skill_unit_onplace_timer_post;
+int HP_skill_unit_effect_pre;
+int HP_skill_unit_effect_post;
+int HP_skill_unit_timer_sub_onplace_pre;
+int HP_skill_unit_timer_sub_onplace_post;
+int HP_skill_unit_move_sub_pre;
+int HP_skill_unit_move_sub_post;
+int HP_skill_blockpc_end_pre;
+int HP_skill_blockpc_end_post;
+int HP_skill_blockhomun_end_pre;
+int HP_skill_blockhomun_end_post;
+int HP_skill_blockmerc_end_pre;
+int HP_skill_blockmerc_end_post;
+int HP_skill_split_atoi_pre;
+int HP_skill_split_atoi_post;
+int HP_skill_unit_timer_pre;
+int HP_skill_unit_timer_post;
+int HP_skill_unit_timer_sub_pre;
+int HP_skill_unit_timer_sub_post;
+int HP_skill_init_unit_layout_pre;
+int HP_skill_init_unit_layout_post;
+int HP_skill_parse_row_skilldb_pre;
+int HP_skill_parse_row_skilldb_post;
+int HP_skill_parse_row_requiredb_pre;
+int HP_skill_parse_row_requiredb_post;
+int HP_skill_parse_row_castdb_pre;
+int HP_skill_parse_row_castdb_post;
+int HP_skill_parse_row_castnodexdb_pre;
+int HP_skill_parse_row_castnodexdb_post;
+int HP_skill_parse_row_unitdb_pre;
+int HP_skill_parse_row_unitdb_post;
+int HP_skill_parse_row_producedb_pre;
+int HP_skill_parse_row_producedb_post;
+int HP_skill_parse_row_createarrowdb_pre;
+int HP_skill_parse_row_createarrowdb_post;
+int HP_skill_parse_row_abradb_pre;
+int HP_skill_parse_row_abradb_post;
+int HP_skill_parse_row_spellbookdb_pre;
+int HP_skill_parse_row_spellbookdb_post;
+int HP_skill_parse_row_magicmushroomdb_pre;
+int HP_skill_parse_row_magicmushroomdb_post;
+int HP_skill_parse_row_reproducedb_pre;
+int HP_skill_parse_row_reproducedb_post;
+int HP_skill_parse_row_improvisedb_pre;
+int HP_skill_parse_row_improvisedb_post;
+int HP_skill_parse_row_changematerialdb_pre;
+int HP_skill_parse_row_changematerialdb_post;
+int HP_skill_usave_add_pre;
+int HP_skill_usave_add_post;
+int HP_skill_usave_trigger_pre;
+int HP_skill_usave_trigger_post;
+int HP_skill_cooldown_load_pre;
+int HP_skill_cooldown_load_post;
+int HP_skill_spellbook_pre;
+int HP_skill_spellbook_post;
+int HP_skill_block_check_pre;
+int HP_skill_block_check_post;
+int HP_skill_detonator_pre;
+int HP_skill_detonator_post;
+int HP_skill_check_camouflage_pre;
+int HP_skill_check_camouflage_post;
+int HP_skill_magicdecoy_pre;
+int HP_skill_magicdecoy_post;
+int HP_skill_poisoningweapon_pre;
+int HP_skill_poisoningweapon_post;
+int HP_skill_select_menu_pre;
+int HP_skill_select_menu_post;
+int HP_skill_elementalanalysis_pre;
+int HP_skill_elementalanalysis_post;
+int HP_skill_changematerial_pre;
+int HP_skill_changematerial_post;
+int HP_skill_get_elemental_type_pre;
+int HP_skill_get_elemental_type_post;
+int HP_skill_cooldown_save_pre;
+int HP_skill_cooldown_save_post;
+int HP_skill_maelstrom_suction_pre;
+int HP_skill_maelstrom_suction_post;
+int HP_skill_get_new_group_id_pre;
+int HP_skill_get_new_group_id_post;
+int HP_status_init_pre;
+int HP_status_init_post;
+int HP_status_final_pre;
+int HP_status_final_post;
+int HP_status_get_refine_chance_pre;
+int HP_status_get_refine_chance_post;
+int HP_status_skill2sc_pre;
+int HP_status_skill2sc_post;
+int HP_status_sc2skill_pre;
+int HP_status_sc2skill_post;
+int HP_status_sc2scb_flag_pre;
+int HP_status_sc2scb_flag_post;
+int HP_status_type2relevant_bl_types_pre;
+int HP_status_type2relevant_bl_types_post;
+int HP_status_get_sc_type_pre;
+int HP_status_get_sc_type_post;
+int HP_status_damage_pre;
+int HP_status_damage_post;
+int HP_status_charge_pre;
+int HP_status_charge_post;
+int HP_status_percent_change_pre;
+int HP_status_percent_change_post;
+int HP_status_set_hp_pre;
+int HP_status_set_hp_post;
+int HP_status_set_sp_pre;
+int HP_status_set_sp_post;
+int HP_status_heal_pre;
+int HP_status_heal_post;
+int HP_status_revive_pre;
+int HP_status_revive_post;
+int HP_status_get_regen_data_pre;
+int HP_status_get_regen_data_post;
+int HP_status_get_status_data_pre;
+int HP_status_get_status_data_post;
+int HP_status_get_base_status_pre;
+int HP_status_get_base_status_post;
+int HP_status_get_name_pre;
+int HP_status_get_name_post;
+int HP_status_get_class_pre;
+int HP_status_get_class_post;
+int HP_status_get_lv_pre;
+int HP_status_get_lv_post;
+int HP_status_get_def_pre;
+int HP_status_get_def_post;
+int HP_status_get_speed_pre;
+int HP_status_get_speed_post;
+int HP_status_calc_attack_element_pre;
+int HP_status_calc_attack_element_post;
+int HP_status_get_party_id_pre;
+int HP_status_get_party_id_post;
+int HP_status_get_guild_id_pre;
+int HP_status_get_guild_id_post;
+int HP_status_get_emblem_id_pre;
+int HP_status_get_emblem_id_post;
+int HP_status_get_mexp_pre;
+int HP_status_get_mexp_post;
+int HP_status_get_race2_pre;
+int HP_status_get_race2_post;
+int HP_status_get_viewdata_pre;
+int HP_status_get_viewdata_post;
+int HP_status_set_viewdata_pre;
+int HP_status_set_viewdata_post;
+int HP_status_change_init_pre;
+int HP_status_change_init_post;
+int HP_status_get_sc_pre;
+int HP_status_get_sc_post;
+int HP_status_isdead_pre;
+int HP_status_isdead_post;
+int HP_status_isimmune_pre;
+int HP_status_isimmune_post;
+int HP_status_get_sc_def_pre;
+int HP_status_get_sc_def_post;
+int HP_status_change_start_pre;
+int HP_status_change_start_post;
+int HP_status_change_end__pre;
+int HP_status_change_end__post;
+int HP_status_kaahi_heal_timer_pre;
+int HP_status_kaahi_heal_timer_post;
+int HP_status_change_timer_pre;
+int HP_status_change_timer_post;
+int HP_status_change_timer_sub_pre;
+int HP_status_change_timer_sub_post;
+int HP_status_change_clear_pre;
+int HP_status_change_clear_post;
+int HP_status_change_clear_buffs_pre;
+int HP_status_change_clear_buffs_post;
+int HP_status_calc_bl__pre;
+int HP_status_calc_bl__post;
+int HP_status_calc_mob__pre;
+int HP_status_calc_mob__post;
+int HP_status_calc_pet__pre;
+int HP_status_calc_pet__post;
+int HP_status_calc_pc__pre;
+int HP_status_calc_pc__post;
+int HP_status_calc_homunculus__pre;
+int HP_status_calc_homunculus__post;
+int HP_status_calc_mercenary__pre;
+int HP_status_calc_mercenary__post;
+int HP_status_calc_elemental__pre;
+int HP_status_calc_elemental__post;
+int HP_status_calc_misc_pre;
+int HP_status_calc_misc_post;
+int HP_status_calc_regen_pre;
+int HP_status_calc_regen_post;
+int HP_status_calc_regen_rate_pre;
+int HP_status_calc_regen_rate_post;
+int HP_status_check_skilluse_pre;
+int HP_status_check_skilluse_post;
+int HP_status_check_visibility_pre;
+int HP_status_check_visibility_post;
+int HP_status_change_spread_pre;
+int HP_status_change_spread_post;
+int HP_status_calc_def_pre;
+int HP_status_calc_def_post;
+int HP_status_calc_def2_pre;
+int HP_status_calc_def2_post;
+int HP_status_calc_mdef_pre;
+int HP_status_calc_mdef_post;
+int HP_status_calc_mdef2_pre;
+int HP_status_calc_mdef2_post;
+int HP_status_calc_batk_pre;
+int HP_status_calc_batk_post;
+int HP_status_base_matk_pre;
+int HP_status_base_matk_post;
+int HP_status_get_weapon_atk_pre;
+int HP_status_get_weapon_atk_post;
+int HP_status_get_total_mdef_pre;
+int HP_status_get_total_mdef_post;
+int HP_status_get_total_def_pre;
+int HP_status_get_total_def_post;
+int HP_status_get_matk_pre;
+int HP_status_get_matk_post;
+int HP_status_readdb_pre;
+int HP_status_readdb_post;
+int HP_status_initChangeTables_pre;
+int HP_status_initChangeTables_post;
+int HP_status_initDummyData_pre;
+int HP_status_initDummyData_post;
+int HP_status_base_amotion_pc_pre;
+int HP_status_base_amotion_pc_post;
+int HP_status_base_atk_pre;
+int HP_status_base_atk_post;
+int HP_status_calc_sigma_pre;
+int HP_status_calc_sigma_post;
+int HP_status_base_pc_maxhp_pre;
+int HP_status_base_pc_maxhp_post;
+int HP_status_base_pc_maxsp_pre;
+int HP_status_base_pc_maxsp_post;
+int HP_status_calc_npc__pre;
+int HP_status_calc_npc__post;
+int HP_status_calc_str_pre;
+int HP_status_calc_str_post;
+int HP_status_calc_agi_pre;
+int HP_status_calc_agi_post;
+int HP_status_calc_vit_pre;
+int HP_status_calc_vit_post;
+int HP_status_calc_int_pre;
+int HP_status_calc_int_post;
+int HP_status_calc_dex_pre;
+int HP_status_calc_dex_post;
+int HP_status_calc_luk_pre;
+int HP_status_calc_luk_post;
+int HP_status_calc_watk_pre;
+int HP_status_calc_watk_post;
+int HP_status_calc_matk_pre;
+int HP_status_calc_matk_post;
+int HP_status_calc_hit_pre;
+int HP_status_calc_hit_post;
+int HP_status_calc_critical_pre;
+int HP_status_calc_critical_post;
+int HP_status_calc_flee_pre;
+int HP_status_calc_flee_post;
+int HP_status_calc_flee2_pre;
+int HP_status_calc_flee2_post;
+int HP_status_calc_speed_pre;
+int HP_status_calc_speed_post;
+int HP_status_calc_aspd_rate_pre;
+int HP_status_calc_aspd_rate_post;
+int HP_status_calc_dmotion_pre;
+int HP_status_calc_dmotion_post;
+int HP_status_calc_aspd_pre;
+int HP_status_calc_aspd_post;
+int HP_status_calc_fix_aspd_pre;
+int HP_status_calc_fix_aspd_post;
+int HP_status_calc_maxhp_pre;
+int HP_status_calc_maxhp_post;
+int HP_status_calc_maxsp_pre;
+int HP_status_calc_maxsp_post;
+int HP_status_calc_element_pre;
+int HP_status_calc_element_post;
+int HP_status_calc_element_lv_pre;
+int HP_status_calc_element_lv_post;
+int HP_status_calc_mode_pre;
+int HP_status_calc_mode_post;
+int HP_status_calc_ematk_pre;
+int HP_status_calc_ematk_post;
+int HP_status_calc_bl_main_pre;
+int HP_status_calc_bl_main_post;
+int HP_status_display_add_pre;
+int HP_status_display_add_post;
+int HP_status_display_remove_pre;
+int HP_status_display_remove_post;
+int HP_status_natural_heal_pre;
+int HP_status_natural_heal_post;
+int HP_status_natural_heal_timer_pre;
+int HP_status_natural_heal_timer_post;
+int HP_status_readdb_job1_pre;
+int HP_status_readdb_job1_post;
+int HP_status_readdb_job2_pre;
+int HP_status_readdb_job2_post;
+int HP_status_readdb_sizefix_pre;
+int HP_status_readdb_sizefix_post;
+int HP_status_readdb_refine_pre;
+int HP_status_readdb_refine_post;
+int HP_status_readdb_scconfig_pre;
+int HP_status_readdb_scconfig_post;
+int HP_storage_reconnect_pre;
+int HP_storage_reconnect_post;
+int HP_storage_delitem_pre;
+int HP_storage_delitem_post;
+int HP_storage_open_pre;
+int HP_storage_open_post;
+int HP_storage_add_pre;
+int HP_storage_add_post;
+int HP_storage_get_pre;
+int HP_storage_get_post;
+int HP_storage_additem_pre;
+int HP_storage_additem_post;
+int HP_storage_addfromcart_pre;
+int HP_storage_addfromcart_post;
+int HP_storage_gettocart_pre;
+int HP_storage_gettocart_post;
+int HP_storage_close_pre;
+int HP_storage_close_post;
+int HP_storage_pc_quit_pre;
+int HP_storage_pc_quit_post;
+int HP_storage_comp_item_pre;
+int HP_storage_comp_item_post;
+int HP_storage_sortitem_pre;
+int HP_storage_sortitem_post;
+int HP_storage_reconnect_sub_pre;
+int HP_storage_reconnect_sub_post;
+int HP_trade_request_pre;
+int HP_trade_request_post;
+int HP_trade_ack_pre;
+int HP_trade_ack_post;
+int HP_trade_check_impossible_pre;
+int HP_trade_check_impossible_post;
+int HP_trade_check_pre;
+int HP_trade_check_post;
+int HP_trade_additem_pre;
+int HP_trade_additem_post;
+int HP_trade_addzeny_pre;
+int HP_trade_addzeny_post;
+int HP_trade_ok_pre;
+int HP_trade_ok_post;
+int HP_trade_cancel_pre;
+int HP_trade_cancel_post;
+int HP_trade_commit_pre;
+int HP_trade_commit_post;
+int HP_unit_init_pre;
+int HP_unit_init_post;
+int HP_unit_final_pre;
+int HP_unit_final_post;
+int HP_unit_bl2ud_pre;
+int HP_unit_bl2ud_post;
+int HP_unit_bl2ud2_pre;
+int HP_unit_bl2ud2_post;
+int HP_unit_attack_timer_pre;
+int HP_unit_attack_timer_post;
+int HP_unit_walktoxy_timer_pre;
+int HP_unit_walktoxy_timer_post;
+int HP_unit_walktoxy_sub_pre;
+int HP_unit_walktoxy_sub_post;
+int HP_unit_delay_walktoxy_timer_pre;
+int HP_unit_delay_walktoxy_timer_post;
+int HP_unit_walktoxy_pre;
+int HP_unit_walktoxy_post;
+int HP_unit_walktobl_sub_pre;
+int HP_unit_walktobl_sub_post;
+int HP_unit_walktobl_pre;
+int HP_unit_walktobl_post;
+int HP_unit_run_pre;
+int HP_unit_run_post;
+int HP_unit_wugdash_pre;
+int HP_unit_wugdash_post;
+int HP_unit_escape_pre;
+int HP_unit_escape_post;
+int HP_unit_movepos_pre;
+int HP_unit_movepos_post;
+int HP_unit_setdir_pre;
+int HP_unit_setdir_post;
+int HP_unit_getdir_pre;
+int HP_unit_getdir_post;
+int HP_unit_blown_pre;
+int HP_unit_blown_post;
+int HP_unit_warp_pre;
+int HP_unit_warp_post;
+int HP_unit_stop_walking_pre;
+int HP_unit_stop_walking_post;
+int HP_unit_skilluse_id_pre;
+int HP_unit_skilluse_id_post;
+int HP_unit_is_walking_pre;
+int HP_unit_is_walking_post;
+int HP_unit_can_move_pre;
+int HP_unit_can_move_post;
+int HP_unit_resume_running_pre;
+int HP_unit_resume_running_post;
+int HP_unit_set_walkdelay_pre;
+int HP_unit_set_walkdelay_post;
+int HP_unit_skilluse_id2_pre;
+int HP_unit_skilluse_id2_post;
+int HP_unit_skilluse_pos_pre;
+int HP_unit_skilluse_pos_post;
+int HP_unit_skilluse_pos2_pre;
+int HP_unit_skilluse_pos2_post;
+int HP_unit_set_target_pre;
+int HP_unit_set_target_post;
+int HP_unit_stop_attack_pre;
+int HP_unit_stop_attack_post;
+int HP_unit_unattackable_pre;
+int HP_unit_unattackable_post;
+int HP_unit_attack_pre;
+int HP_unit_attack_post;
+int HP_unit_cancel_combo_pre;
+int HP_unit_cancel_combo_post;
+int HP_unit_can_reach_pos_pre;
+int HP_unit_can_reach_pos_post;
+int HP_unit_can_reach_bl_pre;
+int HP_unit_can_reach_bl_post;
+int HP_unit_calc_pos_pre;
+int HP_unit_calc_pos_post;
+int HP_unit_attack_timer_sub_pre;
+int HP_unit_attack_timer_sub_post;
+int HP_unit_skillcastcancel_pre;
+int HP_unit_skillcastcancel_post;
+int HP_unit_dataset_pre;
+int HP_unit_dataset_post;
+int HP_unit_counttargeted_pre;
+int HP_unit_counttargeted_post;
+int HP_unit_fixdamage_pre;
+int HP_unit_fixdamage_post;
+int HP_unit_changeviewsize_pre;
+int HP_unit_changeviewsize_post;
+int HP_unit_remove_map_pre;
+int HP_unit_remove_map_post;
+int HP_unit_remove_map_pc_pre;
+int HP_unit_remove_map_pc_post;
+int HP_unit_free_pc_pre;
+int HP_unit_free_pc_post;
+int HP_unit_free_pre;
+int HP_unit_free_post;
+int HP_vending_init_pre;
+int HP_vending_init_post;
+int HP_vending_final_pre;
+int HP_vending_final_post;
+int HP_vending_close_pre;
+int HP_vending_close_post;
+int HP_vending_open_pre;
+int HP_vending_open_post;
+int HP_vending_list_pre;
+int HP_vending_list_post;
+int HP_vending_purchase_pre;
+int HP_vending_purchase_post;
+int HP_vending_search_pre;
+int HP_vending_search_post;
+int HP_vending_searchall_pre;
+int HP_vending_searchall_post;
+} count;
+struct {
+struct atcommand_interface atcommand;
+struct battle_interface battle;
+struct battleground_interface bg;
+struct buyingstore_interface buyingstore;
+struct chat_interface chat;
+struct chrif_interface chrif;
+struct clif_interface clif;
+struct duel_interface duel;
+struct elemental_interface elemental;
+struct guild_interface guild;
+struct guild_storage_interface gstorage;
+struct homunculus_interface homun;
+struct instance_interface instance;
+struct intif_interface intif;
+struct irc_bot_interface ircbot;
+struct itemdb_interface itemdb;
+struct log_interface logs;
+struct mail_interface mail;
+struct map_interface map;
+struct mapit_interface mapit;
+struct mapreg_interface mapreg;
+struct mercenary_interface mercenary;
+struct mob_interface mob;
+struct npc_interface npc;
+struct party_interface party;
+struct path_interface path;
+struct pc_interface pc;
+struct pet_interface pet;
+struct quest_interface quest;
+struct script_interface script;
+struct searchstore_interface searchstore;
+struct skill_interface skill;
+struct status_interface status;
+struct storage_interface storage;
+struct trade_interface trade;
+struct unit_interface unit;
+struct vending_interface vending;
+} source;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
new file mode 100644
index 000000000..368e4a4c7
--- /dev/null
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -0,0 +1,2467 @@
+struct HookingPointData HookingPoints[] = {
+/* atcommand */
+{ HP_POP(atcommand->init), HP_POP2(HP_atcommand_init), 0 },
+{ HP_POP(atcommand->final), HP_POP2(HP_atcommand_final), 2 },
+{ HP_POP(atcommand->parse), HP_POP2(HP_atcommand_parse), 4 },
+{ HP_POP(atcommand->create), HP_POP2(HP_atcommand_create), 6 },
+{ HP_POP(atcommand->can_use), HP_POP2(HP_atcommand_can_use), 8 },
+{ HP_POP(atcommand->can_use2), HP_POP2(HP_atcommand_can_use2), 10 },
+{ HP_POP(atcommand->load_groups), HP_POP2(HP_atcommand_load_groups), 12 },
+{ HP_POP(atcommand->exists), HP_POP2(HP_atcommand_exists), 14 },
+{ HP_POP(atcommand->msg_read), HP_POP2(HP_atcommand_msg_read), 16 },
+{ HP_POP(atcommand->final_msg), HP_POP2(HP_atcommand_final_msg), 18 },
+{ HP_POP(atcommand->get_bind_byname), HP_POP2(HP_atcommand_get_bind_byname), 20 },
+{ HP_POP(atcommand->get_info_byname), HP_POP2(HP_atcommand_get_info_byname), 22 },
+{ HP_POP(atcommand->check_alias), HP_POP2(HP_atcommand_check_alias), 24 },
+{ HP_POP(atcommand->get_suggestions), HP_POP2(HP_atcommand_get_suggestions), 26 },
+{ HP_POP(atcommand->config_read), HP_POP2(HP_atcommand_config_read), 28 },
+{ HP_POP(atcommand->stopattack), HP_POP2(HP_atcommand_stopattack), 30 },
+{ HP_POP(atcommand->pvpoff_sub), HP_POP2(HP_atcommand_pvpoff_sub), 32 },
+{ HP_POP(atcommand->pvpon_sub), HP_POP2(HP_atcommand_pvpon_sub), 34 },
+{ HP_POP(atcommand->atkillmonster_sub), HP_POP2(HP_atcommand_atkillmonster_sub), 36 },
+{ HP_POP(atcommand->raise_sub), HP_POP2(HP_atcommand_raise_sub), 38 },
+{ HP_POP(atcommand->get_jail_time), HP_POP2(HP_atcommand_get_jail_time), 40 },
+{ HP_POP(atcommand->cleanfloor_sub), HP_POP2(HP_atcommand_cleanfloor_sub), 42 },
+{ HP_POP(atcommand->mutearea_sub), HP_POP2(HP_atcommand_mutearea_sub), 44 },
+{ HP_POP(atcommand->commands_sub), HP_POP2(HP_atcommand_commands_sub), 46 },
+{ HP_POP(atcommand->cmd_db_clear), HP_POP2(HP_atcommand_cmd_db_clear), 48 },
+{ HP_POP(atcommand->cmd_db_clear_sub), HP_POP2(HP_atcommand_cmd_db_clear_sub), 50 },
+{ HP_POP(atcommand->doload), HP_POP2(HP_atcommand_doload), 52 },
+{ HP_POP(atcommand->base_commands), HP_POP2(HP_atcommand_base_commands), 54 },
+/* battle */
+{ HP_POP(battle->init), HP_POP2(HP_battle_init), 56 },
+{ HP_POP(battle->final), HP_POP2(HP_battle_final), 58 },
+{ HP_POP(battle->calc_attack), HP_POP2(HP_battle_calc_attack), 60 },
+{ HP_POP(battle->calc_damage), HP_POP2(HP_battle_calc_damage), 62 },
+{ HP_POP(battle->calc_gvg_damage), HP_POP2(HP_battle_calc_gvg_damage), 64 },
+{ HP_POP(battle->calc_bg_damage), HP_POP2(HP_battle_calc_bg_damage), 66 },
+{ HP_POP(battle->weapon_attack), HP_POP2(HP_battle_weapon_attack), 68 },
+{ HP_POP(battle->calc_weapon_attack), HP_POP2(HP_battle_calc_weapon_attack), 70 },
+{ HP_POP(battle->delay_damage), HP_POP2(HP_battle_delay_damage), 72 },
+{ HP_POP(battle->drain), HP_POP2(HP_battle_drain), 74 },
+{ HP_POP(battle->calc_return_damage), HP_POP2(HP_battle_calc_return_damage), 76 },
+{ HP_POP(battle->attr_ratio), HP_POP2(HP_battle_attr_ratio), 78 },
+{ HP_POP(battle->attr_fix), HP_POP2(HP_battle_attr_fix), 80 },
+{ HP_POP(battle->calc_cardfix), HP_POP2(HP_battle_calc_cardfix), 82 },
+{ HP_POP(battle->calc_elefix), HP_POP2(HP_battle_calc_elefix), 84 },
+{ HP_POP(battle->calc_masteryfix), HP_POP2(HP_battle_calc_masteryfix), 86 },
+{ HP_POP(battle->calc_skillratio), HP_POP2(HP_battle_calc_skillratio), 88 },
+{ HP_POP(battle->calc_sizefix), HP_POP2(HP_battle_calc_sizefix), 90 },
+{ HP_POP(battle->calc_weapon_damage), HP_POP2(HP_battle_calc_weapon_damage), 92 },
+{ HP_POP(battle->calc_defense), HP_POP2(HP_battle_calc_defense), 94 },
+{ HP_POP(battle->get_master), HP_POP2(HP_battle_get_master), 96 },
+{ HP_POP(battle->get_targeted), HP_POP2(HP_battle_get_targeted), 98 },
+{ HP_POP(battle->get_enemy), HP_POP2(HP_battle_get_enemy), 100 },
+{ HP_POP(battle->get_target), HP_POP2(HP_battle_get_target), 102 },
+{ HP_POP(battle->get_current_skill), HP_POP2(HP_battle_get_current_skill), 104 },
+{ HP_POP(battle->check_undead), HP_POP2(HP_battle_check_undead), 106 },
+{ HP_POP(battle->check_target), HP_POP2(HP_battle_check_target), 108 },
+{ HP_POP(battle->check_range), HP_POP2(HP_battle_check_range), 110 },
+{ HP_POP(battle->consume_ammo), HP_POP2(HP_battle_consume_ammo), 112 },
+{ HP_POP(battle->get_targeted_sub), HP_POP2(HP_battle_get_targeted_sub), 114 },
+{ HP_POP(battle->get_enemy_sub), HP_POP2(HP_battle_get_enemy_sub), 116 },
+{ HP_POP(battle->get_enemy_area_sub), HP_POP2(HP_battle_get_enemy_area_sub), 118 },
+{ HP_POP(battle->delay_damage_sub), HP_POP2(HP_battle_delay_damage_sub), 120 },
+{ HP_POP(battle->blewcount_bonus), HP_POP2(HP_battle_blewcount_bonus), 122 },
+{ HP_POP(battle->range_type), HP_POP2(HP_battle_range_type), 124 },
+{ HP_POP(battle->calc_base_damage), HP_POP2(HP_battle_calc_base_damage), 126 },
+{ HP_POP(battle->calc_base_damage2), HP_POP2(HP_battle_calc_base_damage2), 128 },
+{ HP_POP(battle->calc_misc_attack), HP_POP2(HP_battle_calc_misc_attack), 130 },
+{ HP_POP(battle->calc_magic_attack), HP_POP2(HP_battle_calc_magic_attack), 132 },
+{ HP_POP(battle->adjust_skill_damage), HP_POP2(HP_battle_adjust_skill_damage), 134 },
+{ HP_POP(battle->add_mastery), HP_POP2(HP_battle_add_mastery), 136 },
+{ HP_POP(battle->calc_drain), HP_POP2(HP_battle_calc_drain), 138 },
+{ HP_POP(battle->config_read), HP_POP2(HP_battle_config_read), 140 },
+{ HP_POP(battle->config_set_defaults), HP_POP2(HP_battle_config_set_defaults), 142 },
+{ HP_POP(battle->config_set_value), HP_POP2(HP_battle_config_set_value), 144 },
+{ HP_POP(battle->config_get_value), HP_POP2(HP_battle_config_get_value), 146 },
+{ HP_POP(battle->config_adjust), HP_POP2(HP_battle_config_adjust), 148 },
+{ HP_POP(battle->get_enemy_area), HP_POP2(HP_battle_get_enemy_area), 150 },
+{ HP_POP(battle->damage_area), HP_POP2(HP_battle_damage_area), 152 },
+/* bg */
+{ HP_POP(bg->init), HP_POP2(HP_bg_init), 154 },
+{ HP_POP(bg->final), HP_POP2(HP_bg_final), 156 },
+{ HP_POP(bg->name2arena), HP_POP2(HP_bg_name2arena), 158 },
+{ HP_POP(bg->queue_add), HP_POP2(HP_bg_queue_add), 160 },
+{ HP_POP(bg->can_queue), HP_POP2(HP_bg_can_queue), 162 },
+{ HP_POP(bg->id2pos), HP_POP2(HP_bg_id2pos), 164 },
+{ HP_POP(bg->queue_pc_cleanup), HP_POP2(HP_bg_queue_pc_cleanup), 166 },
+{ HP_POP(bg->begin), HP_POP2(HP_bg_begin), 168 },
+{ HP_POP(bg->begin_timer), HP_POP2(HP_bg_begin_timer), 170 },
+{ HP_POP(bg->queue_pregame), HP_POP2(HP_bg_queue_pregame), 172 },
+{ HP_POP(bg->fillup_timer), HP_POP2(HP_bg_fillup_timer), 174 },
+{ HP_POP(bg->queue_ready_ack), HP_POP2(HP_bg_queue_ready_ack), 176 },
+{ HP_POP(bg->match_over), HP_POP2(HP_bg_match_over), 178 },
+{ HP_POP(bg->queue_check), HP_POP2(HP_bg_queue_check), 180 },
+{ HP_POP(bg->team_search), HP_POP2(HP_bg_team_search), 182 },
+{ HP_POP(bg->getavailablesd), HP_POP2(HP_bg_getavailablesd), 184 },
+{ HP_POP(bg->team_delete), HP_POP2(HP_bg_team_delete), 186 },
+{ HP_POP(bg->team_warp), HP_POP2(HP_bg_team_warp), 188 },
+{ HP_POP(bg->send_dot_remove), HP_POP2(HP_bg_send_dot_remove), 190 },
+{ HP_POP(bg->team_join), HP_POP2(HP_bg_team_join), 192 },
+{ HP_POP(bg->team_leave), HP_POP2(HP_bg_team_leave), 194 },
+{ HP_POP(bg->member_respawn), HP_POP2(HP_bg_member_respawn), 196 },
+{ HP_POP(bg->create), HP_POP2(HP_bg_create), 198 },
+{ HP_POP(bg->team_get_id), HP_POP2(HP_bg_team_get_id), 200 },
+{ HP_POP(bg->send_message), HP_POP2(HP_bg_send_message), 202 },
+{ HP_POP(bg->send_xy_timer_sub), HP_POP2(HP_bg_send_xy_timer_sub), 204 },
+{ HP_POP(bg->send_xy_timer), HP_POP2(HP_bg_send_xy_timer), 206 },
+{ HP_POP(bg->config_read), HP_POP2(HP_bg_config_read), 208 },
+/* buyingstore */
+{ HP_POP(buyingstore->setup), HP_POP2(HP_buyingstore_setup), 210 },
+{ HP_POP(buyingstore->create), HP_POP2(HP_buyingstore_create), 212 },
+{ HP_POP(buyingstore->close), HP_POP2(HP_buyingstore_close), 214 },
+{ HP_POP(buyingstore->open), HP_POP2(HP_buyingstore_open), 216 },
+{ HP_POP(buyingstore->trade), HP_POP2(HP_buyingstore_trade), 218 },
+{ HP_POP(buyingstore->search), HP_POP2(HP_buyingstore_search), 220 },
+{ HP_POP(buyingstore->searchall), HP_POP2(HP_buyingstore_searchall), 222 },
+{ HP_POP(buyingstore->getuid), HP_POP2(HP_buyingstore_getuid), 224 },
+/* chat */
+{ HP_POP(chat->create_pc_chat), HP_POP2(HP_chat_create_pc_chat), 226 },
+{ HP_POP(chat->join), HP_POP2(HP_chat_join), 228 },
+{ HP_POP(chat->leave), HP_POP2(HP_chat_leave), 230 },
+{ HP_POP(chat->change_owner), HP_POP2(HP_chat_change_owner), 232 },
+{ HP_POP(chat->change_status), HP_POP2(HP_chat_change_status), 234 },
+{ HP_POP(chat->kick), HP_POP2(HP_chat_kick), 236 },
+{ HP_POP(chat->create_npc_chat), HP_POP2(HP_chat_create_npc_chat), 238 },
+{ HP_POP(chat->delete_npc_chat), HP_POP2(HP_chat_delete_npc_chat), 240 },
+{ HP_POP(chat->enable_event), HP_POP2(HP_chat_enable_event), 242 },
+{ HP_POP(chat->disable_event), HP_POP2(HP_chat_disable_event), 244 },
+{ HP_POP(chat->npc_kick_all), HP_POP2(HP_chat_npc_kick_all), 246 },
+{ HP_POP(chat->trigger_event), HP_POP2(HP_chat_trigger_event), 248 },
+{ HP_POP(chat->create), HP_POP2(HP_chat_create), 250 },
+/* chrif */
+{ HP_POP(chrif->final), HP_POP2(HP_chrif_final), 252 },
+{ HP_POP(chrif->init), HP_POP2(HP_chrif_init), 254 },
+{ HP_POP(chrif->setuserid), HP_POP2(HP_chrif_setuserid), 256 },
+{ HP_POP(chrif->setpasswd), HP_POP2(HP_chrif_setpasswd), 258 },
+{ HP_POP(chrif->checkdefaultlogin), HP_POP2(HP_chrif_checkdefaultlogin), 260 },
+{ HP_POP(chrif->setip), HP_POP2(HP_chrif_setip), 262 },
+{ HP_POP(chrif->setport), HP_POP2(HP_chrif_setport), 264 },
+{ HP_POP(chrif->isconnected), HP_POP2(HP_chrif_isconnected), 266 },
+{ HP_POP(chrif->check_shutdown), HP_POP2(HP_chrif_check_shutdown), 268 },
+{ HP_POP(chrif->search), HP_POP2(HP_chrif_search), 270 },
+{ HP_POP(chrif->auth_check), HP_POP2(HP_chrif_auth_check), 272 },
+{ HP_POP(chrif->auth_delete), HP_POP2(HP_chrif_auth_delete), 274 },
+{ HP_POP(chrif->auth_finished), HP_POP2(HP_chrif_auth_finished), 276 },
+{ HP_POP(chrif->authreq), HP_POP2(HP_chrif_authreq), 278 },
+{ HP_POP(chrif->authok), HP_POP2(HP_chrif_authok), 280 },
+{ HP_POP(chrif->scdata_request), HP_POP2(HP_chrif_scdata_request), 282 },
+{ HP_POP(chrif->save), HP_POP2(HP_chrif_save), 284 },
+{ HP_POP(chrif->charselectreq), HP_POP2(HP_chrif_charselectreq), 286 },
+{ HP_POP(chrif->changemapserver), HP_POP2(HP_chrif_changemapserver), 288 },
+{ HP_POP(chrif->searchcharid), HP_POP2(HP_chrif_searchcharid), 290 },
+{ HP_POP(chrif->changeemail), HP_POP2(HP_chrif_changeemail), 292 },
+{ HP_POP(chrif->char_ask_name), HP_POP2(HP_chrif_char_ask_name), 294 },
+{ HP_POP(chrif->updatefamelist), HP_POP2(HP_chrif_updatefamelist), 296 },
+{ HP_POP(chrif->buildfamelist), HP_POP2(HP_chrif_buildfamelist), 298 },
+{ HP_POP(chrif->save_scdata), HP_POP2(HP_chrif_save_scdata), 300 },
+{ HP_POP(chrif->ragsrvinfo), HP_POP2(HP_chrif_ragsrvinfo), 302 },
+{ HP_POP(chrif->char_offline), HP_POP2(HP_chrif_char_offline), 304 },
+{ HP_POP(chrif->char_offline_nsd), HP_POP2(HP_chrif_char_offline_nsd), 306 },
+{ HP_POP(chrif->char_reset_offline), HP_POP2(HP_chrif_char_reset_offline), 308 },
+{ HP_POP(chrif->send_users_tochar), HP_POP2(HP_chrif_send_users_tochar), 310 },
+{ HP_POP(chrif->char_online), HP_POP2(HP_chrif_char_online), 312 },
+{ HP_POP(chrif->changesex), HP_POP2(HP_chrif_changesex), 314 },
+{ HP_POP(chrif->divorce), HP_POP2(HP_chrif_divorce), 316 },
+{ HP_POP(chrif->removefriend), HP_POP2(HP_chrif_removefriend), 318 },
+{ HP_POP(chrif->send_report), HP_POP2(HP_chrif_send_report), 320 },
+{ HP_POP(chrif->flush_fifo), HP_POP2(HP_chrif_flush_fifo), 322 },
+{ HP_POP(chrif->skillid2idx), HP_POP2(HP_chrif_skillid2idx), 324 },
+{ HP_POP(chrif->sd_to_auth), HP_POP2(HP_chrif_sd_to_auth), 326 },
+{ HP_POP(chrif->check_connect_char_server), HP_POP2(HP_chrif_check_connect_char_server), 328 },
+{ HP_POP(chrif->auth_logout), HP_POP2(HP_chrif_auth_logout), 330 },
+{ HP_POP(chrif->save_ack), HP_POP2(HP_chrif_save_ack), 332 },
+{ HP_POP(chrif->reconnect), HP_POP2(HP_chrif_reconnect), 334 },
+{ HP_POP(chrif->auth_db_cleanup_sub), HP_POP2(HP_chrif_auth_db_cleanup_sub), 336 },
+{ HP_POP(chrif->char_ask_name_answer), HP_POP2(HP_chrif_char_ask_name_answer), 338 },
+{ HP_POP(chrif->auth_db_final), HP_POP2(HP_chrif_auth_db_final), 340 },
+{ HP_POP(chrif->send_usercount_tochar), HP_POP2(HP_chrif_send_usercount_tochar), 342 },
+{ HP_POP(chrif->auth_db_cleanup), HP_POP2(HP_chrif_auth_db_cleanup), 344 },
+{ HP_POP(chrif->connect), HP_POP2(HP_chrif_connect), 346 },
+{ HP_POP(chrif->connectack), HP_POP2(HP_chrif_connectack), 348 },
+{ HP_POP(chrif->sendmap), HP_POP2(HP_chrif_sendmap), 350 },
+{ HP_POP(chrif->sendmapack), HP_POP2(HP_chrif_sendmapack), 352 },
+{ HP_POP(chrif->recvmap), HP_POP2(HP_chrif_recvmap), 354 },
+{ HP_POP(chrif->changemapserverack), HP_POP2(HP_chrif_changemapserverack), 356 },
+{ HP_POP(chrif->changedsex), HP_POP2(HP_chrif_changedsex), 358 },
+{ HP_POP(chrif->divorceack), HP_POP2(HP_chrif_divorceack), 360 },
+{ HP_POP(chrif->accountban), HP_POP2(HP_chrif_accountban), 362 },
+{ HP_POP(chrif->recvfamelist), HP_POP2(HP_chrif_recvfamelist), 364 },
+{ HP_POP(chrif->load_scdata), HP_POP2(HP_chrif_load_scdata), 366 },
+{ HP_POP(chrif->update_ip), HP_POP2(HP_chrif_update_ip), 368 },
+{ HP_POP(chrif->disconnectplayer), HP_POP2(HP_chrif_disconnectplayer), 370 },
+{ HP_POP(chrif->removemap), HP_POP2(HP_chrif_removemap), 372 },
+{ HP_POP(chrif->updatefamelist_ack), HP_POP2(HP_chrif_updatefamelist_ack), 374 },
+{ HP_POP(chrif->keepalive), HP_POP2(HP_chrif_keepalive), 376 },
+{ HP_POP(chrif->keepalive_ack), HP_POP2(HP_chrif_keepalive_ack), 378 },
+{ HP_POP(chrif->deadopt), HP_POP2(HP_chrif_deadopt), 380 },
+{ HP_POP(chrif->authfail), HP_POP2(HP_chrif_authfail), 382 },
+{ HP_POP(chrif->on_ready), HP_POP2(HP_chrif_on_ready), 384 },
+{ HP_POP(chrif->on_disconnect), HP_POP2(HP_chrif_on_disconnect), 386 },
+{ HP_POP(chrif->parse), HP_POP2(HP_chrif_parse), 388 },
+/* clif */
+{ HP_POP(clif->init), HP_POP2(HP_clif_init), 390 },
+{ HP_POP(clif->final), HP_POP2(HP_clif_final), 392 },
+{ HP_POP(clif->setip), HP_POP2(HP_clif_setip), 394 },
+{ HP_POP(clif->setbindip), HP_POP2(HP_clif_setbindip), 396 },
+{ HP_POP(clif->setport), HP_POP2(HP_clif_setport), 398 },
+{ HP_POP(clif->refresh_ip), HP_POP2(HP_clif_refresh_ip), 400 },
+{ HP_POP(clif->send), HP_POP2(HP_clif_send), 402 },
+{ HP_POP(clif->send_sub), HP_POP2(HP_clif_send_sub), 404 },
+{ HP_POP(clif->parse), HP_POP2(HP_clif_parse), 406 },
+{ HP_POP(clif->parse_cmd), HP_POP2(HP_clif_parse_cmd), 408 },
+{ HP_POP(clif->decrypt_cmd), HP_POP2(HP_clif_decrypt_cmd), 410 },
+{ HP_POP(clif->authok), HP_POP2(HP_clif_authok), 412 },
+{ HP_POP(clif->authrefuse), HP_POP2(HP_clif_authrefuse), 414 },
+{ HP_POP(clif->authfail_fd), HP_POP2(HP_clif_authfail_fd), 416 },
+{ HP_POP(clif->charselectok), HP_POP2(HP_clif_charselectok), 418 },
+{ HP_POP(clif->dropflooritem), HP_POP2(HP_clif_dropflooritem), 420 },
+{ HP_POP(clif->clearflooritem), HP_POP2(HP_clif_clearflooritem), 422 },
+{ HP_POP(clif->additem), HP_POP2(HP_clif_additem), 424 },
+{ HP_POP(clif->dropitem), HP_POP2(HP_clif_dropitem), 426 },
+{ HP_POP(clif->delitem), HP_POP2(HP_clif_delitem), 428 },
+{ HP_POP(clif->takeitem), HP_POP2(HP_clif_takeitem), 430 },
+{ HP_POP(clif->arrowequip), HP_POP2(HP_clif_arrowequip), 432 },
+{ HP_POP(clif->arrow_fail), HP_POP2(HP_clif_arrow_fail), 434 },
+{ HP_POP(clif->use_card), HP_POP2(HP_clif_use_card), 436 },
+{ HP_POP(clif->cart_additem), HP_POP2(HP_clif_cart_additem), 438 },
+{ HP_POP(clif->cart_delitem), HP_POP2(HP_clif_cart_delitem), 440 },
+{ HP_POP(clif->equipitemack), HP_POP2(HP_clif_equipitemack), 442 },
+{ HP_POP(clif->unequipitemack), HP_POP2(HP_clif_unequipitemack), 444 },
+{ HP_POP(clif->useitemack), HP_POP2(HP_clif_useitemack), 446 },
+{ HP_POP(clif->addcards), HP_POP2(HP_clif_addcards), 448 },
+{ HP_POP(clif->addcards2), HP_POP2(HP_clif_addcards2), 450 },
+{ HP_POP(clif->item_sub), HP_POP2(HP_clif_item_sub), 452 },
+{ HP_POP(clif->getareachar_item), HP_POP2(HP_clif_getareachar_item), 454 },
+{ HP_POP(clif->cart_additem_ack), HP_POP2(HP_clif_cart_additem_ack), 456 },
+{ HP_POP(clif->cashshop_load), HP_POP2(HP_clif_cashshop_load), 458 },
+{ HP_POP(clif->package_announce), HP_POP2(HP_clif_package_announce), 460 },
+{ HP_POP(clif->clearunit_single), HP_POP2(HP_clif_clearunit_single), 462 },
+{ HP_POP(clif->clearunit_area), HP_POP2(HP_clif_clearunit_area), 464 },
+{ HP_POP(clif->clearunit_delayed), HP_POP2(HP_clif_clearunit_delayed), 466 },
+{ HP_POP(clif->walkok), HP_POP2(HP_clif_walkok), 468 },
+{ HP_POP(clif->move), HP_POP2(HP_clif_move), 470 },
+{ HP_POP(clif->move2), HP_POP2(HP_clif_move2), 472 },
+{ HP_POP(clif->blown), HP_POP2(HP_clif_blown), 474 },
+{ HP_POP(clif->slide), HP_POP2(HP_clif_slide), 476 },
+{ HP_POP(clif->fixpos), HP_POP2(HP_clif_fixpos), 478 },
+{ HP_POP(clif->changelook), HP_POP2(HP_clif_changelook), 480 },
+{ HP_POP(clif->changetraplook), HP_POP2(HP_clif_changetraplook), 482 },
+{ HP_POP(clif->refreshlook), HP_POP2(HP_clif_refreshlook), 484 },
+{ HP_POP(clif->class_change), HP_POP2(HP_clif_class_change), 486 },
+{ HP_POP(clif->skill_setunit), HP_POP2(HP_clif_skill_setunit), 488 },
+{ HP_POP(clif->skill_delunit), HP_POP2(HP_clif_skill_delunit), 490 },
+{ HP_POP(clif->skillunit_update), HP_POP2(HP_clif_skillunit_update), 492 },
+{ HP_POP(clif->clearunit_delayed_sub), HP_POP2(HP_clif_clearunit_delayed_sub), 494 },
+{ HP_POP(clif->set_unit_idle), HP_POP2(HP_clif_set_unit_idle), 496 },
+{ HP_POP(clif->spawn_unit), HP_POP2(HP_clif_spawn_unit), 498 },
+{ HP_POP(clif->spawn_unit2), HP_POP2(HP_clif_spawn_unit2), 500 },
+{ HP_POP(clif->set_unit_idle2), HP_POP2(HP_clif_set_unit_idle2), 502 },
+{ HP_POP(clif->set_unit_walking), HP_POP2(HP_clif_set_unit_walking), 504 },
+{ HP_POP(clif->calc_walkdelay), HP_POP2(HP_clif_calc_walkdelay), 506 },
+{ HP_POP(clif->getareachar_skillunit), HP_POP2(HP_clif_getareachar_skillunit), 508 },
+{ HP_POP(clif->getareachar_unit), HP_POP2(HP_clif_getareachar_unit), 510 },
+{ HP_POP(clif->clearchar_skillunit), HP_POP2(HP_clif_clearchar_skillunit), 512 },
+{ HP_POP(clif->getareachar), HP_POP2(HP_clif_getareachar), 514 },
+{ HP_POP(clif->spawn), HP_POP2(HP_clif_spawn), 516 },
+{ HP_POP(clif->changemap), HP_POP2(HP_clif_changemap), 518 },
+{ HP_POP(clif->changemapcell), HP_POP2(HP_clif_changemapcell), 520 },
+{ HP_POP(clif->map_property), HP_POP2(HP_clif_map_property), 522 },
+{ HP_POP(clif->pvpset), HP_POP2(HP_clif_pvpset), 524 },
+{ HP_POP(clif->map_property_mapall), HP_POP2(HP_clif_map_property_mapall), 526 },
+{ HP_POP(clif->bossmapinfo), HP_POP2(HP_clif_bossmapinfo), 528 },
+{ HP_POP(clif->map_type), HP_POP2(HP_clif_map_type), 530 },
+{ HP_POP(clif->maptypeproperty2), HP_POP2(HP_clif_maptypeproperty2), 532 },
+{ HP_POP(clif->changemapserver), HP_POP2(HP_clif_changemapserver), 534 },
+{ HP_POP(clif->npcbuysell), HP_POP2(HP_clif_npcbuysell), 536 },
+{ HP_POP(clif->buylist), HP_POP2(HP_clif_buylist), 538 },
+{ HP_POP(clif->selllist), HP_POP2(HP_clif_selllist), 540 },
+{ HP_POP(clif->cashshop_show), HP_POP2(HP_clif_cashshop_show), 542 },
+{ HP_POP(clif->npc_buy_result), HP_POP2(HP_clif_npc_buy_result), 544 },
+{ HP_POP(clif->npc_sell_result), HP_POP2(HP_clif_npc_sell_result), 546 },
+{ HP_POP(clif->cashshop_ack), HP_POP2(HP_clif_cashshop_ack), 548 },
+{ HP_POP(clif->scriptmes), HP_POP2(HP_clif_scriptmes), 550 },
+{ HP_POP(clif->scriptnext), HP_POP2(HP_clif_scriptnext), 552 },
+{ HP_POP(clif->scriptclose), HP_POP2(HP_clif_scriptclose), 554 },
+{ HP_POP(clif->scriptmenu), HP_POP2(HP_clif_scriptmenu), 556 },
+{ HP_POP(clif->scriptinput), HP_POP2(HP_clif_scriptinput), 558 },
+{ HP_POP(clif->scriptinputstr), HP_POP2(HP_clif_scriptinputstr), 560 },
+{ HP_POP(clif->cutin), HP_POP2(HP_clif_cutin), 562 },
+{ HP_POP(clif->sendfakenpc), HP_POP2(HP_clif_sendfakenpc), 564 },
+{ HP_POP(clif->scriptclear), HP_POP2(HP_clif_scriptclear), 566 },
+{ HP_POP(clif->viewpoint), HP_POP2(HP_clif_viewpoint), 568 },
+{ HP_POP(clif->damage), HP_POP2(HP_clif_damage), 570 },
+{ HP_POP(clif->sitting), HP_POP2(HP_clif_sitting), 572 },
+{ HP_POP(clif->standing), HP_POP2(HP_clif_standing), 574 },
+{ HP_POP(clif->arrow_create_list), HP_POP2(HP_clif_arrow_create_list), 576 },
+{ HP_POP(clif->refresh), HP_POP2(HP_clif_refresh), 578 },
+{ HP_POP(clif->fame_blacksmith), HP_POP2(HP_clif_fame_blacksmith), 580 },
+{ HP_POP(clif->fame_alchemist), HP_POP2(HP_clif_fame_alchemist), 582 },
+{ HP_POP(clif->fame_taekwon), HP_POP2(HP_clif_fame_taekwon), 584 },
+{ HP_POP(clif->ranklist), HP_POP2(HP_clif_ranklist), 586 },
+{ HP_POP(clif->update_rankingpoint), HP_POP2(HP_clif_update_rankingpoint), 588 },
+{ HP_POP(clif->pRanklist), HP_POP2(HP_clif_pRanklist), 590 },
+{ HP_POP(clif->hotkeys), HP_POP2(HP_clif_hotkeys), 592 },
+{ HP_POP(clif->insight), HP_POP2(HP_clif_insight), 594 },
+{ HP_POP(clif->outsight), HP_POP2(HP_clif_outsight), 596 },
+{ HP_POP(clif->skillcastcancel), HP_POP2(HP_clif_skillcastcancel), 598 },
+{ HP_POP(clif->skill_fail), HP_POP2(HP_clif_skill_fail), 600 },
+{ HP_POP(clif->skill_cooldown), HP_POP2(HP_clif_skill_cooldown), 602 },
+{ HP_POP(clif->skill_memomessage), HP_POP2(HP_clif_skill_memomessage), 604 },
+{ HP_POP(clif->skill_mapinfomessage), HP_POP2(HP_clif_skill_mapinfomessage), 606 },
+{ HP_POP(clif->skill_produce_mix_list), HP_POP2(HP_clif_skill_produce_mix_list), 608 },
+{ HP_POP(clif->cooking_list), HP_POP2(HP_clif_cooking_list), 610 },
+{ HP_POP(clif->autospell), HP_POP2(HP_clif_autospell), 612 },
+{ HP_POP(clif->combo_delay), HP_POP2(HP_clif_combo_delay), 614 },
+{ HP_POP(clif->status_change), HP_POP2(HP_clif_status_change), 616 },
+{ HP_POP(clif->insert_card), HP_POP2(HP_clif_insert_card), 618 },
+{ HP_POP(clif->inventorylist), HP_POP2(HP_clif_inventorylist), 620 },
+{ HP_POP(clif->equiplist), HP_POP2(HP_clif_equiplist), 622 },
+{ HP_POP(clif->cartlist), HP_POP2(HP_clif_cartlist), 624 },
+{ HP_POP(clif->favorite_item), HP_POP2(HP_clif_favorite_item), 626 },
+{ HP_POP(clif->clearcart), HP_POP2(HP_clif_clearcart), 628 },
+{ HP_POP(clif->item_identify_list), HP_POP2(HP_clif_item_identify_list), 630 },
+{ HP_POP(clif->item_identified), HP_POP2(HP_clif_item_identified), 632 },
+{ HP_POP(clif->item_repair_list), HP_POP2(HP_clif_item_repair_list), 634 },
+{ HP_POP(clif->item_repaireffect), HP_POP2(HP_clif_item_repaireffect), 636 },
+{ HP_POP(clif->item_damaged), HP_POP2(HP_clif_item_damaged), 638 },
+{ HP_POP(clif->item_refine_list), HP_POP2(HP_clif_item_refine_list), 640 },
+{ HP_POP(clif->item_skill), HP_POP2(HP_clif_item_skill), 642 },
+{ HP_POP(clif->mvp_item), HP_POP2(HP_clif_mvp_item), 644 },
+{ HP_POP(clif->mvp_exp), HP_POP2(HP_clif_mvp_exp), 646 },
+{ HP_POP(clif->mvp_noitem), HP_POP2(HP_clif_mvp_noitem), 648 },
+{ HP_POP(clif->changed_dir), HP_POP2(HP_clif_changed_dir), 650 },
+{ HP_POP(clif->charnameack), HP_POP2(HP_clif_charnameack), 652 },
+{ HP_POP(clif->monster_hp_bar), HP_POP2(HP_clif_monster_hp_bar), 654 },
+{ HP_POP(clif->hpmeter), HP_POP2(HP_clif_hpmeter), 656 },
+{ HP_POP(clif->hpmeter_single), HP_POP2(HP_clif_hpmeter_single), 658 },
+{ HP_POP(clif->hpmeter_sub), HP_POP2(HP_clif_hpmeter_sub), 660 },
+{ HP_POP(clif->upgrademessage), HP_POP2(HP_clif_upgrademessage), 662 },
+{ HP_POP(clif->get_weapon_view), HP_POP2(HP_clif_get_weapon_view), 664 },
+{ HP_POP(clif->gospel_info), HP_POP2(HP_clif_gospel_info), 666 },
+{ HP_POP(clif->feel_req), HP_POP2(HP_clif_feel_req), 668 },
+{ HP_POP(clif->starskill), HP_POP2(HP_clif_starskill), 670 },
+{ HP_POP(clif->feel_info), HP_POP2(HP_clif_feel_info), 672 },
+{ HP_POP(clif->hate_info), HP_POP2(HP_clif_hate_info), 674 },
+{ HP_POP(clif->mission_info), HP_POP2(HP_clif_mission_info), 676 },
+{ HP_POP(clif->feel_hate_reset), HP_POP2(HP_clif_feel_hate_reset), 678 },
+{ HP_POP(clif->partytickack), HP_POP2(HP_clif_partytickack), 680 },
+{ HP_POP(clif->equiptickack), HP_POP2(HP_clif_equiptickack), 682 },
+{ HP_POP(clif->viewequip_ack), HP_POP2(HP_clif_viewequip_ack), 684 },
+{ HP_POP(clif->viewequip_fail), HP_POP2(HP_clif_viewequip_fail), 686 },
+{ HP_POP(clif->equpcheckbox), HP_POP2(HP_clif_equpcheckbox), 688 },
+{ HP_POP(clif->displayexp), HP_POP2(HP_clif_displayexp), 690 },
+{ HP_POP(clif->font), HP_POP2(HP_clif_font), 692 },
+{ HP_POP(clif->progressbar), HP_POP2(HP_clif_progressbar), 694 },
+{ HP_POP(clif->progressbar_abort), HP_POP2(HP_clif_progressbar_abort), 696 },
+{ HP_POP(clif->showdigit), HP_POP2(HP_clif_showdigit), 698 },
+{ HP_POP(clif->elementalconverter_list), HP_POP2(HP_clif_elementalconverter_list), 700 },
+{ HP_POP(clif->spellbook_list), HP_POP2(HP_clif_spellbook_list), 702 },
+{ HP_POP(clif->magicdecoy_list), HP_POP2(HP_clif_magicdecoy_list), 704 },
+{ HP_POP(clif->poison_list), HP_POP2(HP_clif_poison_list), 706 },
+{ HP_POP(clif->autoshadowspell_list), HP_POP2(HP_clif_autoshadowspell_list), 708 },
+{ HP_POP(clif->skill_itemlistwindow), HP_POP2(HP_clif_skill_itemlistwindow), 710 },
+{ HP_POP(clif->sc_load), HP_POP2(HP_clif_sc_load), 712 },
+{ HP_POP(clif->sc_end), HP_POP2(HP_clif_sc_end), 714 },
+{ HP_POP(clif->initialstatus), HP_POP2(HP_clif_initialstatus), 716 },
+{ HP_POP(clif->cooldown_list), HP_POP2(HP_clif_cooldown_list), 718 },
+{ HP_POP(clif->updatestatus), HP_POP2(HP_clif_updatestatus), 720 },
+{ HP_POP(clif->changestatus), HP_POP2(HP_clif_changestatus), 722 },
+{ HP_POP(clif->statusupack), HP_POP2(HP_clif_statusupack), 724 },
+{ HP_POP(clif->movetoattack), HP_POP2(HP_clif_movetoattack), 726 },
+{ HP_POP(clif->solved_charname), HP_POP2(HP_clif_solved_charname), 728 },
+{ HP_POP(clif->charnameupdate), HP_POP2(HP_clif_charnameupdate), 730 },
+{ HP_POP(clif->delayquit), HP_POP2(HP_clif_delayquit), 732 },
+{ HP_POP(clif->getareachar_pc), HP_POP2(HP_clif_getareachar_pc), 734 },
+{ HP_POP(clif->disconnect_ack), HP_POP2(HP_clif_disconnect_ack), 736 },
+{ HP_POP(clif->PVPInfo), HP_POP2(HP_clif_PVPInfo), 738 },
+{ HP_POP(clif->blacksmith), HP_POP2(HP_clif_blacksmith), 740 },
+{ HP_POP(clif->alchemist), HP_POP2(HP_clif_alchemist), 742 },
+{ HP_POP(clif->taekwon), HP_POP2(HP_clif_taekwon), 744 },
+{ HP_POP(clif->ranking_pk), HP_POP2(HP_clif_ranking_pk), 746 },
+{ HP_POP(clif->quitsave), HP_POP2(HP_clif_quitsave), 748 },
+{ HP_POP(clif->misceffect), HP_POP2(HP_clif_misceffect), 750 },
+{ HP_POP(clif->changeoption), HP_POP2(HP_clif_changeoption), 752 },
+{ HP_POP(clif->changeoption2), HP_POP2(HP_clif_changeoption2), 754 },
+{ HP_POP(clif->emotion), HP_POP2(HP_clif_emotion), 756 },
+{ HP_POP(clif->talkiebox), HP_POP2(HP_clif_talkiebox), 758 },
+{ HP_POP(clif->wedding_effect), HP_POP2(HP_clif_wedding_effect), 760 },
+{ HP_POP(clif->divorced), HP_POP2(HP_clif_divorced), 762 },
+{ HP_POP(clif->callpartner), HP_POP2(HP_clif_callpartner), 764 },
+{ HP_POP(clif->skill_damage), HP_POP2(HP_clif_skill_damage), 766 },
+{ HP_POP(clif->skill_nodamage), HP_POP2(HP_clif_skill_nodamage), 768 },
+{ HP_POP(clif->skill_poseffect), HP_POP2(HP_clif_skill_poseffect), 770 },
+{ HP_POP(clif->skill_estimation), HP_POP2(HP_clif_skill_estimation), 772 },
+{ HP_POP(clif->skill_warppoint), HP_POP2(HP_clif_skill_warppoint), 774 },
+{ HP_POP(clif->skillcasting), HP_POP2(HP_clif_skillcasting), 776 },
+{ HP_POP(clif->produce_effect), HP_POP2(HP_clif_produce_effect), 778 },
+{ HP_POP(clif->devotion), HP_POP2(HP_clif_devotion), 780 },
+{ HP_POP(clif->spiritball), HP_POP2(HP_clif_spiritball), 782 },
+{ HP_POP(clif->spiritball_single), HP_POP2(HP_clif_spiritball_single), 784 },
+{ HP_POP(clif->bladestop), HP_POP2(HP_clif_bladestop), 786 },
+{ HP_POP(clif->mvp_effect), HP_POP2(HP_clif_mvp_effect), 788 },
+{ HP_POP(clif->heal), HP_POP2(HP_clif_heal), 790 },
+{ HP_POP(clif->resurrection), HP_POP2(HP_clif_resurrection), 792 },
+{ HP_POP(clif->refine), HP_POP2(HP_clif_refine), 794 },
+{ HP_POP(clif->weather), HP_POP2(HP_clif_weather), 796 },
+{ HP_POP(clif->specialeffect), HP_POP2(HP_clif_specialeffect), 798 },
+{ HP_POP(clif->specialeffect_single), HP_POP2(HP_clif_specialeffect_single), 800 },
+{ HP_POP(clif->specialeffect_value), HP_POP2(HP_clif_specialeffect_value), 802 },
+{ HP_POP(clif->millenniumshield), HP_POP2(HP_clif_millenniumshield), 804 },
+{ HP_POP(clif->charm), HP_POP2(HP_clif_charm), 806 },
+{ HP_POP(clif->charm_single), HP_POP2(HP_clif_charm_single), 808 },
+{ HP_POP(clif->snap), HP_POP2(HP_clif_snap), 810 },
+{ HP_POP(clif->weather_check), HP_POP2(HP_clif_weather_check), 812 },
+{ HP_POP(clif->playBGM), HP_POP2(HP_clif_playBGM), 814 },
+{ HP_POP(clif->soundeffect), HP_POP2(HP_clif_soundeffect), 816 },
+{ HP_POP(clif->soundeffectall), HP_POP2(HP_clif_soundeffectall), 818 },
+{ HP_POP(clif->GlobalMessage), HP_POP2(HP_clif_GlobalMessage), 820 },
+{ HP_POP(clif->createchat), HP_POP2(HP_clif_createchat), 822 },
+{ HP_POP(clif->dispchat), HP_POP2(HP_clif_dispchat), 824 },
+{ HP_POP(clif->joinchatfail), HP_POP2(HP_clif_joinchatfail), 826 },
+{ HP_POP(clif->joinchatok), HP_POP2(HP_clif_joinchatok), 828 },
+{ HP_POP(clif->addchat), HP_POP2(HP_clif_addchat), 830 },
+{ HP_POP(clif->changechatowner), HP_POP2(HP_clif_changechatowner), 832 },
+{ HP_POP(clif->clearchat), HP_POP2(HP_clif_clearchat), 834 },
+{ HP_POP(clif->leavechat), HP_POP2(HP_clif_leavechat), 836 },
+{ HP_POP(clif->changechatstatus), HP_POP2(HP_clif_changechatstatus), 838 },
+{ HP_POP(clif->wis_message), HP_POP2(HP_clif_wis_message), 840 },
+{ HP_POP(clif->wis_end), HP_POP2(HP_clif_wis_end), 842 },
+{ HP_POP(clif->disp_onlyself), HP_POP2(HP_clif_disp_onlyself), 844 },
+{ HP_POP(clif->disp_message), HP_POP2(HP_clif_disp_message), 846 },
+{ HP_POP(clif->broadcast), HP_POP2(HP_clif_broadcast), 848 },
+{ HP_POP(clif->broadcast2), HP_POP2(HP_clif_broadcast2), 850 },
+{ HP_POP(clif->messagecolor), HP_POP2(HP_clif_messagecolor), 852 },
+{ HP_POP(clif->disp_overhead), HP_POP2(HP_clif_disp_overhead), 854 },
+{ HP_POP(clif->msg), HP_POP2(HP_clif_msg), 856 },
+{ HP_POP(clif->msg_value), HP_POP2(HP_clif_msg_value), 858 },
+{ HP_POP(clif->msg_skill), HP_POP2(HP_clif_msg_skill), 860 },
+{ HP_POP(clif->msgtable), HP_POP2(HP_clif_msgtable), 862 },
+{ HP_POP(clif->msgtable_num), HP_POP2(HP_clif_msgtable_num), 864 },
+{ HP_POP(clif->message), HP_POP2(HP_clif_message), 866 },
+{ HP_POP(clif->messageln), HP_POP2(HP_clif_messageln), 868 },
+{ HP_POP(clif->colormes), HP_POP2(HP_clif_colormes), 870 },
+{ HP_POP(clif->process_message), HP_POP2(HP_clif_process_message), 872 },
+{ HP_POP(clif->wisexin), HP_POP2(HP_clif_wisexin), 874 },
+{ HP_POP(clif->wisall), HP_POP2(HP_clif_wisall), 876 },
+{ HP_POP(clif->PMIgnoreList), HP_POP2(HP_clif_PMIgnoreList), 878 },
+{ HP_POP(clif->traderequest), HP_POP2(HP_clif_traderequest), 880 },
+{ HP_POP(clif->tradestart), HP_POP2(HP_clif_tradestart), 882 },
+{ HP_POP(clif->tradeadditem), HP_POP2(HP_clif_tradeadditem), 884 },
+{ HP_POP(clif->tradeitemok), HP_POP2(HP_clif_tradeitemok), 886 },
+{ HP_POP(clif->tradedeal_lock), HP_POP2(HP_clif_tradedeal_lock), 888 },
+{ HP_POP(clif->tradecancelled), HP_POP2(HP_clif_tradecancelled), 890 },
+{ HP_POP(clif->tradecompleted), HP_POP2(HP_clif_tradecompleted), 892 },
+{ HP_POP(clif->tradeundo), HP_POP2(HP_clif_tradeundo), 894 },
+{ HP_POP(clif->openvendingreq), HP_POP2(HP_clif_openvendingreq), 896 },
+{ HP_POP(clif->showvendingboard), HP_POP2(HP_clif_showvendingboard), 898 },
+{ HP_POP(clif->closevendingboard), HP_POP2(HP_clif_closevendingboard), 900 },
+{ HP_POP(clif->vendinglist), HP_POP2(HP_clif_vendinglist), 902 },
+{ HP_POP(clif->buyvending), HP_POP2(HP_clif_buyvending), 904 },
+{ HP_POP(clif->openvending), HP_POP2(HP_clif_openvending), 906 },
+{ HP_POP(clif->vendingreport), HP_POP2(HP_clif_vendingreport), 908 },
+{ HP_POP(clif->storagelist), HP_POP2(HP_clif_storagelist), 910 },
+{ HP_POP(clif->updatestorageamount), HP_POP2(HP_clif_updatestorageamount), 912 },
+{ HP_POP(clif->storageitemadded), HP_POP2(HP_clif_storageitemadded), 914 },
+{ HP_POP(clif->storageitemremoved), HP_POP2(HP_clif_storageitemremoved), 916 },
+{ HP_POP(clif->storageclose), HP_POP2(HP_clif_storageclose), 918 },
+{ HP_POP(clif->skillinfoblock), HP_POP2(HP_clif_skillinfoblock), 920 },
+{ HP_POP(clif->skillup), HP_POP2(HP_clif_skillup), 922 },
+{ HP_POP(clif->skillinfo), HP_POP2(HP_clif_skillinfo), 924 },
+{ HP_POP(clif->addskill), HP_POP2(HP_clif_addskill), 926 },
+{ HP_POP(clif->deleteskill), HP_POP2(HP_clif_deleteskill), 928 },
+{ HP_POP(clif->party_created), HP_POP2(HP_clif_party_created), 930 },
+{ HP_POP(clif->party_member_info), HP_POP2(HP_clif_party_member_info), 932 },
+{ HP_POP(clif->party_info), HP_POP2(HP_clif_party_info), 934 },
+{ HP_POP(clif->party_invite), HP_POP2(HP_clif_party_invite), 936 },
+{ HP_POP(clif->party_inviteack), HP_POP2(HP_clif_party_inviteack), 938 },
+{ HP_POP(clif->party_option), HP_POP2(HP_clif_party_option), 940 },
+{ HP_POP(clif->party_withdraw), HP_POP2(HP_clif_party_withdraw), 942 },
+{ HP_POP(clif->party_message), HP_POP2(HP_clif_party_message), 944 },
+{ HP_POP(clif->party_xy), HP_POP2(HP_clif_party_xy), 946 },
+{ HP_POP(clif->party_xy_single), HP_POP2(HP_clif_party_xy_single), 948 },
+{ HP_POP(clif->party_hp), HP_POP2(HP_clif_party_hp), 950 },
+{ HP_POP(clif->party_xy_remove), HP_POP2(HP_clif_party_xy_remove), 952 },
+{ HP_POP(clif->party_show_picker), HP_POP2(HP_clif_party_show_picker), 954 },
+{ HP_POP(clif->partyinvitationstate), HP_POP2(HP_clif_partyinvitationstate), 956 },
+{ HP_POP(clif->guild_created), HP_POP2(HP_clif_guild_created), 958 },
+{ HP_POP(clif->guild_belonginfo), HP_POP2(HP_clif_guild_belonginfo), 960 },
+{ HP_POP(clif->guild_masterormember), HP_POP2(HP_clif_guild_masterormember), 962 },
+{ HP_POP(clif->guild_basicinfo), HP_POP2(HP_clif_guild_basicinfo), 964 },
+{ HP_POP(clif->guild_allianceinfo), HP_POP2(HP_clif_guild_allianceinfo), 966 },
+{ HP_POP(clif->guild_memberlist), HP_POP2(HP_clif_guild_memberlist), 968 },
+{ HP_POP(clif->guild_skillinfo), HP_POP2(HP_clif_guild_skillinfo), 970 },
+{ HP_POP(clif->guild_send_onlineinfo), HP_POP2(HP_clif_guild_send_onlineinfo), 972 },
+{ HP_POP(clif->guild_memberlogin_notice), HP_POP2(HP_clif_guild_memberlogin_notice), 974 },
+{ HP_POP(clif->guild_invite), HP_POP2(HP_clif_guild_invite), 976 },
+{ HP_POP(clif->guild_inviteack), HP_POP2(HP_clif_guild_inviteack), 978 },
+{ HP_POP(clif->guild_leave), HP_POP2(HP_clif_guild_leave), 980 },
+{ HP_POP(clif->guild_expulsion), HP_POP2(HP_clif_guild_expulsion), 982 },
+{ HP_POP(clif->guild_positionchanged), HP_POP2(HP_clif_guild_positionchanged), 984 },
+{ HP_POP(clif->guild_memberpositionchanged), HP_POP2(HP_clif_guild_memberpositionchanged), 986 },
+{ HP_POP(clif->guild_emblem), HP_POP2(HP_clif_guild_emblem), 988 },
+{ HP_POP(clif->guild_emblem_area), HP_POP2(HP_clif_guild_emblem_area), 990 },
+{ HP_POP(clif->guild_notice), HP_POP2(HP_clif_guild_notice), 992 },
+{ HP_POP(clif->guild_message), HP_POP2(HP_clif_guild_message), 994 },
+{ HP_POP(clif->guild_skillup), HP_POP2(HP_clif_guild_skillup), 996 },
+{ HP_POP(clif->guild_reqalliance), HP_POP2(HP_clif_guild_reqalliance), 998 },
+{ HP_POP(clif->guild_allianceack), HP_POP2(HP_clif_guild_allianceack), 1000 },
+{ HP_POP(clif->guild_delalliance), HP_POP2(HP_clif_guild_delalliance), 1002 },
+{ HP_POP(clif->guild_oppositionack), HP_POP2(HP_clif_guild_oppositionack), 1004 },
+{ HP_POP(clif->guild_broken), HP_POP2(HP_clif_guild_broken), 1006 },
+{ HP_POP(clif->guild_xy), HP_POP2(HP_clif_guild_xy), 1008 },
+{ HP_POP(clif->guild_xy_single), HP_POP2(HP_clif_guild_xy_single), 1010 },
+{ HP_POP(clif->guild_xy_remove), HP_POP2(HP_clif_guild_xy_remove), 1012 },
+{ HP_POP(clif->guild_positionnamelist), HP_POP2(HP_clif_guild_positionnamelist), 1014 },
+{ HP_POP(clif->guild_positioninfolist), HP_POP2(HP_clif_guild_positioninfolist), 1016 },
+{ HP_POP(clif->guild_expulsionlist), HP_POP2(HP_clif_guild_expulsionlist), 1018 },
+{ HP_POP(clif->validate_emblem), HP_POP2(HP_clif_validate_emblem), 1020 },
+{ HP_POP(clif->bg_hp), HP_POP2(HP_clif_bg_hp), 1022 },
+{ HP_POP(clif->bg_xy), HP_POP2(HP_clif_bg_xy), 1024 },
+{ HP_POP(clif->bg_xy_remove), HP_POP2(HP_clif_bg_xy_remove), 1026 },
+{ HP_POP(clif->bg_message), HP_POP2(HP_clif_bg_message), 1028 },
+{ HP_POP(clif->bg_updatescore), HP_POP2(HP_clif_bg_updatescore), 1030 },
+{ HP_POP(clif->bg_updatescore_single), HP_POP2(HP_clif_bg_updatescore_single), 1032 },
+{ HP_POP(clif->sendbgemblem_area), HP_POP2(HP_clif_sendbgemblem_area), 1034 },
+{ HP_POP(clif->sendbgemblem_single), HP_POP2(HP_clif_sendbgemblem_single), 1036 },
+{ HP_POP(clif->instance), HP_POP2(HP_clif_instance), 1038 },
+{ HP_POP(clif->instance_join), HP_POP2(HP_clif_instance_join), 1040 },
+{ HP_POP(clif->instance_leave), HP_POP2(HP_clif_instance_leave), 1042 },
+{ HP_POP(clif->catch_process), HP_POP2(HP_clif_catch_process), 1044 },
+{ HP_POP(clif->pet_roulette), HP_POP2(HP_clif_pet_roulette), 1046 },
+{ HP_POP(clif->sendegg), HP_POP2(HP_clif_sendegg), 1048 },
+{ HP_POP(clif->send_petstatus), HP_POP2(HP_clif_send_petstatus), 1050 },
+{ HP_POP(clif->send_petdata), HP_POP2(HP_clif_send_petdata), 1052 },
+{ HP_POP(clif->pet_emotion), HP_POP2(HP_clif_pet_emotion), 1054 },
+{ HP_POP(clif->pet_food), HP_POP2(HP_clif_pet_food), 1056 },
+{ HP_POP(clif->friendslist_toggle_sub), HP_POP2(HP_clif_friendslist_toggle_sub), 1058 },
+{ HP_POP(clif->friendslist_send), HP_POP2(HP_clif_friendslist_send), 1060 },
+{ HP_POP(clif->friendslist_reqack), HP_POP2(HP_clif_friendslist_reqack), 1062 },
+{ HP_POP(clif->friendslist_toggle), HP_POP2(HP_clif_friendslist_toggle), 1064 },
+{ HP_POP(clif->friendlist_req), HP_POP2(HP_clif_friendlist_req), 1066 },
+{ HP_POP(clif->GM_kickack), HP_POP2(HP_clif_GM_kickack), 1068 },
+{ HP_POP(clif->GM_kick), HP_POP2(HP_clif_GM_kick), 1070 },
+{ HP_POP(clif->manner_message), HP_POP2(HP_clif_manner_message), 1072 },
+{ HP_POP(clif->GM_silence), HP_POP2(HP_clif_GM_silence), 1074 },
+{ HP_POP(clif->account_name), HP_POP2(HP_clif_account_name), 1076 },
+{ HP_POP(clif->check), HP_POP2(HP_clif_check), 1078 },
+{ HP_POP(clif->hominfo), HP_POP2(HP_clif_hominfo), 1080 },
+{ HP_POP(clif->homskillinfoblock), HP_POP2(HP_clif_homskillinfoblock), 1082 },
+{ HP_POP(clif->homskillup), HP_POP2(HP_clif_homskillup), 1084 },
+{ HP_POP(clif->hom_food), HP_POP2(HP_clif_hom_food), 1086 },
+{ HP_POP(clif->send_homdata), HP_POP2(HP_clif_send_homdata), 1088 },
+{ HP_POP(clif->quest_send_list), HP_POP2(HP_clif_quest_send_list), 1090 },
+{ HP_POP(clif->quest_send_mission), HP_POP2(HP_clif_quest_send_mission), 1092 },
+{ HP_POP(clif->quest_add), HP_POP2(HP_clif_quest_add), 1094 },
+{ HP_POP(clif->quest_delete), HP_POP2(HP_clif_quest_delete), 1096 },
+{ HP_POP(clif->quest_update_status), HP_POP2(HP_clif_quest_update_status), 1098 },
+{ HP_POP(clif->quest_update_objective), HP_POP2(HP_clif_quest_update_objective), 1100 },
+{ HP_POP(clif->quest_show_event), HP_POP2(HP_clif_quest_show_event), 1102 },
+{ HP_POP(clif->mail_window), HP_POP2(HP_clif_mail_window), 1104 },
+{ HP_POP(clif->mail_read), HP_POP2(HP_clif_mail_read), 1106 },
+{ HP_POP(clif->mail_delete), HP_POP2(HP_clif_mail_delete), 1108 },
+{ HP_POP(clif->mail_return), HP_POP2(HP_clif_mail_return), 1110 },
+{ HP_POP(clif->mail_send), HP_POP2(HP_clif_mail_send), 1112 },
+{ HP_POP(clif->mail_new), HP_POP2(HP_clif_mail_new), 1114 },
+{ HP_POP(clif->mail_refreshinbox), HP_POP2(HP_clif_mail_refreshinbox), 1116 },
+{ HP_POP(clif->mail_getattachment), HP_POP2(HP_clif_mail_getattachment), 1118 },
+{ HP_POP(clif->mail_setattachment), HP_POP2(HP_clif_mail_setattachment), 1120 },
+{ HP_POP(clif->auction_openwindow), HP_POP2(HP_clif_auction_openwindow), 1122 },
+{ HP_POP(clif->auction_results), HP_POP2(HP_clif_auction_results), 1124 },
+{ HP_POP(clif->auction_message), HP_POP2(HP_clif_auction_message), 1126 },
+{ HP_POP(clif->auction_close), HP_POP2(HP_clif_auction_close), 1128 },
+{ HP_POP(clif->auction_setitem), HP_POP2(HP_clif_auction_setitem), 1130 },
+{ HP_POP(clif->mercenary_info), HP_POP2(HP_clif_mercenary_info), 1132 },
+{ HP_POP(clif->mercenary_skillblock), HP_POP2(HP_clif_mercenary_skillblock), 1134 },
+{ HP_POP(clif->mercenary_message), HP_POP2(HP_clif_mercenary_message), 1136 },
+{ HP_POP(clif->mercenary_updatestatus), HP_POP2(HP_clif_mercenary_updatestatus), 1138 },
+{ HP_POP(clif->rental_time), HP_POP2(HP_clif_rental_time), 1140 },
+{ HP_POP(clif->rental_expired), HP_POP2(HP_clif_rental_expired), 1142 },
+{ HP_POP(clif->PartyBookingRegisterAck), HP_POP2(HP_clif_PartyBookingRegisterAck), 1144 },
+{ HP_POP(clif->PartyBookingDeleteAck), HP_POP2(HP_clif_PartyBookingDeleteAck), 1146 },
+{ HP_POP(clif->PartyBookingSearchAck), HP_POP2(HP_clif_PartyBookingSearchAck), 1148 },
+{ HP_POP(clif->PartyBookingUpdateNotify), HP_POP2(HP_clif_PartyBookingUpdateNotify), 1150 },
+{ HP_POP(clif->PartyBookingDeleteNotify), HP_POP2(HP_clif_PartyBookingDeleteNotify), 1152 },
+{ HP_POP(clif->PartyBookingInsertNotify), HP_POP2(HP_clif_PartyBookingInsertNotify), 1154 },
+{ HP_POP(clif->PartyRecruitRegisterAck), HP_POP2(HP_clif_PartyRecruitRegisterAck), 1156 },
+{ HP_POP(clif->PartyRecruitDeleteAck), HP_POP2(HP_clif_PartyRecruitDeleteAck), 1158 },
+{ HP_POP(clif->PartyRecruitSearchAck), HP_POP2(HP_clif_PartyRecruitSearchAck), 1160 },
+{ HP_POP(clif->PartyRecruitUpdateNotify), HP_POP2(HP_clif_PartyRecruitUpdateNotify), 1162 },
+{ HP_POP(clif->PartyRecruitDeleteNotify), HP_POP2(HP_clif_PartyRecruitDeleteNotify), 1164 },
+{ HP_POP(clif->PartyRecruitInsertNotify), HP_POP2(HP_clif_PartyRecruitInsertNotify), 1166 },
+{ HP_POP(clif->PartyBookingVolunteerInfo), HP_POP2(HP_clif_PartyBookingVolunteerInfo), 1168 },
+{ HP_POP(clif->PartyBookingRefuseVolunteer), HP_POP2(HP_clif_PartyBookingRefuseVolunteer), 1170 },
+{ HP_POP(clif->PartyBookingCancelVolunteer), HP_POP2(HP_clif_PartyBookingCancelVolunteer), 1172 },
+{ HP_POP(clif->PartyBookingAddFilteringList), HP_POP2(HP_clif_PartyBookingAddFilteringList), 1174 },
+{ HP_POP(clif->PartyBookingSubFilteringList), HP_POP2(HP_clif_PartyBookingSubFilteringList), 1176 },
+{ HP_POP(clif->buyingstore_open), HP_POP2(HP_clif_buyingstore_open), 1178 },
+{ HP_POP(clif->buyingstore_open_failed), HP_POP2(HP_clif_buyingstore_open_failed), 1180 },
+{ HP_POP(clif->buyingstore_myitemlist), HP_POP2(HP_clif_buyingstore_myitemlist), 1182 },
+{ HP_POP(clif->buyingstore_entry), HP_POP2(HP_clif_buyingstore_entry), 1184 },
+{ HP_POP(clif->buyingstore_entry_single), HP_POP2(HP_clif_buyingstore_entry_single), 1186 },
+{ HP_POP(clif->buyingstore_disappear_entry), HP_POP2(HP_clif_buyingstore_disappear_entry), 1188 },
+{ HP_POP(clif->buyingstore_disappear_entry_single), HP_POP2(HP_clif_buyingstore_disappear_entry_single), 1190 },
+{ HP_POP(clif->buyingstore_itemlist), HP_POP2(HP_clif_buyingstore_itemlist), 1192 },
+{ HP_POP(clif->buyingstore_trade_failed_buyer), HP_POP2(HP_clif_buyingstore_trade_failed_buyer), 1194 },
+{ HP_POP(clif->buyingstore_update_item), HP_POP2(HP_clif_buyingstore_update_item), 1196 },
+{ HP_POP(clif->buyingstore_delete_item), HP_POP2(HP_clif_buyingstore_delete_item), 1198 },
+{ HP_POP(clif->buyingstore_trade_failed_seller), HP_POP2(HP_clif_buyingstore_trade_failed_seller), 1200 },
+{ HP_POP(clif->search_store_info_ack), HP_POP2(HP_clif_search_store_info_ack), 1202 },
+{ HP_POP(clif->search_store_info_failed), HP_POP2(HP_clif_search_store_info_failed), 1204 },
+{ HP_POP(clif->open_search_store_info), HP_POP2(HP_clif_open_search_store_info), 1206 },
+{ HP_POP(clif->search_store_info_click_ack), HP_POP2(HP_clif_search_store_info_click_ack), 1208 },
+{ HP_POP(clif->elemental_info), HP_POP2(HP_clif_elemental_info), 1210 },
+{ HP_POP(clif->elemental_updatestatus), HP_POP2(HP_clif_elemental_updatestatus), 1212 },
+{ HP_POP(clif->bgqueue_ack), HP_POP2(HP_clif_bgqueue_ack), 1214 },
+{ HP_POP(clif->bgqueue_notice_delete), HP_POP2(HP_clif_bgqueue_notice_delete), 1216 },
+{ HP_POP(clif->bgqueue_update_info), HP_POP2(HP_clif_bgqueue_update_info), 1218 },
+{ HP_POP(clif->bgqueue_joined), HP_POP2(HP_clif_bgqueue_joined), 1220 },
+{ HP_POP(clif->bgqueue_pcleft), HP_POP2(HP_clif_bgqueue_pcleft), 1222 },
+{ HP_POP(clif->bgqueue_battlebegins), HP_POP2(HP_clif_bgqueue_battlebegins), 1224 },
+{ HP_POP(clif->adopt_reply), HP_POP2(HP_clif_adopt_reply), 1226 },
+{ HP_POP(clif->adopt_request), HP_POP2(HP_clif_adopt_request), 1228 },
+{ HP_POP(clif->readbook), HP_POP2(HP_clif_readbook), 1230 },
+{ HP_POP(clif->notify_time), HP_POP2(HP_clif_notify_time), 1232 },
+{ HP_POP(clif->user_count), HP_POP2(HP_clif_user_count), 1234 },
+{ HP_POP(clif->noask_sub), HP_POP2(HP_clif_noask_sub), 1236 },
+{ HP_POP(clif->bc_ready), HP_POP2(HP_clif_bc_ready), 1238 },
+{ HP_POP(clif->undisguise_timer), HP_POP2(HP_clif_undisguise_timer), 1240 },
+{ HP_POP(clif->chsys_create), HP_POP2(HP_clif_chsys_create), 1242 },
+{ HP_POP(clif->chsys_msg), HP_POP2(HP_clif_chsys_msg), 1244 },
+{ HP_POP(clif->chsys_msg2), HP_POP2(HP_clif_chsys_msg2), 1246 },
+{ HP_POP(clif->chsys_send), HP_POP2(HP_clif_chsys_send), 1248 },
+{ HP_POP(clif->chsys_join), HP_POP2(HP_clif_chsys_join), 1250 },
+{ HP_POP(clif->chsys_left), HP_POP2(HP_clif_chsys_left), 1252 },
+{ HP_POP(clif->chsys_delete), HP_POP2(HP_clif_chsys_delete), 1254 },
+{ HP_POP(clif->chsys_mjoin), HP_POP2(HP_clif_chsys_mjoin), 1256 },
+{ HP_POP(clif->chsys_quit), HP_POP2(HP_clif_chsys_quit), 1258 },
+{ HP_POP(clif->chsys_quitg), HP_POP2(HP_clif_chsys_quitg), 1260 },
+{ HP_POP(clif->chsys_gjoin), HP_POP2(HP_clif_chsys_gjoin), 1262 },
+{ HP_POP(clif->chsys_gleave), HP_POP2(HP_clif_chsys_gleave), 1264 },
+{ HP_POP(clif->pWantToConnection), HP_POP2(HP_clif_pWantToConnection), 1266 },
+{ HP_POP(clif->pLoadEndAck), HP_POP2(HP_clif_pLoadEndAck), 1268 },
+{ HP_POP(clif->pTickSend), HP_POP2(HP_clif_pTickSend), 1270 },
+{ HP_POP(clif->pHotkey), HP_POP2(HP_clif_pHotkey), 1272 },
+{ HP_POP(clif->pProgressbar), HP_POP2(HP_clif_pProgressbar), 1274 },
+{ HP_POP(clif->pWalkToXY), HP_POP2(HP_clif_pWalkToXY), 1276 },
+{ HP_POP(clif->pQuitGame), HP_POP2(HP_clif_pQuitGame), 1278 },
+{ HP_POP(clif->pGetCharNameRequest), HP_POP2(HP_clif_pGetCharNameRequest), 1280 },
+{ HP_POP(clif->pGlobalMessage), HP_POP2(HP_clif_pGlobalMessage), 1282 },
+{ HP_POP(clif->pMapMove), HP_POP2(HP_clif_pMapMove), 1284 },
+{ HP_POP(clif->pChangeDir), HP_POP2(HP_clif_pChangeDir), 1286 },
+{ HP_POP(clif->pEmotion), HP_POP2(HP_clif_pEmotion), 1288 },
+{ HP_POP(clif->pHowManyConnections), HP_POP2(HP_clif_pHowManyConnections), 1290 },
+{ HP_POP(clif->pActionRequest), HP_POP2(HP_clif_pActionRequest), 1292 },
+{ HP_POP(clif->pActionRequest_sub), HP_POP2(HP_clif_pActionRequest_sub), 1294 },
+{ HP_POP(clif->pRestart), HP_POP2(HP_clif_pRestart), 1296 },
+{ HP_POP(clif->pWisMessage), HP_POP2(HP_clif_pWisMessage), 1298 },
+{ HP_POP(clif->pBroadcast), HP_POP2(HP_clif_pBroadcast), 1300 },
+{ HP_POP(clif->pTakeItem), HP_POP2(HP_clif_pTakeItem), 1302 },
+{ HP_POP(clif->pDropItem), HP_POP2(HP_clif_pDropItem), 1304 },
+{ HP_POP(clif->pUseItem), HP_POP2(HP_clif_pUseItem), 1306 },
+{ HP_POP(clif->pEquipItem), HP_POP2(HP_clif_pEquipItem), 1308 },
+{ HP_POP(clif->pUnequipItem), HP_POP2(HP_clif_pUnequipItem), 1310 },
+{ HP_POP(clif->pNpcClicked), HP_POP2(HP_clif_pNpcClicked), 1312 },
+{ HP_POP(clif->pNpcBuySellSelected), HP_POP2(HP_clif_pNpcBuySellSelected), 1314 },
+{ HP_POP(clif->pNpcBuyListSend), HP_POP2(HP_clif_pNpcBuyListSend), 1316 },
+{ HP_POP(clif->pNpcSellListSend), HP_POP2(HP_clif_pNpcSellListSend), 1318 },
+{ HP_POP(clif->pCreateChatRoom), HP_POP2(HP_clif_pCreateChatRoom), 1320 },
+{ HP_POP(clif->pChatAddMember), HP_POP2(HP_clif_pChatAddMember), 1322 },
+{ HP_POP(clif->pChatRoomStatusChange), HP_POP2(HP_clif_pChatRoomStatusChange), 1324 },
+{ HP_POP(clif->pChangeChatOwner), HP_POP2(HP_clif_pChangeChatOwner), 1326 },
+{ HP_POP(clif->pKickFromChat), HP_POP2(HP_clif_pKickFromChat), 1328 },
+{ HP_POP(clif->pChatLeave), HP_POP2(HP_clif_pChatLeave), 1330 },
+{ HP_POP(clif->pTradeRequest), HP_POP2(HP_clif_pTradeRequest), 1332 },
+{ HP_POP(clif->chann_config_read), HP_POP2(HP_clif_chann_config_read), 1334 },
+{ HP_POP(clif->pTradeAck), HP_POP2(HP_clif_pTradeAck), 1336 },
+{ HP_POP(clif->pTradeAddItem), HP_POP2(HP_clif_pTradeAddItem), 1338 },
+{ HP_POP(clif->pTradeOk), HP_POP2(HP_clif_pTradeOk), 1340 },
+{ HP_POP(clif->pTradeCancel), HP_POP2(HP_clif_pTradeCancel), 1342 },
+{ HP_POP(clif->pTradeCommit), HP_POP2(HP_clif_pTradeCommit), 1344 },
+{ HP_POP(clif->pStopAttack), HP_POP2(HP_clif_pStopAttack), 1346 },
+{ HP_POP(clif->pPutItemToCart), HP_POP2(HP_clif_pPutItemToCart), 1348 },
+{ HP_POP(clif->pGetItemFromCart), HP_POP2(HP_clif_pGetItemFromCart), 1350 },
+{ HP_POP(clif->pRemoveOption), HP_POP2(HP_clif_pRemoveOption), 1352 },
+{ HP_POP(clif->pChangeCart), HP_POP2(HP_clif_pChangeCart), 1354 },
+{ HP_POP(clif->pStatusUp), HP_POP2(HP_clif_pStatusUp), 1356 },
+{ HP_POP(clif->pSkillUp), HP_POP2(HP_clif_pSkillUp), 1358 },
+{ HP_POP(clif->pUseSkillToId), HP_POP2(HP_clif_pUseSkillToId), 1360 },
+{ HP_POP(clif->pUseSkillToId_homun), HP_POP2(HP_clif_pUseSkillToId_homun), 1362 },
+{ HP_POP(clif->pUseSkillToId_mercenary), HP_POP2(HP_clif_pUseSkillToId_mercenary), 1364 },
+{ HP_POP(clif->pUseSkillToPos), HP_POP2(HP_clif_pUseSkillToPos), 1366 },
+{ HP_POP(clif->pUseSkillToPosSub), HP_POP2(HP_clif_pUseSkillToPosSub), 1368 },
+{ HP_POP(clif->pUseSkillToPos_homun), HP_POP2(HP_clif_pUseSkillToPos_homun), 1370 },
+{ HP_POP(clif->pUseSkillToPos_mercenary), HP_POP2(HP_clif_pUseSkillToPos_mercenary), 1372 },
+{ HP_POP(clif->pUseSkillToPosMoreInfo), HP_POP2(HP_clif_pUseSkillToPosMoreInfo), 1374 },
+{ HP_POP(clif->pUseSkillMap), HP_POP2(HP_clif_pUseSkillMap), 1376 },
+{ HP_POP(clif->pRequestMemo), HP_POP2(HP_clif_pRequestMemo), 1378 },
+{ HP_POP(clif->pProduceMix), HP_POP2(HP_clif_pProduceMix), 1380 },
+{ HP_POP(clif->pCooking), HP_POP2(HP_clif_pCooking), 1382 },
+{ HP_POP(clif->pRepairItem), HP_POP2(HP_clif_pRepairItem), 1384 },
+{ HP_POP(clif->pWeaponRefine), HP_POP2(HP_clif_pWeaponRefine), 1386 },
+{ HP_POP(clif->pNpcSelectMenu), HP_POP2(HP_clif_pNpcSelectMenu), 1388 },
+{ HP_POP(clif->pNpcNextClicked), HP_POP2(HP_clif_pNpcNextClicked), 1390 },
+{ HP_POP(clif->pNpcAmountInput), HP_POP2(HP_clif_pNpcAmountInput), 1392 },
+{ HP_POP(clif->pNpcStringInput), HP_POP2(HP_clif_pNpcStringInput), 1394 },
+{ HP_POP(clif->pNpcCloseClicked), HP_POP2(HP_clif_pNpcCloseClicked), 1396 },
+{ HP_POP(clif->pItemIdentify), HP_POP2(HP_clif_pItemIdentify), 1398 },
+{ HP_POP(clif->pSelectArrow), HP_POP2(HP_clif_pSelectArrow), 1400 },
+{ HP_POP(clif->pAutoSpell), HP_POP2(HP_clif_pAutoSpell), 1402 },
+{ HP_POP(clif->pUseCard), HP_POP2(HP_clif_pUseCard), 1404 },
+{ HP_POP(clif->pInsertCard), HP_POP2(HP_clif_pInsertCard), 1406 },
+{ HP_POP(clif->pSolveCharName), HP_POP2(HP_clif_pSolveCharName), 1408 },
+{ HP_POP(clif->pResetChar), HP_POP2(HP_clif_pResetChar), 1410 },
+{ HP_POP(clif->pLocalBroadcast), HP_POP2(HP_clif_pLocalBroadcast), 1412 },
+{ HP_POP(clif->pMoveToKafra), HP_POP2(HP_clif_pMoveToKafra), 1414 },
+{ HP_POP(clif->pMoveFromKafra), HP_POP2(HP_clif_pMoveFromKafra), 1416 },
+{ HP_POP(clif->pMoveToKafraFromCart), HP_POP2(HP_clif_pMoveToKafraFromCart), 1418 },
+{ HP_POP(clif->pMoveFromKafraToCart), HP_POP2(HP_clif_pMoveFromKafraToCart), 1420 },
+{ HP_POP(clif->pCloseKafra), HP_POP2(HP_clif_pCloseKafra), 1422 },
+{ HP_POP(clif->pStoragePassword), HP_POP2(HP_clif_pStoragePassword), 1424 },
+{ HP_POP(clif->pCreateParty), HP_POP2(HP_clif_pCreateParty), 1426 },
+{ HP_POP(clif->pCreateParty2), HP_POP2(HP_clif_pCreateParty2), 1428 },
+{ HP_POP(clif->pPartyInvite), HP_POP2(HP_clif_pPartyInvite), 1430 },
+{ HP_POP(clif->pPartyInvite2), HP_POP2(HP_clif_pPartyInvite2), 1432 },
+{ HP_POP(clif->pReplyPartyInvite), HP_POP2(HP_clif_pReplyPartyInvite), 1434 },
+{ HP_POP(clif->pReplyPartyInvite2), HP_POP2(HP_clif_pReplyPartyInvite2), 1436 },
+{ HP_POP(clif->pLeaveParty), HP_POP2(HP_clif_pLeaveParty), 1438 },
+{ HP_POP(clif->pRemovePartyMember), HP_POP2(HP_clif_pRemovePartyMember), 1440 },
+{ HP_POP(clif->pPartyChangeOption), HP_POP2(HP_clif_pPartyChangeOption), 1442 },
+{ HP_POP(clif->pPartyMessage), HP_POP2(HP_clif_pPartyMessage), 1444 },
+{ HP_POP(clif->pPartyChangeLeader), HP_POP2(HP_clif_pPartyChangeLeader), 1446 },
+{ HP_POP(clif->pPartyBookingRegisterReq), HP_POP2(HP_clif_pPartyBookingRegisterReq), 1448 },
+{ HP_POP(clif->pPartyBookingSearchReq), HP_POP2(HP_clif_pPartyBookingSearchReq), 1450 },
+{ HP_POP(clif->pPartyBookingDeleteReq), HP_POP2(HP_clif_pPartyBookingDeleteReq), 1452 },
+{ HP_POP(clif->pPartyBookingUpdateReq), HP_POP2(HP_clif_pPartyBookingUpdateReq), 1454 },
+{ HP_POP(clif->pPartyRecruitRegisterReq), HP_POP2(HP_clif_pPartyRecruitRegisterReq), 1456 },
+{ HP_POP(clif->pPartyRecruitSearchReq), HP_POP2(HP_clif_pPartyRecruitSearchReq), 1458 },
+{ HP_POP(clif->pPartyRecruitDeleteReq), HP_POP2(HP_clif_pPartyRecruitDeleteReq), 1460 },
+{ HP_POP(clif->pPartyRecruitUpdateReq), HP_POP2(HP_clif_pPartyRecruitUpdateReq), 1462 },
+{ HP_POP(clif->pCloseVending), HP_POP2(HP_clif_pCloseVending), 1464 },
+{ HP_POP(clif->pVendingListReq), HP_POP2(HP_clif_pVendingListReq), 1466 },
+{ HP_POP(clif->pPurchaseReq), HP_POP2(HP_clif_pPurchaseReq), 1468 },
+{ HP_POP(clif->pPurchaseReq2), HP_POP2(HP_clif_pPurchaseReq2), 1470 },
+{ HP_POP(clif->pOpenVending), HP_POP2(HP_clif_pOpenVending), 1472 },
+{ HP_POP(clif->pCreateGuild), HP_POP2(HP_clif_pCreateGuild), 1474 },
+{ HP_POP(clif->pGuildCheckMaster), HP_POP2(HP_clif_pGuildCheckMaster), 1476 },
+{ HP_POP(clif->pGuildRequestInfo), HP_POP2(HP_clif_pGuildRequestInfo), 1478 },
+{ HP_POP(clif->pGuildChangePositionInfo), HP_POP2(HP_clif_pGuildChangePositionInfo), 1480 },
+{ HP_POP(clif->pGuildChangeMemberPosition), HP_POP2(HP_clif_pGuildChangeMemberPosition), 1482 },
+{ HP_POP(clif->pGuildRequestEmblem), HP_POP2(HP_clif_pGuildRequestEmblem), 1484 },
+{ HP_POP(clif->pGuildChangeEmblem), HP_POP2(HP_clif_pGuildChangeEmblem), 1486 },
+{ HP_POP(clif->pGuildChangeNotice), HP_POP2(HP_clif_pGuildChangeNotice), 1488 },
+{ HP_POP(clif->pGuildInvite), HP_POP2(HP_clif_pGuildInvite), 1490 },
+{ HP_POP(clif->pGuildReplyInvite), HP_POP2(HP_clif_pGuildReplyInvite), 1492 },
+{ HP_POP(clif->pGuildLeave), HP_POP2(HP_clif_pGuildLeave), 1494 },
+{ HP_POP(clif->pGuildExpulsion), HP_POP2(HP_clif_pGuildExpulsion), 1496 },
+{ HP_POP(clif->pGuildMessage), HP_POP2(HP_clif_pGuildMessage), 1498 },
+{ HP_POP(clif->pGuildRequestAlliance), HP_POP2(HP_clif_pGuildRequestAlliance), 1500 },
+{ HP_POP(clif->pGuildReplyAlliance), HP_POP2(HP_clif_pGuildReplyAlliance), 1502 },
+{ HP_POP(clif->pGuildDelAlliance), HP_POP2(HP_clif_pGuildDelAlliance), 1504 },
+{ HP_POP(clif->pGuildOpposition), HP_POP2(HP_clif_pGuildOpposition), 1506 },
+{ HP_POP(clif->pGuildBreak), HP_POP2(HP_clif_pGuildBreak), 1508 },
+{ HP_POP(clif->pPetMenu), HP_POP2(HP_clif_pPetMenu), 1510 },
+{ HP_POP(clif->pCatchPet), HP_POP2(HP_clif_pCatchPet), 1512 },
+{ HP_POP(clif->pSelectEgg), HP_POP2(HP_clif_pSelectEgg), 1514 },
+{ HP_POP(clif->pSendEmotion), HP_POP2(HP_clif_pSendEmotion), 1516 },
+{ HP_POP(clif->pChangePetName), HP_POP2(HP_clif_pChangePetName), 1518 },
+{ HP_POP(clif->pGMKick), HP_POP2(HP_clif_pGMKick), 1520 },
+{ HP_POP(clif->pGMKickAll), HP_POP2(HP_clif_pGMKickAll), 1522 },
+{ HP_POP(clif->pGMShift), HP_POP2(HP_clif_pGMShift), 1524 },
+{ HP_POP(clif->pGMRemove2), HP_POP2(HP_clif_pGMRemove2), 1526 },
+{ HP_POP(clif->pGMRecall), HP_POP2(HP_clif_pGMRecall), 1528 },
+{ HP_POP(clif->pGMRecall2), HP_POP2(HP_clif_pGMRecall2), 1530 },
+{ HP_POP(clif->pGM_Monster_Item), HP_POP2(HP_clif_pGM_Monster_Item), 1532 },
+{ HP_POP(clif->pGMHide), HP_POP2(HP_clif_pGMHide), 1534 },
+{ HP_POP(clif->pGMReqNoChat), HP_POP2(HP_clif_pGMReqNoChat), 1536 },
+{ HP_POP(clif->pGMRc), HP_POP2(HP_clif_pGMRc), 1538 },
+{ HP_POP(clif->pGMReqAccountName), HP_POP2(HP_clif_pGMReqAccountName), 1540 },
+{ HP_POP(clif->pGMChangeMapType), HP_POP2(HP_clif_pGMChangeMapType), 1542 },
+{ HP_POP(clif->pPMIgnore), HP_POP2(HP_clif_pPMIgnore), 1544 },
+{ HP_POP(clif->pPMIgnoreAll), HP_POP2(HP_clif_pPMIgnoreAll), 1546 },
+{ HP_POP(clif->pPMIgnoreList), HP_POP2(HP_clif_pPMIgnoreList), 1548 },
+{ HP_POP(clif->pNoviceDoriDori), HP_POP2(HP_clif_pNoviceDoriDori), 1550 },
+{ HP_POP(clif->pNoviceExplosionSpirits), HP_POP2(HP_clif_pNoviceExplosionSpirits), 1552 },
+{ HP_POP(clif->pFriendsListAdd), HP_POP2(HP_clif_pFriendsListAdd), 1554 },
+{ HP_POP(clif->pFriendsListReply), HP_POP2(HP_clif_pFriendsListReply), 1556 },
+{ HP_POP(clif->pFriendsListRemove), HP_POP2(HP_clif_pFriendsListRemove), 1558 },
+{ HP_POP(clif->pPVPInfo), HP_POP2(HP_clif_pPVPInfo), 1560 },
+{ HP_POP(clif->pBlacksmith), HP_POP2(HP_clif_pBlacksmith), 1562 },
+{ HP_POP(clif->pAlchemist), HP_POP2(HP_clif_pAlchemist), 1564 },
+{ HP_POP(clif->pTaekwon), HP_POP2(HP_clif_pTaekwon), 1566 },
+{ HP_POP(clif->pRankingPk), HP_POP2(HP_clif_pRankingPk), 1568 },
+{ HP_POP(clif->pFeelSaveOk), HP_POP2(HP_clif_pFeelSaveOk), 1570 },
+{ HP_POP(clif->pChangeHomunculusName), HP_POP2(HP_clif_pChangeHomunculusName), 1572 },
+{ HP_POP(clif->pHomMoveToMaster), HP_POP2(HP_clif_pHomMoveToMaster), 1574 },
+{ HP_POP(clif->pHomMoveTo), HP_POP2(HP_clif_pHomMoveTo), 1576 },
+{ HP_POP(clif->pHomAttack), HP_POP2(HP_clif_pHomAttack), 1578 },
+{ HP_POP(clif->pHomMenu), HP_POP2(HP_clif_pHomMenu), 1580 },
+{ HP_POP(clif->pAutoRevive), HP_POP2(HP_clif_pAutoRevive), 1582 },
+{ HP_POP(clif->pCheck), HP_POP2(HP_clif_pCheck), 1584 },
+{ HP_POP(clif->pMail_refreshinbox), HP_POP2(HP_clif_pMail_refreshinbox), 1586 },
+{ HP_POP(clif->pMail_read), HP_POP2(HP_clif_pMail_read), 1588 },
+{ HP_POP(clif->pMail_getattach), HP_POP2(HP_clif_pMail_getattach), 1590 },
+{ HP_POP(clif->pMail_delete), HP_POP2(HP_clif_pMail_delete), 1592 },
+{ HP_POP(clif->pMail_return), HP_POP2(HP_clif_pMail_return), 1594 },
+{ HP_POP(clif->pMail_setattach), HP_POP2(HP_clif_pMail_setattach), 1596 },
+{ HP_POP(clif->pMail_winopen), HP_POP2(HP_clif_pMail_winopen), 1598 },
+{ HP_POP(clif->pMail_send), HP_POP2(HP_clif_pMail_send), 1600 },
+{ HP_POP(clif->pAuction_cancelreg), HP_POP2(HP_clif_pAuction_cancelreg), 1602 },
+{ HP_POP(clif->pAuction_setitem), HP_POP2(HP_clif_pAuction_setitem), 1604 },
+{ HP_POP(clif->pAuction_register), HP_POP2(HP_clif_pAuction_register), 1606 },
+{ HP_POP(clif->pAuction_cancel), HP_POP2(HP_clif_pAuction_cancel), 1608 },
+{ HP_POP(clif->pAuction_close), HP_POP2(HP_clif_pAuction_close), 1610 },
+{ HP_POP(clif->pAuction_bid), HP_POP2(HP_clif_pAuction_bid), 1612 },
+{ HP_POP(clif->pAuction_search), HP_POP2(HP_clif_pAuction_search), 1614 },
+{ HP_POP(clif->pAuction_buysell), HP_POP2(HP_clif_pAuction_buysell), 1616 },
+{ HP_POP(clif->pcashshop_buy), HP_POP2(HP_clif_pcashshop_buy), 1618 },
+{ HP_POP(clif->pAdopt_request), HP_POP2(HP_clif_pAdopt_request), 1620 },
+{ HP_POP(clif->pAdopt_reply), HP_POP2(HP_clif_pAdopt_reply), 1622 },
+{ HP_POP(clif->pViewPlayerEquip), HP_POP2(HP_clif_pViewPlayerEquip), 1624 },
+{ HP_POP(clif->pEquipTick), HP_POP2(HP_clif_pEquipTick), 1626 },
+{ HP_POP(clif->pquestStateAck), HP_POP2(HP_clif_pquestStateAck), 1628 },
+{ HP_POP(clif->pmercenary_action), HP_POP2(HP_clif_pmercenary_action), 1630 },
+{ HP_POP(clif->pBattleChat), HP_POP2(HP_clif_pBattleChat), 1632 },
+{ HP_POP(clif->pLessEffect), HP_POP2(HP_clif_pLessEffect), 1634 },
+{ HP_POP(clif->pItemListWindowSelected), HP_POP2(HP_clif_pItemListWindowSelected), 1636 },
+{ HP_POP(clif->pReqOpenBuyingStore), HP_POP2(HP_clif_pReqOpenBuyingStore), 1638 },
+{ HP_POP(clif->pReqCloseBuyingStore), HP_POP2(HP_clif_pReqCloseBuyingStore), 1640 },
+{ HP_POP(clif->pReqClickBuyingStore), HP_POP2(HP_clif_pReqClickBuyingStore), 1642 },
+{ HP_POP(clif->pReqTradeBuyingStore), HP_POP2(HP_clif_pReqTradeBuyingStore), 1644 },
+{ HP_POP(clif->pSearchStoreInfo), HP_POP2(HP_clif_pSearchStoreInfo), 1646 },
+{ HP_POP(clif->pSearchStoreInfoNextPage), HP_POP2(HP_clif_pSearchStoreInfoNextPage), 1648 },
+{ HP_POP(clif->pCloseSearchStoreInfo), HP_POP2(HP_clif_pCloseSearchStoreInfo), 1650 },
+{ HP_POP(clif->pSearchStoreInfoListItemClick), HP_POP2(HP_clif_pSearchStoreInfoListItemClick), 1652 },
+{ HP_POP(clif->pDebug), HP_POP2(HP_clif_pDebug), 1654 },
+{ HP_POP(clif->pSkillSelectMenu), HP_POP2(HP_clif_pSkillSelectMenu), 1656 },
+{ HP_POP(clif->pMoveItem), HP_POP2(HP_clif_pMoveItem), 1658 },
+{ HP_POP(clif->pDull), HP_POP2(HP_clif_pDull), 1660 },
+{ HP_POP(clif->pBGQueueRegister), HP_POP2(HP_clif_pBGQueueRegister), 1662 },
+{ HP_POP(clif->pBGQueueCheckState), HP_POP2(HP_clif_pBGQueueCheckState), 1664 },
+{ HP_POP(clif->pBGQueueRevokeReq), HP_POP2(HP_clif_pBGQueueRevokeReq), 1666 },
+{ HP_POP(clif->pBGQueueBattleBeginAck), HP_POP2(HP_clif_pBGQueueBattleBeginAck), 1668 },
+{ HP_POP(clif->pCashShopOpen), HP_POP2(HP_clif_pCashShopOpen), 1670 },
+{ HP_POP(clif->pCashShopClose), HP_POP2(HP_clif_pCashShopClose), 1672 },
+{ HP_POP(clif->pCashShopReqTab), HP_POP2(HP_clif_pCashShopReqTab), 1674 },
+{ HP_POP(clif->pCashShopSchedule), HP_POP2(HP_clif_pCashShopSchedule), 1676 },
+{ HP_POP(clif->pCashShopBuy), HP_POP2(HP_clif_pCashShopBuy), 1678 },
+{ HP_POP(clif->pPartyTick), HP_POP2(HP_clif_pPartyTick), 1680 },
+{ HP_POP(clif->pGuildInvite2), HP_POP2(HP_clif_pGuildInvite2), 1682 },
+{ HP_POP(clif->pPartyBookingAddFilter), HP_POP2(HP_clif_pPartyBookingAddFilter), 1684 },
+{ HP_POP(clif->pPartyBookingSubFilter), HP_POP2(HP_clif_pPartyBookingSubFilter), 1686 },
+{ HP_POP(clif->pPartyBookingReqVolunteer), HP_POP2(HP_clif_pPartyBookingReqVolunteer), 1688 },
+{ HP_POP(clif->pPartyBookingRefuseVolunteer), HP_POP2(HP_clif_pPartyBookingRefuseVolunteer), 1690 },
+{ HP_POP(clif->pPartyBookingCancelVolunteer), HP_POP2(HP_clif_pPartyBookingCancelVolunteer), 1692 },
+/* duel */
+{ HP_POP(duel->create), HP_POP2(HP_duel_create), 1694 },
+{ HP_POP(duel->invite), HP_POP2(HP_duel_invite), 1696 },
+{ HP_POP(duel->accept), HP_POP2(HP_duel_accept), 1698 },
+{ HP_POP(duel->reject), HP_POP2(HP_duel_reject), 1700 },
+{ HP_POP(duel->leave), HP_POP2(HP_duel_leave), 1702 },
+{ HP_POP(duel->showinfo), HP_POP2(HP_duel_showinfo), 1704 },
+{ HP_POP(duel->checktime), HP_POP2(HP_duel_checktime), 1706 },
+{ HP_POP(duel->init), HP_POP2(HP_duel_init), 1708 },
+{ HP_POP(duel->final), HP_POP2(HP_duel_final), 1710 },
+/* elemental */
+{ HP_POP(elemental->init), HP_POP2(HP_elemental_init), 1712 },
+{ HP_POP(elemental->final), HP_POP2(HP_elemental_final), 1714 },
+{ HP_POP(elemental->class), HP_POP2(HP_elemental_class), 1716 },
+{ HP_POP(elemental->get_viewdata), HP_POP2(HP_elemental_get_viewdata), 1718 },
+{ HP_POP(elemental->create), HP_POP2(HP_elemental_create), 1720 },
+{ HP_POP(elemental->data_received), HP_POP2(HP_elemental_data_received), 1722 },
+{ HP_POP(elemental->save), HP_POP2(HP_elemental_save), 1724 },
+{ HP_POP(elemental->change_mode_ack), HP_POP2(HP_elemental_change_mode_ack), 1726 },
+{ HP_POP(elemental->change_mode), HP_POP2(HP_elemental_change_mode), 1728 },
+{ HP_POP(elemental->heal), HP_POP2(HP_elemental_heal), 1730 },
+{ HP_POP(elemental->dead), HP_POP2(HP_elemental_dead), 1732 },
+{ HP_POP(elemental->delete), HP_POP2(HP_elemental_delete), 1734 },
+{ HP_POP(elemental->summon_stop), HP_POP2(HP_elemental_summon_stop), 1736 },
+{ HP_POP(elemental->get_lifetime), HP_POP2(HP_elemental_get_lifetime), 1738 },
+{ HP_POP(elemental->unlocktarget), HP_POP2(HP_elemental_unlocktarget), 1740 },
+{ HP_POP(elemental->skillnotok), HP_POP2(HP_elemental_skillnotok), 1742 },
+{ HP_POP(elemental->set_target), HP_POP2(HP_elemental_set_target), 1744 },
+{ HP_POP(elemental->clean_single_effect), HP_POP2(HP_elemental_clean_single_effect), 1746 },
+{ HP_POP(elemental->clean_effect), HP_POP2(HP_elemental_clean_effect), 1748 },
+{ HP_POP(elemental->action), HP_POP2(HP_elemental_action), 1750 },
+{ HP_POP(elemental->skill_get_requirements), HP_POP2(HP_elemental_skill_get_requirements), 1752 },
+{ HP_POP(elemental->read_skilldb), HP_POP2(HP_elemental_read_skilldb), 1754 },
+{ HP_POP(elemental->reload_db), HP_POP2(HP_elemental_reload_db), 1756 },
+{ HP_POP(elemental->reload_skilldb), HP_POP2(HP_elemental_reload_skilldb), 1758 },
+{ HP_POP(elemental->search_index), HP_POP2(HP_elemental_search_index), 1760 },
+{ HP_POP(elemental->summon_init), HP_POP2(HP_elemental_summon_init), 1762 },
+{ HP_POP(elemental->summon_end_timer), HP_POP2(HP_elemental_summon_end_timer), 1764 },
+{ HP_POP(elemental->ai_sub_timer_activesearch), HP_POP2(HP_elemental_ai_sub_timer_activesearch), 1766 },
+{ HP_POP(elemental->ai_sub_timer), HP_POP2(HP_elemental_ai_sub_timer), 1768 },
+{ HP_POP(elemental->ai_sub_foreachclient), HP_POP2(HP_elemental_ai_sub_foreachclient), 1770 },
+{ HP_POP(elemental->ai_timer), HP_POP2(HP_elemental_ai_timer), 1772 },
+{ HP_POP(elemental->read_db), HP_POP2(HP_elemental_read_db), 1774 },
+/* guild */
+{ HP_POP(guild->init), HP_POP2(HP_guild_init), 1776 },
+{ HP_POP(guild->final), HP_POP2(HP_guild_final), 1778 },
+{ HP_POP(guild->skill_get_max), HP_POP2(HP_guild_skill_get_max), 1780 },
+{ HP_POP(guild->checkskill), HP_POP2(HP_guild_checkskill), 1782 },
+{ HP_POP(guild->check_skill_require), HP_POP2(HP_guild_check_skill_require), 1784 },
+{ HP_POP(guild->checkcastles), HP_POP2(HP_guild_checkcastles), 1786 },
+{ HP_POP(guild->isallied), HP_POP2(HP_guild_isallied), 1788 },
+{ HP_POP(guild->search), HP_POP2(HP_guild_search), 1790 },
+{ HP_POP(guild->searchname), HP_POP2(HP_guild_searchname), 1792 },
+{ HP_POP(guild->castle_search), HP_POP2(HP_guild_castle_search), 1794 },
+{ HP_POP(guild->mapname2gc), HP_POP2(HP_guild_mapname2gc), 1796 },
+{ HP_POP(guild->mapindex2gc), HP_POP2(HP_guild_mapindex2gc), 1798 },
+{ HP_POP(guild->getavailablesd), HP_POP2(HP_guild_getavailablesd), 1800 },
+{ HP_POP(guild->getindex), HP_POP2(HP_guild_getindex), 1802 },
+{ HP_POP(guild->getposition), HP_POP2(HP_guild_getposition), 1804 },
+{ HP_POP(guild->payexp), HP_POP2(HP_guild_payexp), 1806 },
+{ HP_POP(guild->getexp), HP_POP2(HP_guild_getexp), 1808 },
+{ HP_POP(guild->create), HP_POP2(HP_guild_create), 1810 },
+{ HP_POP(guild->created), HP_POP2(HP_guild_created), 1812 },
+{ HP_POP(guild->request_info), HP_POP2(HP_guild_request_info), 1814 },
+{ HP_POP(guild->recv_noinfo), HP_POP2(HP_guild_recv_noinfo), 1816 },
+{ HP_POP(guild->recv_info), HP_POP2(HP_guild_recv_info), 1818 },
+{ HP_POP(guild->npc_request_info), HP_POP2(HP_guild_npc_request_info), 1820 },
+{ HP_POP(guild->invite), HP_POP2(HP_guild_invite), 1822 },
+{ HP_POP(guild->reply_invite), HP_POP2(HP_guild_reply_invite), 1824 },
+{ HP_POP(guild->member_joined), HP_POP2(HP_guild_member_joined), 1826 },
+{ HP_POP(guild->member_added), HP_POP2(HP_guild_member_added), 1828 },
+{ HP_POP(guild->leave), HP_POP2(HP_guild_leave), 1830 },
+{ HP_POP(guild->member_withdraw), HP_POP2(HP_guild_member_withdraw), 1832 },
+{ HP_POP(guild->expulsion), HP_POP2(HP_guild_expulsion), 1834 },
+{ HP_POP(guild->skillup), HP_POP2(HP_guild_skillup), 1836 },
+{ HP_POP(guild->block_skill), HP_POP2(HP_guild_block_skill), 1838 },
+{ HP_POP(guild->reqalliance), HP_POP2(HP_guild_reqalliance), 1840 },
+{ HP_POP(guild->reply_reqalliance), HP_POP2(HP_guild_reply_reqalliance), 1842 },
+{ HP_POP(guild->allianceack), HP_POP2(HP_guild_allianceack), 1844 },
+{ HP_POP(guild->delalliance), HP_POP2(HP_guild_delalliance), 1846 },
+{ HP_POP(guild->opposition), HP_POP2(HP_guild_opposition), 1848 },
+{ HP_POP(guild->check_alliance), HP_POP2(HP_guild_check_alliance), 1850 },
+{ HP_POP(guild->send_memberinfoshort), HP_POP2(HP_guild_send_memberinfoshort), 1852 },
+{ HP_POP(guild->recv_memberinfoshort), HP_POP2(HP_guild_recv_memberinfoshort), 1854 },
+{ HP_POP(guild->change_memberposition), HP_POP2(HP_guild_change_memberposition), 1856 },
+{ HP_POP(guild->memberposition_changed), HP_POP2(HP_guild_memberposition_changed), 1858 },
+{ HP_POP(guild->change_position), HP_POP2(HP_guild_change_position), 1860 },
+{ HP_POP(guild->position_changed), HP_POP2(HP_guild_position_changed), 1862 },
+{ HP_POP(guild->change_notice), HP_POP2(HP_guild_change_notice), 1864 },
+{ HP_POP(guild->notice_changed), HP_POP2(HP_guild_notice_changed), 1866 },
+{ HP_POP(guild->change_emblem), HP_POP2(HP_guild_change_emblem), 1868 },
+{ HP_POP(guild->emblem_changed), HP_POP2(HP_guild_emblem_changed), 1870 },
+{ HP_POP(guild->send_message), HP_POP2(HP_guild_send_message), 1872 },
+{ HP_POP(guild->recv_message), HP_POP2(HP_guild_recv_message), 1874 },
+{ HP_POP(guild->send_dot_remove), HP_POP2(HP_guild_send_dot_remove), 1876 },
+{ HP_POP(guild->skillupack), HP_POP2(HP_guild_skillupack), 1878 },
+{ HP_POP(guild->dobreak), HP_POP2(HP_guild_dobreak), 1880 },
+{ HP_POP(guild->broken), HP_POP2(HP_guild_broken), 1882 },
+{ HP_POP(guild->gm_change), HP_POP2(HP_guild_gm_change), 1884 },
+{ HP_POP(guild->gm_changed), HP_POP2(HP_guild_gm_changed), 1886 },
+{ HP_POP(guild->castle_map_init), HP_POP2(HP_guild_castle_map_init), 1888 },
+{ HP_POP(guild->castledatasave), HP_POP2(HP_guild_castledatasave), 1890 },
+{ HP_POP(guild->castledataloadack), HP_POP2(HP_guild_castledataloadack), 1892 },
+{ HP_POP(guild->castle_reconnect), HP_POP2(HP_guild_castle_reconnect), 1894 },
+{ HP_POP(guild->agit_start), HP_POP2(HP_guild_agit_start), 1896 },
+{ HP_POP(guild->agit_end), HP_POP2(HP_guild_agit_end), 1898 },
+{ HP_POP(guild->agit2_start), HP_POP2(HP_guild_agit2_start), 1900 },
+{ HP_POP(guild->agit2_end), HP_POP2(HP_guild_agit2_end), 1902 },
+{ HP_POP(guild->flag_add), HP_POP2(HP_guild_flag_add), 1904 },
+{ HP_POP(guild->flag_remove), HP_POP2(HP_guild_flag_remove), 1906 },
+{ HP_POP(guild->flags_clear), HP_POP2(HP_guild_flags_clear), 1908 },
+{ HP_POP(guild->aura_refresh), HP_POP2(HP_guild_aura_refresh), 1910 },
+{ HP_POP(guild->payexp_timer), HP_POP2(HP_guild_payexp_timer), 1912 },
+{ HP_POP(guild->sd_check), HP_POP2(HP_guild_sd_check), 1914 },
+{ HP_POP(guild->read_guildskill_tree_db), HP_POP2(HP_guild_read_guildskill_tree_db), 1916 },
+{ HP_POP(guild->read_castledb), HP_POP2(HP_guild_read_castledb), 1918 },
+{ HP_POP(guild->payexp_timer_sub), HP_POP2(HP_guild_payexp_timer_sub), 1920 },
+{ HP_POP(guild->send_xy_timer_sub), HP_POP2(HP_guild_send_xy_timer_sub), 1922 },
+{ HP_POP(guild->send_xy_timer), HP_POP2(HP_guild_send_xy_timer), 1924 },
+{ HP_POP(guild->create_expcache), HP_POP2(HP_guild_create_expcache), 1926 },
+{ HP_POP(guild->eventlist_db_final), HP_POP2(HP_guild_eventlist_db_final), 1928 },
+{ HP_POP(guild->expcache_db_final), HP_POP2(HP_guild_expcache_db_final), 1930 },
+{ HP_POP(guild->castle_db_final), HP_POP2(HP_guild_castle_db_final), 1932 },
+{ HP_POP(guild->broken_sub), HP_POP2(HP_guild_broken_sub), 1934 },
+{ HP_POP(guild->castle_broken_sub), HP_POP2(HP_guild_castle_broken_sub), 1936 },
+{ HP_POP(guild->makemember), HP_POP2(HP_guild_makemember), 1938 },
+{ HP_POP(guild->check_member), HP_POP2(HP_guild_check_member), 1940 },
+{ HP_POP(guild->get_alliance_count), HP_POP2(HP_guild_get_alliance_count), 1942 },
+{ HP_POP(guild->castle_reconnect_sub), HP_POP2(HP_guild_castle_reconnect_sub), 1944 },
+/* gstorage */
+{ HP_POP(gstorage->id2storage), HP_POP2(HP_gstorage_id2storage), 1946 },
+{ HP_POP(gstorage->id2storage2), HP_POP2(HP_gstorage_id2storage2), 1948 },
+{ HP_POP(gstorage->init), HP_POP2(HP_gstorage_init), 1950 },
+{ HP_POP(gstorage->final), HP_POP2(HP_gstorage_final), 1952 },
+{ HP_POP(gstorage->delete), HP_POP2(HP_gstorage_delete), 1954 },
+{ HP_POP(gstorage->open), HP_POP2(HP_gstorage_open), 1956 },
+{ HP_POP(gstorage->additem), HP_POP2(HP_gstorage_additem), 1958 },
+{ HP_POP(gstorage->delitem), HP_POP2(HP_gstorage_delitem), 1960 },
+{ HP_POP(gstorage->add), HP_POP2(HP_gstorage_add), 1962 },
+{ HP_POP(gstorage->get), HP_POP2(HP_gstorage_get), 1964 },
+{ HP_POP(gstorage->addfromcart), HP_POP2(HP_gstorage_addfromcart), 1966 },
+{ HP_POP(gstorage->gettocart), HP_POP2(HP_gstorage_gettocart), 1968 },
+{ HP_POP(gstorage->close), HP_POP2(HP_gstorage_close), 1970 },
+{ HP_POP(gstorage->pc_quit), HP_POP2(HP_gstorage_pc_quit), 1972 },
+{ HP_POP(gstorage->save), HP_POP2(HP_gstorage_save), 1974 },
+{ HP_POP(gstorage->saved), HP_POP2(HP_gstorage_saved), 1976 },
+{ HP_POP(gstorage->create), HP_POP2(HP_gstorage_create), 1978 },
+/* homun */
+{ HP_POP(homun->init), HP_POP2(HP_homun_init), 1980 },
+{ HP_POP(homun->final), HP_POP2(HP_homun_final), 1982 },
+{ HP_POP(homun->reload), HP_POP2(HP_homun_reload), 1984 },
+{ HP_POP(homun->reload_skill), HP_POP2(HP_homun_reload_skill), 1986 },
+{ HP_POP(homun->get_viewdata), HP_POP2(HP_homun_get_viewdata), 1988 },
+{ HP_POP(homun->class2type), HP_POP2(HP_homun_class2type), 1990 },
+{ HP_POP(homun->damaged), HP_POP2(HP_homun_damaged), 1992 },
+{ HP_POP(homun->dead), HP_POP2(HP_homun_dead), 1994 },
+{ HP_POP(homun->vaporize), HP_POP2(HP_homun_vaporize), 1996 },
+{ HP_POP(homun->delete), HP_POP2(HP_homun_delete), 1998 },
+{ HP_POP(homun->checkskill), HP_POP2(HP_homun_checkskill), 2000 },
+{ HP_POP(homun->calc_skilltree), HP_POP2(HP_homun_calc_skilltree), 2002 },
+{ HP_POP(homun->skill_tree_get_max), HP_POP2(HP_homun_skill_tree_get_max), 2004 },
+{ HP_POP(homun->skillup), HP_POP2(HP_homun_skillup), 2006 },
+{ HP_POP(homun->levelup), HP_POP2(HP_homun_levelup), 2008 },
+{ HP_POP(homun->change_class), HP_POP2(HP_homun_change_class), 2010 },
+{ HP_POP(homun->evolve), HP_POP2(HP_homun_evolve), 2012 },
+{ HP_POP(homun->mutate), HP_POP2(HP_homun_mutate), 2014 },
+{ HP_POP(homun->gainexp), HP_POP2(HP_homun_gainexp), 2016 },
+{ HP_POP(homun->add_intimacy), HP_POP2(HP_homun_add_intimacy), 2018 },
+{ HP_POP(homun->consume_intimacy), HP_POP2(HP_homun_consume_intimacy), 2020 },
+{ HP_POP(homun->healed), HP_POP2(HP_homun_healed), 2022 },
+{ HP_POP(homun->save), HP_POP2(HP_homun_save), 2024 },
+{ HP_POP(homun->menu), HP_POP2(HP_homun_menu), 2026 },
+{ HP_POP(homun->feed), HP_POP2(HP_homun_feed), 2028 },
+{ HP_POP(homun->hunger_timer), HP_POP2(HP_homun_hunger_timer), 2030 },
+{ HP_POP(homun->hunger_timer_delete), HP_POP2(HP_homun_hunger_timer_delete), 2032 },
+{ HP_POP(homun->change_name), HP_POP2(HP_homun_change_name), 2034 },
+{ HP_POP(homun->change_name_ack), HP_POP2(HP_homun_change_name_ack), 2036 },
+{ HP_POP(homun->db_search), HP_POP2(HP_homun_db_search), 2038 },
+{ HP_POP(homun->create), HP_POP2(HP_homun_create), 2040 },
+{ HP_POP(homun->init_timers), HP_POP2(HP_homun_init_timers), 2042 },
+{ HP_POP(homun->call), HP_POP2(HP_homun_call), 2044 },
+{ HP_POP(homun->recv_data), HP_POP2(HP_homun_recv_data), 2046 },
+{ HP_POP(homun->creation_request), HP_POP2(HP_homun_creation_request), 2048 },
+{ HP_POP(homun->ressurect), HP_POP2(HP_homun_ressurect), 2050 },
+{ HP_POP(homun->revive), HP_POP2(HP_homun_revive), 2052 },
+{ HP_POP(homun->stat_reset), HP_POP2(HP_homun_stat_reset), 2054 },
+{ HP_POP(homun->shuffle), HP_POP2(HP_homun_shuffle), 2056 },
+{ HP_POP(homun->read_db_sub), HP_POP2(HP_homun_read_db_sub), 2058 },
+{ HP_POP(homun->read_db), HP_POP2(HP_homun_read_db), 2060 },
+{ HP_POP(homun->read_skill_db_sub), HP_POP2(HP_homun_read_skill_db_sub), 2062 },
+{ HP_POP(homun->skill_db_read), HP_POP2(HP_homun_skill_db_read), 2064 },
+{ HP_POP(homun->exp_db_read), HP_POP2(HP_homun_exp_db_read), 2066 },
+{ HP_POP(homun->addspiritball), HP_POP2(HP_homun_addspiritball), 2068 },
+{ HP_POP(homun->delspiritball), HP_POP2(HP_homun_delspiritball), 2070 },
+/* instance */
+{ HP_POP(instance->init), HP_POP2(HP_instance_init), 2072 },
+{ HP_POP(instance->final), HP_POP2(HP_instance_final), 2074 },
+{ HP_POP(instance->create), HP_POP2(HP_instance_create), 2076 },
+{ HP_POP(instance->add_map), HP_POP2(HP_instance_add_map), 2078 },
+{ HP_POP(instance->del_map), HP_POP2(HP_instance_del_map), 2080 },
+{ HP_POP(instance->map2imap), HP_POP2(HP_instance_map2imap), 2082 },
+{ HP_POP(instance->mapid2imapid), HP_POP2(HP_instance_mapid2imapid), 2084 },
+{ HP_POP(instance->destroy), HP_POP2(HP_instance_destroy), 2086 },
+{ HP_POP(instance->start), HP_POP2(HP_instance_start), 2088 },
+{ HP_POP(instance->check_idle), HP_POP2(HP_instance_check_idle), 2090 },
+{ HP_POP(instance->check_kick), HP_POP2(HP_instance_check_kick), 2092 },
+{ HP_POP(instance->set_timeout), HP_POP2(HP_instance_set_timeout), 2094 },
+{ HP_POP(instance->valid), HP_POP2(HP_instance_valid), 2096 },
+{ HP_POP(instance->destroy_timer), HP_POP2(HP_instance_destroy_timer), 2098 },
+/* intif */
+{ HP_POP(intif->parse), HP_POP2(HP_intif_parse), 2100 },
+{ HP_POP(intif->create_pet), HP_POP2(HP_intif_create_pet), 2102 },
+{ HP_POP(intif->broadcast), HP_POP2(HP_intif_broadcast), 2104 },
+{ HP_POP(intif->broadcast2), HP_POP2(HP_intif_broadcast2), 2106 },
+{ HP_POP(intif->main_message), HP_POP2(HP_intif_main_message), 2108 },
+{ HP_POP(intif->wis_message), HP_POP2(HP_intif_wis_message), 2110 },
+{ HP_POP(intif->wis_message_to_gm), HP_POP2(HP_intif_wis_message_to_gm), 2112 },
+{ HP_POP(intif->saveregistry), HP_POP2(HP_intif_saveregistry), 2114 },
+{ HP_POP(intif->request_registry), HP_POP2(HP_intif_request_registry), 2116 },
+{ HP_POP(intif->request_guild_storage), HP_POP2(HP_intif_request_guild_storage), 2118 },
+{ HP_POP(intif->send_guild_storage), HP_POP2(HP_intif_send_guild_storage), 2120 },
+{ HP_POP(intif->create_party), HP_POP2(HP_intif_create_party), 2122 },
+{ HP_POP(intif->request_partyinfo), HP_POP2(HP_intif_request_partyinfo), 2124 },
+{ HP_POP(intif->party_addmember), HP_POP2(HP_intif_party_addmember), 2126 },
+{ HP_POP(intif->party_changeoption), HP_POP2(HP_intif_party_changeoption), 2128 },
+{ HP_POP(intif->party_leave), HP_POP2(HP_intif_party_leave), 2130 },
+{ HP_POP(intif->party_changemap), HP_POP2(HP_intif_party_changemap), 2132 },
+{ HP_POP(intif->break_party), HP_POP2(HP_intif_break_party), 2134 },
+{ HP_POP(intif->party_message), HP_POP2(HP_intif_party_message), 2136 },
+{ HP_POP(intif->party_leaderchange), HP_POP2(HP_intif_party_leaderchange), 2138 },
+{ HP_POP(intif->guild_create), HP_POP2(HP_intif_guild_create), 2140 },
+{ HP_POP(intif->guild_request_info), HP_POP2(HP_intif_guild_request_info), 2142 },
+{ HP_POP(intif->guild_addmember), HP_POP2(HP_intif_guild_addmember), 2144 },
+{ HP_POP(intif->guild_leave), HP_POP2(HP_intif_guild_leave), 2146 },
+{ HP_POP(intif->guild_memberinfoshort), HP_POP2(HP_intif_guild_memberinfoshort), 2148 },
+{ HP_POP(intif->guild_break), HP_POP2(HP_intif_guild_break), 2150 },
+{ HP_POP(intif->guild_message), HP_POP2(HP_intif_guild_message), 2152 },
+{ HP_POP(intif->guild_change_gm), HP_POP2(HP_intif_guild_change_gm), 2154 },
+{ HP_POP(intif->guild_change_basicinfo), HP_POP2(HP_intif_guild_change_basicinfo), 2156 },
+{ HP_POP(intif->guild_change_memberinfo), HP_POP2(HP_intif_guild_change_memberinfo), 2158 },
+{ HP_POP(intif->guild_position), HP_POP2(HP_intif_guild_position), 2160 },
+{ HP_POP(intif->guild_skillup), HP_POP2(HP_intif_guild_skillup), 2162 },
+{ HP_POP(intif->guild_alliance), HP_POP2(HP_intif_guild_alliance), 2164 },
+{ HP_POP(intif->guild_notice), HP_POP2(HP_intif_guild_notice), 2166 },
+{ HP_POP(intif->guild_emblem), HP_POP2(HP_intif_guild_emblem), 2168 },
+{ HP_POP(intif->guild_castle_dataload), HP_POP2(HP_intif_guild_castle_dataload), 2170 },
+{ HP_POP(intif->guild_castle_datasave), HP_POP2(HP_intif_guild_castle_datasave), 2172 },
+{ HP_POP(intif->request_petdata), HP_POP2(HP_intif_request_petdata), 2174 },
+{ HP_POP(intif->save_petdata), HP_POP2(HP_intif_save_petdata), 2176 },
+{ HP_POP(intif->delete_petdata), HP_POP2(HP_intif_delete_petdata), 2178 },
+{ HP_POP(intif->rename), HP_POP2(HP_intif_rename), 2180 },
+{ HP_POP(intif->homunculus_create), HP_POP2(HP_intif_homunculus_create), 2182 },
+{ HP_POP(intif->homunculus_requestload), HP_POP2(HP_intif_homunculus_requestload), 2184 },
+{ HP_POP(intif->homunculus_requestsave), HP_POP2(HP_intif_homunculus_requestsave), 2186 },
+{ HP_POP(intif->homunculus_requestdelete), HP_POP2(HP_intif_homunculus_requestdelete), 2188 },
+{ HP_POP(intif->request_questlog), HP_POP2(HP_intif_request_questlog), 2190 },
+{ HP_POP(intif->quest_save), HP_POP2(HP_intif_quest_save), 2192 },
+{ HP_POP(intif->mercenary_create), HP_POP2(HP_intif_mercenary_create), 2194 },
+{ HP_POP(intif->mercenary_request), HP_POP2(HP_intif_mercenary_request), 2196 },
+{ HP_POP(intif->mercenary_delete), HP_POP2(HP_intif_mercenary_delete), 2198 },
+{ HP_POP(intif->mercenary_save), HP_POP2(HP_intif_mercenary_save), 2200 },
+{ HP_POP(intif->Mail_requestinbox), HP_POP2(HP_intif_Mail_requestinbox), 2202 },
+{ HP_POP(intif->Mail_read), HP_POP2(HP_intif_Mail_read), 2204 },
+{ HP_POP(intif->Mail_getattach), HP_POP2(HP_intif_Mail_getattach), 2206 },
+{ HP_POP(intif->Mail_delete), HP_POP2(HP_intif_Mail_delete), 2208 },
+{ HP_POP(intif->Mail_return), HP_POP2(HP_intif_Mail_return), 2210 },
+{ HP_POP(intif->Mail_send), HP_POP2(HP_intif_Mail_send), 2212 },
+{ HP_POP(intif->Auction_requestlist), HP_POP2(HP_intif_Auction_requestlist), 2214 },
+{ HP_POP(intif->Auction_register), HP_POP2(HP_intif_Auction_register), 2216 },
+{ HP_POP(intif->Auction_cancel), HP_POP2(HP_intif_Auction_cancel), 2218 },
+{ HP_POP(intif->Auction_close), HP_POP2(HP_intif_Auction_close), 2220 },
+{ HP_POP(intif->Auction_bid), HP_POP2(HP_intif_Auction_bid), 2222 },
+{ HP_POP(intif->elemental_create), HP_POP2(HP_intif_elemental_create), 2224 },
+{ HP_POP(intif->elemental_request), HP_POP2(HP_intif_elemental_request), 2226 },
+{ HP_POP(intif->elemental_delete), HP_POP2(HP_intif_elemental_delete), 2228 },
+{ HP_POP(intif->elemental_save), HP_POP2(HP_intif_elemental_save), 2230 },
+{ HP_POP(intif->request_accinfo), HP_POP2(HP_intif_request_accinfo), 2232 },
+{ HP_POP(intif->CheckForCharServer), HP_POP2(HP_intif_CheckForCharServer), 2234 },
+{ HP_POP(intif->pWisMessage), HP_POP2(HP_intif_pWisMessage), 2236 },
+{ HP_POP(intif->pWisEnd), HP_POP2(HP_intif_pWisEnd), 2238 },
+{ HP_POP(intif->pWisToGM_sub), HP_POP2(HP_intif_pWisToGM_sub), 2240 },
+{ HP_POP(intif->pWisToGM), HP_POP2(HP_intif_pWisToGM), 2242 },
+{ HP_POP(intif->pRegisters), HP_POP2(HP_intif_pRegisters), 2244 },
+{ HP_POP(intif->pChangeNameOk), HP_POP2(HP_intif_pChangeNameOk), 2246 },
+{ HP_POP(intif->pMessageToFD), HP_POP2(HP_intif_pMessageToFD), 2248 },
+{ HP_POP(intif->pLoadGuildStorage), HP_POP2(HP_intif_pLoadGuildStorage), 2250 },
+{ HP_POP(intif->pSaveGuildStorage), HP_POP2(HP_intif_pSaveGuildStorage), 2252 },
+{ HP_POP(intif->pPartyCreated), HP_POP2(HP_intif_pPartyCreated), 2254 },
+{ HP_POP(intif->pPartyInfo), HP_POP2(HP_intif_pPartyInfo), 2256 },
+{ HP_POP(intif->pPartyMemberAdded), HP_POP2(HP_intif_pPartyMemberAdded), 2258 },
+{ HP_POP(intif->pPartyOptionChanged), HP_POP2(HP_intif_pPartyOptionChanged), 2260 },
+{ HP_POP(intif->pPartyMemberWithdraw), HP_POP2(HP_intif_pPartyMemberWithdraw), 2262 },
+{ HP_POP(intif->pPartyMove), HP_POP2(HP_intif_pPartyMove), 2264 },
+{ HP_POP(intif->pPartyBroken), HP_POP2(HP_intif_pPartyBroken), 2266 },
+{ HP_POP(intif->pPartyMessage), HP_POP2(HP_intif_pPartyMessage), 2268 },
+{ HP_POP(intif->pGuildCreated), HP_POP2(HP_intif_pGuildCreated), 2270 },
+{ HP_POP(intif->pGuildInfo), HP_POP2(HP_intif_pGuildInfo), 2272 },
+{ HP_POP(intif->pGuildMemberAdded), HP_POP2(HP_intif_pGuildMemberAdded), 2274 },
+{ HP_POP(intif->pGuildMemberWithdraw), HP_POP2(HP_intif_pGuildMemberWithdraw), 2276 },
+{ HP_POP(intif->pGuildMemberInfoShort), HP_POP2(HP_intif_pGuildMemberInfoShort), 2278 },
+{ HP_POP(intif->pGuildBroken), HP_POP2(HP_intif_pGuildBroken), 2280 },
+{ HP_POP(intif->pGuildMessage), HP_POP2(HP_intif_pGuildMessage), 2282 },
+{ HP_POP(intif->pGuildBasicInfoChanged), HP_POP2(HP_intif_pGuildBasicInfoChanged), 2284 },
+{ HP_POP(intif->pGuildMemberInfoChanged), HP_POP2(HP_intif_pGuildMemberInfoChanged), 2286 },
+{ HP_POP(intif->pGuildPosition), HP_POP2(HP_intif_pGuildPosition), 2288 },
+{ HP_POP(intif->pGuildSkillUp), HP_POP2(HP_intif_pGuildSkillUp), 2290 },
+{ HP_POP(intif->pGuildAlliance), HP_POP2(HP_intif_pGuildAlliance), 2292 },
+{ HP_POP(intif->pGuildNotice), HP_POP2(HP_intif_pGuildNotice), 2294 },
+{ HP_POP(intif->pGuildEmblem), HP_POP2(HP_intif_pGuildEmblem), 2296 },
+{ HP_POP(intif->pGuildCastleDataLoad), HP_POP2(HP_intif_pGuildCastleDataLoad), 2298 },
+{ HP_POP(intif->pGuildMasterChanged), HP_POP2(HP_intif_pGuildMasterChanged), 2300 },
+{ HP_POP(intif->pQuestLog), HP_POP2(HP_intif_pQuestLog), 2302 },
+{ HP_POP(intif->pQuestSave), HP_POP2(HP_intif_pQuestSave), 2304 },
+{ HP_POP(intif->pMailInboxReceived), HP_POP2(HP_intif_pMailInboxReceived), 2306 },
+{ HP_POP(intif->pMailNew), HP_POP2(HP_intif_pMailNew), 2308 },
+{ HP_POP(intif->pMailGetAttach), HP_POP2(HP_intif_pMailGetAttach), 2310 },
+{ HP_POP(intif->pMailDelete), HP_POP2(HP_intif_pMailDelete), 2312 },
+{ HP_POP(intif->pMailReturn), HP_POP2(HP_intif_pMailReturn), 2314 },
+{ HP_POP(intif->pMailSend), HP_POP2(HP_intif_pMailSend), 2316 },
+{ HP_POP(intif->pAuctionResults), HP_POP2(HP_intif_pAuctionResults), 2318 },
+{ HP_POP(intif->pAuctionRegister), HP_POP2(HP_intif_pAuctionRegister), 2320 },
+{ HP_POP(intif->pAuctionCancel), HP_POP2(HP_intif_pAuctionCancel), 2322 },
+{ HP_POP(intif->pAuctionClose), HP_POP2(HP_intif_pAuctionClose), 2324 },
+{ HP_POP(intif->pAuctionMessage), HP_POP2(HP_intif_pAuctionMessage), 2326 },
+{ HP_POP(intif->pAuctionBid), HP_POP2(HP_intif_pAuctionBid), 2328 },
+{ HP_POP(intif->pMercenaryReceived), HP_POP2(HP_intif_pMercenaryReceived), 2330 },
+{ HP_POP(intif->pMercenaryDeleted), HP_POP2(HP_intif_pMercenaryDeleted), 2332 },
+{ HP_POP(intif->pMercenarySaved), HP_POP2(HP_intif_pMercenarySaved), 2334 },
+{ HP_POP(intif->pElementalReceived), HP_POP2(HP_intif_pElementalReceived), 2336 },
+{ HP_POP(intif->pElementalDeleted), HP_POP2(HP_intif_pElementalDeleted), 2338 },
+{ HP_POP(intif->pElementalSaved), HP_POP2(HP_intif_pElementalSaved), 2340 },
+{ HP_POP(intif->pCreatePet), HP_POP2(HP_intif_pCreatePet), 2342 },
+{ HP_POP(intif->pRecvPetData), HP_POP2(HP_intif_pRecvPetData), 2344 },
+{ HP_POP(intif->pSavePetOk), HP_POP2(HP_intif_pSavePetOk), 2346 },
+{ HP_POP(intif->pDeletePetOk), HP_POP2(HP_intif_pDeletePetOk), 2348 },
+{ HP_POP(intif->pCreateHomunculus), HP_POP2(HP_intif_pCreateHomunculus), 2350 },
+{ HP_POP(intif->pRecvHomunculusData), HP_POP2(HP_intif_pRecvHomunculusData), 2352 },
+{ HP_POP(intif->pSaveHomunculusOk), HP_POP2(HP_intif_pSaveHomunculusOk), 2354 },
+{ HP_POP(intif->pDeleteHomunculusOk), HP_POP2(HP_intif_pDeleteHomunculusOk), 2356 },
+/* ircbot */
+{ HP_POP(ircbot->init), HP_POP2(HP_ircbot_init), 2358 },
+{ HP_POP(ircbot->final), HP_POP2(HP_ircbot_final), 2360 },
+{ HP_POP(ircbot->parse), HP_POP2(HP_ircbot_parse), 2362 },
+{ HP_POP(ircbot->parse_sub), HP_POP2(HP_ircbot_parse_sub), 2364 },
+{ HP_POP(ircbot->parse_source), HP_POP2(HP_ircbot_parse_source), 2366 },
+{ HP_POP(ircbot->func_search), HP_POP2(HP_ircbot_func_search), 2368 },
+{ HP_POP(ircbot->connect_timer), HP_POP2(HP_ircbot_connect_timer), 2370 },
+{ HP_POP(ircbot->identify_timer), HP_POP2(HP_ircbot_identify_timer), 2372 },
+{ HP_POP(ircbot->join_timer), HP_POP2(HP_ircbot_join_timer), 2374 },
+{ HP_POP(ircbot->send), HP_POP2(HP_ircbot_send), 2376 },
+{ HP_POP(ircbot->relay), HP_POP2(HP_ircbot_relay), 2378 },
+{ HP_POP(ircbot->pong), HP_POP2(HP_ircbot_pong), 2380 },
+{ HP_POP(ircbot->privmsg), HP_POP2(HP_ircbot_privmsg), 2382 },
+{ HP_POP(ircbot->userjoin), HP_POP2(HP_ircbot_userjoin), 2384 },
+{ HP_POP(ircbot->userleave), HP_POP2(HP_ircbot_userleave), 2386 },
+{ HP_POP(ircbot->usernick), HP_POP2(HP_ircbot_usernick), 2388 },
+/* itemdb */
+{ HP_POP(itemdb->init), HP_POP2(HP_itemdb_init), 2390 },
+{ HP_POP(itemdb->final), HP_POP2(HP_itemdb_final), 2392 },
+{ HP_POP(itemdb->reload), HP_POP2(HP_itemdb_reload), 2394 },
+{ HP_POP(itemdb->name_constants), HP_POP2(HP_itemdb_name_constants), 2396 },
+{ HP_POP(itemdb->force_name_constants), HP_POP2(HP_itemdb_force_name_constants), 2398 },
+{ HP_POP(itemdb->read_groups), HP_POP2(HP_itemdb_read_groups), 2400 },
+{ HP_POP(itemdb->read_chains), HP_POP2(HP_itemdb_read_chains), 2402 },
+{ HP_POP(itemdb->read_packages), HP_POP2(HP_itemdb_read_packages), 2404 },
+{ HP_POP(itemdb->write_cached_packages), HP_POP2(HP_itemdb_write_cached_packages), 2406 },
+{ HP_POP(itemdb->read_cached_packages), HP_POP2(HP_itemdb_read_cached_packages), 2408 },
+{ HP_POP(itemdb->name2id), HP_POP2(HP_itemdb_name2id), 2410 },
+{ HP_POP(itemdb->search_name), HP_POP2(HP_itemdb_search_name), 2412 },
+{ HP_POP(itemdb->search_name_array), HP_POP2(HP_itemdb_search_name_array), 2414 },
+{ HP_POP(itemdb->load), HP_POP2(HP_itemdb_load), 2416 },
+{ HP_POP(itemdb->search), HP_POP2(HP_itemdb_search), 2418 },
+{ HP_POP(itemdb->parse_dbrow), HP_POP2(HP_itemdb_parse_dbrow), 2420 },
+{ HP_POP(itemdb->exists), HP_POP2(HP_itemdb_exists), 2422 },
+{ HP_POP(itemdb->in_group), HP_POP2(HP_itemdb_in_group), 2424 },
+{ HP_POP(itemdb->group_item), HP_POP2(HP_itemdb_group_item), 2426 },
+{ HP_POP(itemdb->chain_item), HP_POP2(HP_itemdb_chain_item), 2428 },
+{ HP_POP(itemdb->package_item), HP_POP2(HP_itemdb_package_item), 2430 },
+{ HP_POP(itemdb->searchname_sub), HP_POP2(HP_itemdb_searchname_sub), 2432 },
+{ HP_POP(itemdb->searchname_array_sub), HP_POP2(HP_itemdb_searchname_array_sub), 2434 },
+{ HP_POP(itemdb->searchrandomid), HP_POP2(HP_itemdb_searchrandomid), 2436 },
+{ HP_POP(itemdb->typename), HP_POP2(HP_itemdb_typename), 2438 },
+{ HP_POP(itemdb->jobid2mapid), HP_POP2(HP_itemdb_jobid2mapid), 2440 },
+{ HP_POP(itemdb->create_dummy_data), HP_POP2(HP_itemdb_create_dummy_data), 2442 },
+{ HP_POP(itemdb->create_item_data), HP_POP2(HP_itemdb_create_item_data), 2444 },
+{ HP_POP(itemdb->isequip), HP_POP2(HP_itemdb_isequip), 2446 },
+{ HP_POP(itemdb->isequip2), HP_POP2(HP_itemdb_isequip2), 2448 },
+{ HP_POP(itemdb->isstackable), HP_POP2(HP_itemdb_isstackable), 2450 },
+{ HP_POP(itemdb->isstackable2), HP_POP2(HP_itemdb_isstackable2), 2452 },
+{ HP_POP(itemdb->isdropable_sub), HP_POP2(HP_itemdb_isdropable_sub), 2454 },
+{ HP_POP(itemdb->cantrade_sub), HP_POP2(HP_itemdb_cantrade_sub), 2456 },
+{ HP_POP(itemdb->canpartnertrade_sub), HP_POP2(HP_itemdb_canpartnertrade_sub), 2458 },
+{ HP_POP(itemdb->cansell_sub), HP_POP2(HP_itemdb_cansell_sub), 2460 },
+{ HP_POP(itemdb->cancartstore_sub), HP_POP2(HP_itemdb_cancartstore_sub), 2462 },
+{ HP_POP(itemdb->canstore_sub), HP_POP2(HP_itemdb_canstore_sub), 2464 },
+{ HP_POP(itemdb->canguildstore_sub), HP_POP2(HP_itemdb_canguildstore_sub), 2466 },
+{ HP_POP(itemdb->canmail_sub), HP_POP2(HP_itemdb_canmail_sub), 2468 },
+{ HP_POP(itemdb->canauction_sub), HP_POP2(HP_itemdb_canauction_sub), 2470 },
+{ HP_POP(itemdb->isrestricted), HP_POP2(HP_itemdb_isrestricted), 2472 },
+{ HP_POP(itemdb->isidentified), HP_POP2(HP_itemdb_isidentified), 2474 },
+{ HP_POP(itemdb->isidentified2), HP_POP2(HP_itemdb_isidentified2), 2476 },
+{ HP_POP(itemdb->read_itemavail), HP_POP2(HP_itemdb_read_itemavail), 2478 },
+{ HP_POP(itemdb->read_itemtrade), HP_POP2(HP_itemdb_read_itemtrade), 2480 },
+{ HP_POP(itemdb->read_itemdelay), HP_POP2(HP_itemdb_read_itemdelay), 2482 },
+{ HP_POP(itemdb->read_stack), HP_POP2(HP_itemdb_read_stack), 2484 },
+{ HP_POP(itemdb->read_buyingstore), HP_POP2(HP_itemdb_read_buyingstore), 2486 },
+{ HP_POP(itemdb->read_nouse), HP_POP2(HP_itemdb_read_nouse), 2488 },
+{ HP_POP(itemdb->combo_split_atoi), HP_POP2(HP_itemdb_combo_split_atoi), 2490 },
+{ HP_POP(itemdb->read_combos), HP_POP2(HP_itemdb_read_combos), 2492 },
+{ HP_POP(itemdb->gendercheck), HP_POP2(HP_itemdb_gendercheck), 2494 },
+{ HP_POP(itemdb->re_split_atoi), HP_POP2(HP_itemdb_re_split_atoi), 2496 },
+{ HP_POP(itemdb->readdb), HP_POP2(HP_itemdb_readdb), 2498 },
+{ HP_POP(itemdb->read_sqldb), HP_POP2(HP_itemdb_read_sqldb), 2500 },
+{ HP_POP(itemdb->unique_id), HP_POP2(HP_itemdb_unique_id), 2502 },
+{ HP_POP(itemdb->uid_load), HP_POP2(HP_itemdb_uid_load), 2504 },
+{ HP_POP(itemdb->read), HP_POP2(HP_itemdb_read), 2506 },
+{ HP_POP(itemdb->destroy_item_data), HP_POP2(HP_itemdb_destroy_item_data), 2508 },
+{ HP_POP(itemdb->final_sub), HP_POP2(HP_itemdb_final_sub), 2510 },
+/* logs */
+{ HP_POP(logs->pick_pc), HP_POP2(HP_logs_pick_pc), 2512 },
+{ HP_POP(logs->pick_mob), HP_POP2(HP_logs_pick_mob), 2514 },
+{ HP_POP(logs->zeny), HP_POP2(HP_logs_zeny), 2516 },
+{ HP_POP(logs->npc), HP_POP2(HP_logs_npc), 2518 },
+{ HP_POP(logs->chat), HP_POP2(HP_logs_chat), 2520 },
+{ HP_POP(logs->atcommand), HP_POP2(HP_logs_atcommand), 2522 },
+{ HP_POP(logs->branch), HP_POP2(HP_logs_branch), 2524 },
+{ HP_POP(logs->mvpdrop), HP_POP2(HP_logs_mvpdrop), 2526 },
+{ HP_POP(logs->pick_sub), HP_POP2(HP_logs_pick_sub), 2528 },
+{ HP_POP(logs->zeny_sub), HP_POP2(HP_logs_zeny_sub), 2530 },
+{ HP_POP(logs->npc_sub), HP_POP2(HP_logs_npc_sub), 2532 },
+{ HP_POP(logs->chat_sub), HP_POP2(HP_logs_chat_sub), 2534 },
+{ HP_POP(logs->atcommand_sub), HP_POP2(HP_logs_atcommand_sub), 2536 },
+{ HP_POP(logs->branch_sub), HP_POP2(HP_logs_branch_sub), 2538 },
+{ HP_POP(logs->mvpdrop_sub), HP_POP2(HP_logs_mvpdrop_sub), 2540 },
+{ HP_POP(logs->config_read), HP_POP2(HP_logs_config_read), 2542 },
+{ HP_POP(logs->config_done), HP_POP2(HP_logs_config_done), 2544 },
+{ HP_POP(logs->sql_init), HP_POP2(HP_logs_sql_init), 2546 },
+{ HP_POP(logs->sql_final), HP_POP2(HP_logs_sql_final), 2548 },
+{ HP_POP(logs->picktype2char), HP_POP2(HP_logs_picktype2char), 2550 },
+{ HP_POP(logs->chattype2char), HP_POP2(HP_logs_chattype2char), 2552 },
+{ HP_POP(logs->should_log_item), HP_POP2(HP_logs_should_log_item), 2554 },
+/* mail */
+{ HP_POP(mail->clear), HP_POP2(HP_mail_clear), 2556 },
+{ HP_POP(mail->removeitem), HP_POP2(HP_mail_removeitem), 2558 },
+{ HP_POP(mail->removezeny), HP_POP2(HP_mail_removezeny), 2560 },
+{ HP_POP(mail->setitem), HP_POP2(HP_mail_setitem), 2562 },
+{ HP_POP(mail->setattachment), HP_POP2(HP_mail_setattachment), 2564 },
+{ HP_POP(mail->getattachment), HP_POP2(HP_mail_getattachment), 2566 },
+{ HP_POP(mail->openmail), HP_POP2(HP_mail_openmail), 2568 },
+{ HP_POP(mail->deliveryfail), HP_POP2(HP_mail_deliveryfail), 2570 },
+{ HP_POP(mail->invalid_operation), HP_POP2(HP_mail_invalid_operation), 2572 },
+/* map */
+{ HP_POP(map->zone_init), HP_POP2(HP_map_zone_init), 2574 },
+{ HP_POP(map->zone_remove), HP_POP2(HP_map_zone_remove), 2576 },
+{ HP_POP(map->zone_apply), HP_POP2(HP_map_zone_apply), 2578 },
+{ HP_POP(map->zone_change), HP_POP2(HP_map_zone_change), 2580 },
+{ HP_POP(map->zone_change2), HP_POP2(HP_map_zone_change2), 2582 },
+{ HP_POP(map->getcell), HP_POP2(HP_map_getcell), 2584 },
+{ HP_POP(map->setgatcell), HP_POP2(HP_map_setgatcell), 2586 },
+{ HP_POP(map->cellfromcache), HP_POP2(HP_map_cellfromcache), 2588 },
+{ HP_POP(map->setusers), HP_POP2(HP_map_setusers), 2590 },
+{ HP_POP(map->getusers), HP_POP2(HP_map_getusers), 2592 },
+{ HP_POP(map->usercount), HP_POP2(HP_map_usercount), 2594 },
+{ HP_POP(map->freeblock), HP_POP2(HP_map_freeblock), 2596 },
+{ HP_POP(map->freeblock_lock), HP_POP2(HP_map_freeblock_lock), 2598 },
+{ HP_POP(map->freeblock_unlock), HP_POP2(HP_map_freeblock_unlock), 2600 },
+{ HP_POP(map->addblock), HP_POP2(HP_map_addblock), 2602 },
+{ HP_POP(map->delblock), HP_POP2(HP_map_delblock), 2604 },
+{ HP_POP(map->moveblock), HP_POP2(HP_map_moveblock), 2606 },
+{ HP_POP(map->count_oncell), HP_POP2(HP_map_count_oncell), 2608 },
+{ HP_POP(map->find_skill_unit_oncell), HP_POP2(HP_map_find_skill_unit_oncell), 2610 },
+{ HP_POP(map->get_new_object_id), HP_POP2(HP_map_get_new_object_id), 2612 },
+{ HP_POP(map->search_freecell), HP_POP2(HP_map_search_freecell), 2614 },
+{ HP_POP(map->quit), HP_POP2(HP_map_quit), 2616 },
+{ HP_POP(map->addnpc), HP_POP2(HP_map_addnpc), 2618 },
+{ HP_POP(map->clearflooritem_timer), HP_POP2(HP_map_clearflooritem_timer), 2620 },
+{ HP_POP(map->removemobs_timer), HP_POP2(HP_map_removemobs_timer), 2622 },
+{ HP_POP(map->clearflooritem), HP_POP2(HP_map_clearflooritem), 2624 },
+{ HP_POP(map->addflooritem), HP_POP2(HP_map_addflooritem), 2626 },
+{ HP_POP(map->addnickdb), HP_POP2(HP_map_addnickdb), 2628 },
+{ HP_POP(map->delnickdb), HP_POP2(HP_map_delnickdb), 2630 },
+{ HP_POP(map->reqnickdb), HP_POP2(HP_map_reqnickdb), 2632 },
+{ HP_POP(map->charid2nick), HP_POP2(HP_map_charid2nick), 2634 },
+{ HP_POP(map->charid2sd), HP_POP2(HP_map_charid2sd), 2636 },
+{ HP_POP(map->vforeachpc), HP_POP2(HP_map_vforeachpc), 2638 },
+{ HP_POP(map->vforeachmob), HP_POP2(HP_map_vforeachmob), 2640 },
+{ HP_POP(map->vforeachnpc), HP_POP2(HP_map_vforeachnpc), 2642 },
+{ HP_POP(map->vforeachregen), HP_POP2(HP_map_vforeachregen), 2644 },
+{ HP_POP(map->vforeachiddb), HP_POP2(HP_map_vforeachiddb), 2646 },
+{ HP_POP(map->vforeachinrange), HP_POP2(HP_map_vforeachinrange), 2648 },
+{ HP_POP(map->vforeachinshootrange), HP_POP2(HP_map_vforeachinshootrange), 2650 },
+{ HP_POP(map->vforeachinarea), HP_POP2(HP_map_vforeachinarea), 2652 },
+{ HP_POP(map->vforcountinrange), HP_POP2(HP_map_vforcountinrange), 2654 },
+{ HP_POP(map->vforcountinarea), HP_POP2(HP_map_vforcountinarea), 2656 },
+{ HP_POP(map->vforeachinmovearea), HP_POP2(HP_map_vforeachinmovearea), 2658 },
+{ HP_POP(map->vforeachincell), HP_POP2(HP_map_vforeachincell), 2660 },
+{ HP_POP(map->vforeachinpath), HP_POP2(HP_map_vforeachinpath), 2662 },
+{ HP_POP(map->vforeachinmap), HP_POP2(HP_map_vforeachinmap), 2664 },
+{ HP_POP(map->vforeachininstance), HP_POP2(HP_map_vforeachininstance), 2666 },
+{ HP_POP(map->id2sd), HP_POP2(HP_map_id2sd), 2668 },
+{ HP_POP(map->id2md), HP_POP2(HP_map_id2md), 2670 },
+{ HP_POP(map->id2nd), HP_POP2(HP_map_id2nd), 2672 },
+{ HP_POP(map->id2hd), HP_POP2(HP_map_id2hd), 2674 },
+{ HP_POP(map->id2mc), HP_POP2(HP_map_id2mc), 2676 },
+{ HP_POP(map->id2cd), HP_POP2(HP_map_id2cd), 2678 },
+{ HP_POP(map->id2bl), HP_POP2(HP_map_id2bl), 2680 },
+{ HP_POP(map->blid_exists), HP_POP2(HP_map_blid_exists), 2682 },
+{ HP_POP(map->mapindex2mapid), HP_POP2(HP_map_mapindex2mapid), 2684 },
+{ HP_POP(map->mapname2mapid), HP_POP2(HP_map_mapname2mapid), 2686 },
+{ HP_POP(map->mapname2ipport), HP_POP2(HP_map_mapname2ipport), 2688 },
+{ HP_POP(map->setipport), HP_POP2(HP_map_setipport), 2690 },
+{ HP_POP(map->eraseipport), HP_POP2(HP_map_eraseipport), 2692 },
+{ HP_POP(map->eraseallipport), HP_POP2(HP_map_eraseallipport), 2694 },
+{ HP_POP(map->addiddb), HP_POP2(HP_map_addiddb), 2696 },
+{ HP_POP(map->deliddb), HP_POP2(HP_map_deliddb), 2698 },
+{ HP_POP(map->nick2sd), HP_POP2(HP_map_nick2sd), 2700 },
+{ HP_POP(map->getmob_boss), HP_POP2(HP_map_getmob_boss), 2702 },
+{ HP_POP(map->id2boss), HP_POP2(HP_map_id2boss), 2704 },
+{ HP_POP(map->reloadnpc), HP_POP2(HP_map_reloadnpc), 2706 },
+{ HP_POP(map->check_dir), HP_POP2(HP_map_check_dir), 2708 },
+{ HP_POP(map->calc_dir), HP_POP2(HP_map_calc_dir), 2710 },
+{ HP_POP(map->random_dir), HP_POP2(HP_map_random_dir), 2712 },
+{ HP_POP(map->cleanup_sub), HP_POP2(HP_map_cleanup_sub), 2714 },
+{ HP_POP(map->delmap), HP_POP2(HP_map_delmap), 2716 },
+{ HP_POP(map->flags_init), HP_POP2(HP_map_flags_init), 2718 },
+{ HP_POP(map->iwall_set), HP_POP2(HP_map_iwall_set), 2720 },
+{ HP_POP(map->iwall_get), HP_POP2(HP_map_iwall_get), 2722 },
+{ HP_POP(map->iwall_remove), HP_POP2(HP_map_iwall_remove), 2724 },
+{ HP_POP(map->addmobtolist), HP_POP2(HP_map_addmobtolist), 2726 },
+{ HP_POP(map->spawnmobs), HP_POP2(HP_map_spawnmobs), 2728 },
+{ HP_POP(map->removemobs), HP_POP2(HP_map_removemobs), 2730 },
+{ HP_POP(map->addmap2db), HP_POP2(HP_map_addmap2db), 2732 },
+{ HP_POP(map->removemapdb), HP_POP2(HP_map_removemapdb), 2734 },
+{ HP_POP(map->clean), HP_POP2(HP_map_clean), 2736 },
+{ HP_POP(map->do_shutdown), HP_POP2(HP_map_do_shutdown), 2738 },
+{ HP_POP(map->freeblock_timer), HP_POP2(HP_map_freeblock_timer), 2740 },
+{ HP_POP(map->searchrandfreecell), HP_POP2(HP_map_searchrandfreecell), 2742 },
+{ HP_POP(map->count_sub), HP_POP2(HP_map_count_sub), 2744 },
+{ HP_POP(map->create_charid2nick), HP_POP2(HP_map_create_charid2nick), 2746 },
+{ HP_POP(map->removemobs_sub), HP_POP2(HP_map_removemobs_sub), 2748 },
+{ HP_POP(map->gat2cell), HP_POP2(HP_map_gat2cell), 2750 },
+{ HP_POP(map->cell2gat), HP_POP2(HP_map_cell2gat), 2752 },
+{ HP_POP(map->getcellp), HP_POP2(HP_map_getcellp), 2754 },
+{ HP_POP(map->setcell), HP_POP2(HP_map_setcell), 2756 },
+{ HP_POP(map->sub_getcellp), HP_POP2(HP_map_sub_getcellp), 2758 },
+{ HP_POP(map->sub_setcell), HP_POP2(HP_map_sub_setcell), 2760 },
+{ HP_POP(map->iwall_nextxy), HP_POP2(HP_map_iwall_nextxy), 2762 },
+{ HP_POP(map->create_map_data_other_server), HP_POP2(HP_map_create_map_data_other_server), 2764 },
+{ HP_POP(map->eraseallipport_sub), HP_POP2(HP_map_eraseallipport_sub), 2766 },
+{ HP_POP(map->init_mapcache), HP_POP2(HP_map_init_mapcache), 2768 },
+{ HP_POP(map->readfromcache), HP_POP2(HP_map_readfromcache), 2770 },
+{ HP_POP(map->addmap), HP_POP2(HP_map_addmap), 2772 },
+{ HP_POP(map->delmapid), HP_POP2(HP_map_delmapid), 2774 },
+{ HP_POP(map->zone_db_clear), HP_POP2(HP_map_zone_db_clear), 2776 },
+{ HP_POP(map->list_final), HP_POP2(HP_map_list_final), 2778 },
+{ HP_POP(map->waterheight), HP_POP2(HP_map_waterheight), 2780 },
+{ HP_POP(map->readgat), HP_POP2(HP_map_readgat), 2782 },
+{ HP_POP(map->readallmaps), HP_POP2(HP_map_readallmaps), 2784 },
+{ HP_POP(map->config_read), HP_POP2(HP_map_config_read), 2786 },
+{ HP_POP(map->config_read_sub), HP_POP2(HP_map_config_read_sub), 2788 },
+{ HP_POP(map->reloadnpc_sub), HP_POP2(HP_map_reloadnpc_sub), 2790 },
+{ HP_POP(map->inter_config_read), HP_POP2(HP_map_inter_config_read), 2792 },
+{ HP_POP(map->sql_init), HP_POP2(HP_map_sql_init), 2794 },
+{ HP_POP(map->sql_close), HP_POP2(HP_map_sql_close), 2796 },
+{ HP_POP(map->zone_mf_cache), HP_POP2(HP_map_zone_mf_cache), 2798 },
+{ HP_POP(map->zone_str2itemid), HP_POP2(HP_map_zone_str2itemid), 2800 },
+{ HP_POP(map->zone_str2skillid), HP_POP2(HP_map_zone_str2skillid), 2802 },
+{ HP_POP(map->zone_bl_type), HP_POP2(HP_map_zone_bl_type), 2804 },
+{ HP_POP(map->read_zone_db), HP_POP2(HP_map_read_zone_db), 2806 },
+{ HP_POP(map->db_final), HP_POP2(HP_map_db_final), 2808 },
+{ HP_POP(map->nick_db_final), HP_POP2(HP_map_nick_db_final), 2810 },
+{ HP_POP(map->cleanup_db_sub), HP_POP2(HP_map_cleanup_db_sub), 2812 },
+{ HP_POP(map->abort_sub), HP_POP2(HP_map_abort_sub), 2814 },
+{ HP_POP(map->helpscreen), HP_POP2(HP_map_helpscreen), 2816 },
+{ HP_POP(map->versionscreen), HP_POP2(HP_map_versionscreen), 2818 },
+{ HP_POP(map->arg_next_value), HP_POP2(HP_map_arg_next_value), 2820 },
+{ HP_POP(map->addblcell), HP_POP2(HP_map_addblcell), 2822 },
+{ HP_POP(map->delblcell), HP_POP2(HP_map_delblcell), 2824 },
+/* mapit */
+{ HP_POP(mapit->alloc), HP_POP2(HP_mapit_alloc), 2826 },
+{ HP_POP(mapit->free), HP_POP2(HP_mapit_free), 2828 },
+{ HP_POP(mapit->first), HP_POP2(HP_mapit_first), 2830 },
+{ HP_POP(mapit->last), HP_POP2(HP_mapit_last), 2832 },
+{ HP_POP(mapit->next), HP_POP2(HP_mapit_next), 2834 },
+{ HP_POP(mapit->prev), HP_POP2(HP_mapit_prev), 2836 },
+{ HP_POP(mapit->exists), HP_POP2(HP_mapit_exists), 2838 },
+/* mapreg */
+{ HP_POP(mapreg->init), HP_POP2(HP_mapreg_init), 2840 },
+{ HP_POP(mapreg->final), HP_POP2(HP_mapreg_final), 2842 },
+{ HP_POP(mapreg->readreg), HP_POP2(HP_mapreg_readreg), 2844 },
+{ HP_POP(mapreg->readregstr), HP_POP2(HP_mapreg_readregstr), 2846 },
+{ HP_POP(mapreg->setreg), HP_POP2(HP_mapreg_setreg), 2848 },
+{ HP_POP(mapreg->setregstr), HP_POP2(HP_mapreg_setregstr), 2850 },
+{ HP_POP(mapreg->load), HP_POP2(HP_mapreg_load), 2852 },
+{ HP_POP(mapreg->save), HP_POP2(HP_mapreg_save), 2854 },
+{ HP_POP(mapreg->save_timer), HP_POP2(HP_mapreg_save_timer), 2856 },
+{ HP_POP(mapreg->reload), HP_POP2(HP_mapreg_reload), 2858 },
+{ HP_POP(mapreg->config_read), HP_POP2(HP_mapreg_config_read), 2860 },
+/* mercenary */
+{ HP_POP(mercenary->init), HP_POP2(HP_mercenary_init), 2862 },
+{ HP_POP(mercenary->class), HP_POP2(HP_mercenary_class), 2864 },
+{ HP_POP(mercenary->get_viewdata), HP_POP2(HP_mercenary_get_viewdata), 2866 },
+{ HP_POP(mercenary->create), HP_POP2(HP_mercenary_create), 2868 },
+{ HP_POP(mercenary->data_received), HP_POP2(HP_mercenary_data_received), 2870 },
+{ HP_POP(mercenary->save), HP_POP2(HP_mercenary_save), 2872 },
+{ HP_POP(mercenary->heal), HP_POP2(HP_mercenary_heal), 2874 },
+{ HP_POP(mercenary->dead), HP_POP2(HP_mercenary_dead), 2876 },
+{ HP_POP(mercenary->delete), HP_POP2(HP_mercenary_delete), 2878 },
+{ HP_POP(mercenary->contract_stop), HP_POP2(HP_mercenary_contract_stop), 2880 },
+{ HP_POP(mercenary->get_lifetime), HP_POP2(HP_mercenary_get_lifetime), 2882 },
+{ HP_POP(mercenary->get_guild), HP_POP2(HP_mercenary_get_guild), 2884 },
+{ HP_POP(mercenary->get_faith), HP_POP2(HP_mercenary_get_faith), 2886 },
+{ HP_POP(mercenary->set_faith), HP_POP2(HP_mercenary_set_faith), 2888 },
+{ HP_POP(mercenary->get_calls), HP_POP2(HP_mercenary_get_calls), 2890 },
+{ HP_POP(mercenary->set_calls), HP_POP2(HP_mercenary_set_calls), 2892 },
+{ HP_POP(mercenary->kills), HP_POP2(HP_mercenary_kills), 2894 },
+{ HP_POP(mercenary->checkskill), HP_POP2(HP_mercenary_checkskill), 2896 },
+{ HP_POP(mercenary->read_db), HP_POP2(HP_mercenary_read_db), 2898 },
+{ HP_POP(mercenary->read_skilldb), HP_POP2(HP_mercenary_read_skilldb), 2900 },
+{ HP_POP(mercenary->killbonus), HP_POP2(HP_mercenary_killbonus), 2902 },
+{ HP_POP(mercenary->search_index), HP_POP2(HP_mercenary_search_index), 2904 },
+{ HP_POP(mercenary->contract_end_timer), HP_POP2(HP_mercenary_contract_end_timer), 2906 },
+{ HP_POP(mercenary->read_db_sub), HP_POP2(HP_mercenary_read_db_sub), 2908 },
+{ HP_POP(mercenary->read_skill_db_sub), HP_POP2(HP_mercenary_read_skill_db_sub), 2910 },
+/* mob */
+{ HP_POP(mob->init), HP_POP2(HP_mob_init), 2912 },
+{ HP_POP(mob->final), HP_POP2(HP_mob_final), 2914 },
+{ HP_POP(mob->reload), HP_POP2(HP_mob_reload), 2916 },
+{ HP_POP(mob->db), HP_POP2(HP_mob_db), 2918 },
+{ HP_POP(mob->chat), HP_POP2(HP_mob_chat), 2920 },
+{ HP_POP(mob->makedummymobdb), HP_POP2(HP_mob_makedummymobdb), 2922 },
+{ HP_POP(mob->spawn_guardian_sub), HP_POP2(HP_mob_spawn_guardian_sub), 2924 },
+{ HP_POP(mob->skill_id2skill_idx), HP_POP2(HP_mob_skill_id2skill_idx), 2926 },
+{ HP_POP(mob->db_searchname), HP_POP2(HP_mob_db_searchname), 2928 },
+{ HP_POP(mob->db_searchname_array_sub), HP_POP2(HP_mob_db_searchname_array_sub), 2930 },
+{ HP_POP(mob->mvptomb_create), HP_POP2(HP_mob_mvptomb_create), 2932 },
+{ HP_POP(mob->mvptomb_destroy), HP_POP2(HP_mob_mvptomb_destroy), 2934 },
+{ HP_POP(mob->db_searchname_array), HP_POP2(HP_mob_db_searchname_array), 2936 },
+{ HP_POP(mob->db_checkid), HP_POP2(HP_mob_db_checkid), 2938 },
+{ HP_POP(mob->get_viewdata), HP_POP2(HP_mob_get_viewdata), 2940 },
+{ HP_POP(mob->parse_dataset), HP_POP2(HP_mob_parse_dataset), 2942 },
+{ HP_POP(mob->spawn_dataset), HP_POP2(HP_mob_spawn_dataset), 2944 },
+{ HP_POP(mob->get_random_id), HP_POP2(HP_mob_get_random_id), 2946 },
+{ HP_POP(mob->ksprotected), HP_POP2(HP_mob_ksprotected), 2948 },
+{ HP_POP(mob->once_spawn_sub), HP_POP2(HP_mob_once_spawn_sub), 2950 },
+{ HP_POP(mob->once_spawn), HP_POP2(HP_mob_once_spawn), 2952 },
+{ HP_POP(mob->once_spawn_area), HP_POP2(HP_mob_once_spawn_area), 2954 },
+{ HP_POP(mob->spawn_guardian), HP_POP2(HP_mob_spawn_guardian), 2956 },
+{ HP_POP(mob->spawn_bg), HP_POP2(HP_mob_spawn_bg), 2958 },
+{ HP_POP(mob->can_reach), HP_POP2(HP_mob_can_reach), 2960 },
+{ HP_POP(mob->linksearch), HP_POP2(HP_mob_linksearch), 2962 },
+{ HP_POP(mob->delayspawn), HP_POP2(HP_mob_delayspawn), 2964 },
+{ HP_POP(mob->setdelayspawn), HP_POP2(HP_mob_setdelayspawn), 2966 },
+{ HP_POP(mob->count_sub), HP_POP2(HP_mob_count_sub), 2968 },
+{ HP_POP(mob->spawn), HP_POP2(HP_mob_spawn), 2970 },
+{ HP_POP(mob->can_changetarget), HP_POP2(HP_mob_can_changetarget), 2972 },
+{ HP_POP(mob->target), HP_POP2(HP_mob_target), 2974 },
+{ HP_POP(mob->ai_sub_hard_activesearch), HP_POP2(HP_mob_ai_sub_hard_activesearch), 2976 },
+{ HP_POP(mob->ai_sub_hard_changechase), HP_POP2(HP_mob_ai_sub_hard_changechase), 2978 },
+{ HP_POP(mob->ai_sub_hard_bg_ally), HP_POP2(HP_mob_ai_sub_hard_bg_ally), 2980 },
+{ HP_POP(mob->ai_sub_hard_lootsearch), HP_POP2(HP_mob_ai_sub_hard_lootsearch), 2982 },
+{ HP_POP(mob->warpchase_sub), HP_POP2(HP_mob_warpchase_sub), 2984 },
+{ HP_POP(mob->ai_sub_hard_slavemob), HP_POP2(HP_mob_ai_sub_hard_slavemob), 2986 },
+{ HP_POP(mob->unlocktarget), HP_POP2(HP_mob_unlocktarget), 2988 },
+{ HP_POP(mob->randomwalk), HP_POP2(HP_mob_randomwalk), 2990 },
+{ HP_POP(mob->warpchase), HP_POP2(HP_mob_warpchase), 2992 },
+{ HP_POP(mob->ai_sub_hard), HP_POP2(HP_mob_ai_sub_hard), 2994 },
+{ HP_POP(mob->ai_sub_hard_timer), HP_POP2(HP_mob_ai_sub_hard_timer), 2996 },
+{ HP_POP(mob->ai_sub_foreachclient), HP_POP2(HP_mob_ai_sub_foreachclient), 2998 },
+{ HP_POP(mob->ai_sub_lazy), HP_POP2(HP_mob_ai_sub_lazy), 3000 },
+{ HP_POP(mob->ai_lazy), HP_POP2(HP_mob_ai_lazy), 3002 },
+{ HP_POP(mob->ai_hard), HP_POP2(HP_mob_ai_hard), 3004 },
+{ HP_POP(mob->setdropitem), HP_POP2(HP_mob_setdropitem), 3006 },
+{ HP_POP(mob->setlootitem), HP_POP2(HP_mob_setlootitem), 3008 },
+{ HP_POP(mob->delay_item_drop), HP_POP2(HP_mob_delay_item_drop), 3010 },
+{ HP_POP(mob->item_drop), HP_POP2(HP_mob_item_drop), 3012 },
+{ HP_POP(mob->timer_delete), HP_POP2(HP_mob_timer_delete), 3014 },
+{ HP_POP(mob->deleteslave_sub), HP_POP2(HP_mob_deleteslave_sub), 3016 },
+{ HP_POP(mob->deleteslave), HP_POP2(HP_mob_deleteslave), 3018 },
+{ HP_POP(mob->respawn), HP_POP2(HP_mob_respawn), 3020 },
+{ HP_POP(mob->log_damage), HP_POP2(HP_mob_log_damage), 3022 },
+{ HP_POP(mob->damage), HP_POP2(HP_mob_damage), 3024 },
+{ HP_POP(mob->dead), HP_POP2(HP_mob_dead), 3026 },
+{ HP_POP(mob->revive), HP_POP2(HP_mob_revive), 3028 },
+{ HP_POP(mob->guardian_guildchange), HP_POP2(HP_mob_guardian_guildchange), 3030 },
+{ HP_POP(mob->random_class), HP_POP2(HP_mob_random_class), 3032 },
+{ HP_POP(mob->class_change), HP_POP2(HP_mob_class_change), 3034 },
+{ HP_POP(mob->heal), HP_POP2(HP_mob_heal), 3036 },
+{ HP_POP(mob->warpslave_sub), HP_POP2(HP_mob_warpslave_sub), 3038 },
+{ HP_POP(mob->warpslave), HP_POP2(HP_mob_warpslave), 3040 },
+{ HP_POP(mob->countslave_sub), HP_POP2(HP_mob_countslave_sub), 3042 },
+{ HP_POP(mob->countslave), HP_POP2(HP_mob_countslave), 3044 },
+{ HP_POP(mob->summonslave), HP_POP2(HP_mob_summonslave), 3046 },
+{ HP_POP(mob->getfriendhprate_sub), HP_POP2(HP_mob_getfriendhprate_sub), 3048 },
+{ HP_POP(mob->getfriendhprate), HP_POP2(HP_mob_getfriendhprate), 3050 },
+{ HP_POP(mob->getmasterhpltmaxrate), HP_POP2(HP_mob_getmasterhpltmaxrate), 3052 },
+{ HP_POP(mob->getfriendstatus_sub), HP_POP2(HP_mob_getfriendstatus_sub), 3054 },
+{ HP_POP(mob->getfriendstatus), HP_POP2(HP_mob_getfriendstatus), 3056 },
+{ HP_POP(mob->skill_use), HP_POP2(HP_mob_skill_use), 3058 },
+{ HP_POP(mob->skill_event), HP_POP2(HP_mob_skill_event), 3060 },
+{ HP_POP(mob->is_clone), HP_POP2(HP_mob_is_clone), 3062 },
+{ HP_POP(mob->clone_spawn), HP_POP2(HP_mob_clone_spawn), 3064 },
+{ HP_POP(mob->clone_delete), HP_POP2(HP_mob_clone_delete), 3066 },
+{ HP_POP(mob->drop_adjust), HP_POP2(HP_mob_drop_adjust), 3068 },
+{ HP_POP(mob->item_dropratio_adjust), HP_POP2(HP_mob_item_dropratio_adjust), 3070 },
+{ HP_POP(mob->parse_dbrow), HP_POP2(HP_mob_parse_dbrow), 3072 },
+{ HP_POP(mob->readdb_sub), HP_POP2(HP_mob_readdb_sub), 3074 },
+{ HP_POP(mob->readdb), HP_POP2(HP_mob_readdb), 3076 },
+{ HP_POP(mob->read_sqldb), HP_POP2(HP_mob_read_sqldb), 3078 },
+{ HP_POP(mob->readdb_mobavail), HP_POP2(HP_mob_readdb_mobavail), 3080 },
+{ HP_POP(mob->read_randommonster), HP_POP2(HP_mob_read_randommonster), 3082 },
+{ HP_POP(mob->parse_row_chatdb), HP_POP2(HP_mob_parse_row_chatdb), 3084 },
+{ HP_POP(mob->readchatdb), HP_POP2(HP_mob_readchatdb), 3086 },
+{ HP_POP(mob->parse_row_mobskilldb), HP_POP2(HP_mob_parse_row_mobskilldb), 3088 },
+{ HP_POP(mob->readskilldb), HP_POP2(HP_mob_readskilldb), 3090 },
+{ HP_POP(mob->read_sqlskilldb), HP_POP2(HP_mob_read_sqlskilldb), 3092 },
+{ HP_POP(mob->readdb_race2), HP_POP2(HP_mob_readdb_race2), 3094 },
+{ HP_POP(mob->readdb_itemratio), HP_POP2(HP_mob_readdb_itemratio), 3096 },
+{ HP_POP(mob->load), HP_POP2(HP_mob_load), 3098 },
+{ HP_POP(mob->clear_spawninfo), HP_POP2(HP_mob_clear_spawninfo), 3100 },
+/* npc */
+{ HP_POP(npc->init), HP_POP2(HP_npc_init), 3102 },
+{ HP_POP(npc->final), HP_POP2(HP_npc_final), 3104 },
+{ HP_POP(npc->get_new_npc_id), HP_POP2(HP_npc_get_new_npc_id), 3106 },
+{ HP_POP(npc->get_viewdata), HP_POP2(HP_npc_get_viewdata), 3108 },
+{ HP_POP(npc->isnear_sub), HP_POP2(HP_npc_isnear_sub), 3110 },
+{ HP_POP(npc->isnear), HP_POP2(HP_npc_isnear), 3112 },
+{ HP_POP(npc->ontouch_event), HP_POP2(HP_npc_ontouch_event), 3114 },
+{ HP_POP(npc->ontouch2_event), HP_POP2(HP_npc_ontouch2_event), 3116 },
+{ HP_POP(npc->enable_sub), HP_POP2(HP_npc_enable_sub), 3118 },
+{ HP_POP(npc->enable), HP_POP2(HP_npc_enable), 3120 },
+{ HP_POP(npc->name2id), HP_POP2(HP_npc_name2id), 3122 },
+{ HP_POP(npc->event_dequeue), HP_POP2(HP_npc_event_dequeue), 3124 },
+{ HP_POP(npc->event_export_create), HP_POP2(HP_npc_event_export_create), 3126 },
+{ HP_POP(npc->event_export), HP_POP2(HP_npc_event_export), 3128 },
+{ HP_POP(npc->event_sub), HP_POP2(HP_npc_event_sub), 3130 },
+{ HP_POP(npc->event_doall_sub), HP_POP2(HP_npc_event_doall_sub), 3132 },
+{ HP_POP(npc->event_do), HP_POP2(HP_npc_event_do), 3134 },
+{ HP_POP(npc->event_doall_id), HP_POP2(HP_npc_event_doall_id), 3136 },
+{ HP_POP(npc->event_doall), HP_POP2(HP_npc_event_doall), 3138 },
+{ HP_POP(npc->event_do_clock), HP_POP2(HP_npc_event_do_clock), 3140 },
+{ HP_POP(npc->event_do_oninit), HP_POP2(HP_npc_event_do_oninit), 3142 },
+{ HP_POP(npc->timerevent_export), HP_POP2(HP_npc_timerevent_export), 3144 },
+{ HP_POP(npc->timerevent), HP_POP2(HP_npc_timerevent), 3146 },
+{ HP_POP(npc->timerevent_start), HP_POP2(HP_npc_timerevent_start), 3148 },
+{ HP_POP(npc->timerevent_stop), HP_POP2(HP_npc_timerevent_stop), 3150 },
+{ HP_POP(npc->timerevent_quit), HP_POP2(HP_npc_timerevent_quit), 3152 },
+{ HP_POP(npc->gettimerevent_tick), HP_POP2(HP_npc_gettimerevent_tick), 3154 },
+{ HP_POP(npc->settimerevent_tick), HP_POP2(HP_npc_settimerevent_tick), 3156 },
+{ HP_POP(npc->event), HP_POP2(HP_npc_event), 3158 },
+{ HP_POP(npc->touch_areanpc_sub), HP_POP2(HP_npc_touch_areanpc_sub), 3160 },
+{ HP_POP(npc->touchnext_areanpc), HP_POP2(HP_npc_touchnext_areanpc), 3162 },
+{ HP_POP(npc->touch_areanpc), HP_POP2(HP_npc_touch_areanpc), 3164 },
+{ HP_POP(npc->touch_areanpc2), HP_POP2(HP_npc_touch_areanpc2), 3166 },
+{ HP_POP(npc->check_areanpc), HP_POP2(HP_npc_check_areanpc), 3168 },
+{ HP_POP(npc->checknear), HP_POP2(HP_npc_checknear), 3170 },
+{ HP_POP(npc->globalmessage), HP_POP2(HP_npc_globalmessage), 3172 },
+{ HP_POP(npc->run_tomb), HP_POP2(HP_npc_run_tomb), 3174 },
+{ HP_POP(npc->click), HP_POP2(HP_npc_click), 3176 },
+{ HP_POP(npc->scriptcont), HP_POP2(HP_npc_scriptcont), 3178 },
+{ HP_POP(npc->buysellsel), HP_POP2(HP_npc_buysellsel), 3180 },
+{ HP_POP(npc->cashshop_buylist), HP_POP2(HP_npc_cashshop_buylist), 3182 },
+{ HP_POP(npc->buylist_sub), HP_POP2(HP_npc_buylist_sub), 3184 },
+{ HP_POP(npc->cashshop_buy), HP_POP2(HP_npc_cashshop_buy), 3186 },
+{ HP_POP(npc->buylist), HP_POP2(HP_npc_buylist), 3188 },
+{ HP_POP(npc->selllist_sub), HP_POP2(HP_npc_selllist_sub), 3190 },
+{ HP_POP(npc->selllist), HP_POP2(HP_npc_selllist), 3192 },
+{ HP_POP(npc->remove_map), HP_POP2(HP_npc_remove_map), 3194 },
+{ HP_POP(npc->unload_ev), HP_POP2(HP_npc_unload_ev), 3196 },
+{ HP_POP(npc->unload_ev_label), HP_POP2(HP_npc_unload_ev_label), 3198 },
+{ HP_POP(npc->unload_dup_sub), HP_POP2(HP_npc_unload_dup_sub), 3200 },
+{ HP_POP(npc->unload_duplicates), HP_POP2(HP_npc_unload_duplicates), 3202 },
+{ HP_POP(npc->unload), HP_POP2(HP_npc_unload), 3204 },
+{ HP_POP(npc->clearsrcfile), HP_POP2(HP_npc_clearsrcfile), 3206 },
+{ HP_POP(npc->addsrcfile), HP_POP2(HP_npc_addsrcfile), 3208 },
+{ HP_POP(npc->delsrcfile), HP_POP2(HP_npc_delsrcfile), 3210 },
+{ HP_POP(npc->parsename), HP_POP2(HP_npc_parsename), 3212 },
+{ HP_POP(npc->add_warp), HP_POP2(HP_npc_add_warp), 3214 },
+{ HP_POP(npc->parse_warp), HP_POP2(HP_npc_parse_warp), 3216 },
+{ HP_POP(npc->parse_shop), HP_POP2(HP_npc_parse_shop), 3218 },
+{ HP_POP(npc->convertlabel_db), HP_POP2(HP_npc_convertlabel_db), 3220 },
+{ HP_POP(npc->skip_script), HP_POP2(HP_npc_skip_script), 3222 },
+{ HP_POP(npc->parse_script), HP_POP2(HP_npc_parse_script), 3224 },
+{ HP_POP(npc->parse_duplicate), HP_POP2(HP_npc_parse_duplicate), 3226 },
+{ HP_POP(npc->duplicate4instance), HP_POP2(HP_npc_duplicate4instance), 3228 },
+{ HP_POP(npc->setcells), HP_POP2(HP_npc_setcells), 3230 },
+{ HP_POP(npc->unsetcells_sub), HP_POP2(HP_npc_unsetcells_sub), 3232 },
+{ HP_POP(npc->unsetcells), HP_POP2(HP_npc_unsetcells), 3234 },
+{ HP_POP(npc->movenpc), HP_POP2(HP_npc_movenpc), 3236 },
+{ HP_POP(npc->setdisplayname), HP_POP2(HP_npc_setdisplayname), 3238 },
+{ HP_POP(npc->setclass), HP_POP2(HP_npc_setclass), 3240 },
+{ HP_POP(npc->do_atcmd_event), HP_POP2(HP_npc_do_atcmd_event), 3242 },
+{ HP_POP(npc->parse_function), HP_POP2(HP_npc_parse_function), 3244 },
+{ HP_POP(npc->parse_mob2), HP_POP2(HP_npc_parse_mob2), 3246 },
+{ HP_POP(npc->parse_mob), HP_POP2(HP_npc_parse_mob), 3248 },
+{ HP_POP(npc->parse_mapflag), HP_POP2(HP_npc_parse_mapflag), 3250 },
+{ HP_POP(npc->parsesrcfile), HP_POP2(HP_npc_parsesrcfile), 3252 },
+{ HP_POP(npc->script_event), HP_POP2(HP_npc_script_event), 3254 },
+{ HP_POP(npc->read_event_script), HP_POP2(HP_npc_read_event_script), 3256 },
+{ HP_POP(npc->path_db_clear_sub), HP_POP2(HP_npc_path_db_clear_sub), 3258 },
+{ HP_POP(npc->ev_label_db_clear_sub), HP_POP2(HP_npc_ev_label_db_clear_sub), 3260 },
+{ HP_POP(npc->reload), HP_POP2(HP_npc_reload), 3262 },
+{ HP_POP(npc->unloadfile), HP_POP2(HP_npc_unloadfile), 3264 },
+{ HP_POP(npc->do_clear_npc), HP_POP2(HP_npc_do_clear_npc), 3266 },
+{ HP_POP(npc->debug_warps_sub), HP_POP2(HP_npc_debug_warps_sub), 3268 },
+{ HP_POP(npc->debug_warps), HP_POP2(HP_npc_debug_warps), 3270 },
+{ HP_POP(npc->secure_timeout_timer), HP_POP2(HP_npc_secure_timeout_timer), 3272 },
+/* party */
+{ HP_POP(party->init), HP_POP2(HP_party_init), 3274 },
+{ HP_POP(party->final), HP_POP2(HP_party_final), 3276 },
+{ HP_POP(party->search), HP_POP2(HP_party_search), 3278 },
+{ HP_POP(party->searchname), HP_POP2(HP_party_searchname), 3280 },
+{ HP_POP(party->getmemberid), HP_POP2(HP_party_getmemberid), 3282 },
+{ HP_POP(party->getavailablesd), HP_POP2(HP_party_getavailablesd), 3284 },
+{ HP_POP(party->create), HP_POP2(HP_party_create), 3286 },
+{ HP_POP(party->created), HP_POP2(HP_party_created), 3288 },
+{ HP_POP(party->request_info), HP_POP2(HP_party_request_info), 3290 },
+{ HP_POP(party->invite), HP_POP2(HP_party_invite), 3292 },
+{ HP_POP(party->member_joined), HP_POP2(HP_party_member_joined), 3294 },
+{ HP_POP(party->member_added), HP_POP2(HP_party_member_added), 3296 },
+{ HP_POP(party->leave), HP_POP2(HP_party_leave), 3298 },
+{ HP_POP(party->removemember), HP_POP2(HP_party_removemember), 3300 },
+{ HP_POP(party->member_withdraw), HP_POP2(HP_party_member_withdraw), 3302 },
+{ HP_POP(party->reply_invite), HP_POP2(HP_party_reply_invite), 3304 },
+{ HP_POP(party->recv_noinfo), HP_POP2(HP_party_recv_noinfo), 3306 },
+{ HP_POP(party->recv_info), HP_POP2(HP_party_recv_info), 3308 },
+{ HP_POP(party->recv_movemap), HP_POP2(HP_party_recv_movemap), 3310 },
+{ HP_POP(party->broken), HP_POP2(HP_party_broken), 3312 },
+{ HP_POP(party->optionchanged), HP_POP2(HP_party_optionchanged), 3314 },
+{ HP_POP(party->changeoption), HP_POP2(HP_party_changeoption), 3316 },
+{ HP_POP(party->changeleader), HP_POP2(HP_party_changeleader), 3318 },
+{ HP_POP(party->send_movemap), HP_POP2(HP_party_send_movemap), 3320 },
+{ HP_POP(party->send_levelup), HP_POP2(HP_party_send_levelup), 3322 },
+{ HP_POP(party->send_logout), HP_POP2(HP_party_send_logout), 3324 },
+{ HP_POP(party->send_message), HP_POP2(HP_party_send_message), 3326 },
+{ HP_POP(party->recv_message), HP_POP2(HP_party_recv_message), 3328 },
+{ HP_POP(party->skill_check), HP_POP2(HP_party_skill_check), 3330 },
+{ HP_POP(party->send_xy_clear), HP_POP2(HP_party_send_xy_clear), 3332 },
+{ HP_POP(party->exp_share), HP_POP2(HP_party_exp_share), 3334 },
+{ HP_POP(party->share_loot), HP_POP2(HP_party_share_loot), 3336 },
+{ HP_POP(party->send_dot_remove), HP_POP2(HP_party_send_dot_remove), 3338 },
+{ HP_POP(party->sub_count), HP_POP2(HP_party_sub_count), 3340 },
+{ HP_POP(party->booking_register), HP_POP2(HP_party_booking_register), 3342 },
+{ HP_POP(party->booking_update), HP_POP2(HP_party_booking_update), 3344 },
+{ HP_POP(party->booking_search), HP_POP2(HP_party_booking_search), 3346 },
+{ HP_POP(party->recruit_register), HP_POP2(HP_party_recruit_register), 3348 },
+{ HP_POP(party->recruit_update), HP_POP2(HP_party_recruit_update), 3350 },
+{ HP_POP(party->recruit_search), HP_POP2(HP_party_recruit_search), 3352 },
+{ HP_POP(party->booking_delete), HP_POP2(HP_party_booking_delete), 3354 },
+{ HP_POP(party->vforeachsamemap), HP_POP2(HP_party_vforeachsamemap), 3356 },
+{ HP_POP(party->send_xy_timer), HP_POP2(HP_party_send_xy_timer), 3358 },
+{ HP_POP(party->fill_member), HP_POP2(HP_party_fill_member), 3360 },
+{ HP_POP(party->sd_check), HP_POP2(HP_party_sd_check), 3362 },
+{ HP_POP(party->check_state), HP_POP2(HP_party_check_state), 3364 },
+{ HP_POP(party->create_booking_data), HP_POP2(HP_party_create_booking_data), 3366 },
+{ HP_POP(party->db_final), HP_POP2(HP_party_db_final), 3368 },
+/* path */
+{ HP_POP(path->blownpos), HP_POP2(HP_path_blownpos), 3370 },
+{ HP_POP(path->search), HP_POP2(HP_path_search), 3372 },
+{ HP_POP(path->search_long), HP_POP2(HP_path_search_long), 3374 },
+{ HP_POP(path->check_distance), HP_POP2(HP_path_check_distance), 3376 },
+{ HP_POP(path->distance), HP_POP2(HP_path_distance), 3378 },
+/* pc */
+{ HP_POP(pc->init), HP_POP2(HP_pc_init), 3380 },
+{ HP_POP(pc->final), HP_POP2(HP_pc_final), 3382 },
+{ HP_POP(pc->get_dummy_sd), HP_POP2(HP_pc_get_dummy_sd), 3384 },
+{ HP_POP(pc->class2idx), HP_POP2(HP_pc_class2idx), 3386 },
+{ HP_POP(pc->get_group_level), HP_POP2(HP_pc_get_group_level), 3388 },
+{ HP_POP(pc->can_give_items), HP_POP2(HP_pc_can_give_items), 3390 },
+{ HP_POP(pc->can_use_command), HP_POP2(HP_pc_can_use_command), 3392 },
+{ HP_POP(pc->has_permission), HP_POP2(HP_pc_has_permission), 3394 },
+{ HP_POP(pc->set_group), HP_POP2(HP_pc_set_group), 3396 },
+{ HP_POP(pc->should_log_commands), HP_POP2(HP_pc_should_log_commands), 3398 },
+{ HP_POP(pc->setrestartvalue), HP_POP2(HP_pc_setrestartvalue), 3400 },
+{ HP_POP(pc->makesavestatus), HP_POP2(HP_pc_makesavestatus), 3402 },
+{ HP_POP(pc->respawn), HP_POP2(HP_pc_respawn), 3404 },
+{ HP_POP(pc->setnewpc), HP_POP2(HP_pc_setnewpc), 3406 },
+{ HP_POP(pc->authok), HP_POP2(HP_pc_authok), 3408 },
+{ HP_POP(pc->authfail), HP_POP2(HP_pc_authfail), 3410 },
+{ HP_POP(pc->reg_received), HP_POP2(HP_pc_reg_received), 3412 },
+{ HP_POP(pc->isequip), HP_POP2(HP_pc_isequip), 3414 },
+{ HP_POP(pc->equippoint), HP_POP2(HP_pc_equippoint), 3416 },
+{ HP_POP(pc->setinventorydata), HP_POP2(HP_pc_setinventorydata), 3418 },
+{ HP_POP(pc->checkskill), HP_POP2(HP_pc_checkskill), 3420 },
+{ HP_POP(pc->checkskill2), HP_POP2(HP_pc_checkskill2), 3422 },
+{ HP_POP(pc->checkallowskill), HP_POP2(HP_pc_checkallowskill), 3424 },
+{ HP_POP(pc->checkequip), HP_POP2(HP_pc_checkequip), 3426 },
+{ HP_POP(pc->calc_skilltree), HP_POP2(HP_pc_calc_skilltree), 3428 },
+{ HP_POP(pc->calc_skilltree_normalize_job), HP_POP2(HP_pc_calc_skilltree_normalize_job), 3430 },
+{ HP_POP(pc->clean_skilltree), HP_POP2(HP_pc_clean_skilltree), 3432 },
+{ HP_POP(pc->setpos), HP_POP2(HP_pc_setpos), 3434 },
+{ HP_POP(pc->setsavepoint), HP_POP2(HP_pc_setsavepoint), 3436 },
+{ HP_POP(pc->randomwarp), HP_POP2(HP_pc_randomwarp), 3438 },
+{ HP_POP(pc->memo), HP_POP2(HP_pc_memo), 3440 },
+{ HP_POP(pc->checkadditem), HP_POP2(HP_pc_checkadditem), 3442 },
+{ HP_POP(pc->inventoryblank), HP_POP2(HP_pc_inventoryblank), 3444 },
+{ HP_POP(pc->search_inventory), HP_POP2(HP_pc_search_inventory), 3446 },
+{ HP_POP(pc->payzeny), HP_POP2(HP_pc_payzeny), 3448 },
+{ HP_POP(pc->additem), HP_POP2(HP_pc_additem), 3450 },
+{ HP_POP(pc->getzeny), HP_POP2(HP_pc_getzeny), 3452 },
+{ HP_POP(pc->delitem), HP_POP2(HP_pc_delitem), 3454 },
+{ HP_POP(pc->paycash), HP_POP2(HP_pc_paycash), 3456 },
+{ HP_POP(pc->getcash), HP_POP2(HP_pc_getcash), 3458 },
+{ HP_POP(pc->cart_additem), HP_POP2(HP_pc_cart_additem), 3460 },
+{ HP_POP(pc->cart_delitem), HP_POP2(HP_pc_cart_delitem), 3462 },
+{ HP_POP(pc->putitemtocart), HP_POP2(HP_pc_putitemtocart), 3464 },
+{ HP_POP(pc->getitemfromcart), HP_POP2(HP_pc_getitemfromcart), 3466 },
+{ HP_POP(pc->cartitem_amount), HP_POP2(HP_pc_cartitem_amount), 3468 },
+{ HP_POP(pc->takeitem), HP_POP2(HP_pc_takeitem), 3470 },
+{ HP_POP(pc->dropitem), HP_POP2(HP_pc_dropitem), 3472 },
+{ HP_POP(pc->isequipped), HP_POP2(HP_pc_isequipped), 3474 },
+{ HP_POP(pc->can_Adopt), HP_POP2(HP_pc_can_Adopt), 3476 },
+{ HP_POP(pc->adoption), HP_POP2(HP_pc_adoption), 3478 },
+{ HP_POP(pc->updateweightstatus), HP_POP2(HP_pc_updateweightstatus), 3480 },
+{ HP_POP(pc->addautobonus), HP_POP2(HP_pc_addautobonus), 3482 },
+{ HP_POP(pc->exeautobonus), HP_POP2(HP_pc_exeautobonus), 3484 },
+{ HP_POP(pc->endautobonus), HP_POP2(HP_pc_endautobonus), 3486 },
+{ HP_POP(pc->delautobonus), HP_POP2(HP_pc_delautobonus), 3488 },
+{ HP_POP(pc->bonus), HP_POP2(HP_pc_bonus), 3490 },
+{ HP_POP(pc->bonus2), HP_POP2(HP_pc_bonus2), 3492 },
+{ HP_POP(pc->bonus3), HP_POP2(HP_pc_bonus3), 3494 },
+{ HP_POP(pc->bonus4), HP_POP2(HP_pc_bonus4), 3496 },
+{ HP_POP(pc->bonus5), HP_POP2(HP_pc_bonus5), 3498 },
+{ HP_POP(pc->skill), HP_POP2(HP_pc_skill), 3500 },
+{ HP_POP(pc->insert_card), HP_POP2(HP_pc_insert_card), 3502 },
+{ HP_POP(pc->steal_item), HP_POP2(HP_pc_steal_item), 3504 },
+{ HP_POP(pc->steal_coin), HP_POP2(HP_pc_steal_coin), 3506 },
+{ HP_POP(pc->modifybuyvalue), HP_POP2(HP_pc_modifybuyvalue), 3508 },
+{ HP_POP(pc->modifysellvalue), HP_POP2(HP_pc_modifysellvalue), 3510 },
+{ HP_POP(pc->follow), HP_POP2(HP_pc_follow), 3512 },
+{ HP_POP(pc->stop_following), HP_POP2(HP_pc_stop_following), 3514 },
+{ HP_POP(pc->maxbaselv), HP_POP2(HP_pc_maxbaselv), 3516 },
+{ HP_POP(pc->maxjoblv), HP_POP2(HP_pc_maxjoblv), 3518 },
+{ HP_POP(pc->checkbaselevelup), HP_POP2(HP_pc_checkbaselevelup), 3520 },
+{ HP_POP(pc->checkjoblevelup), HP_POP2(HP_pc_checkjoblevelup), 3522 },
+{ HP_POP(pc->gainexp), HP_POP2(HP_pc_gainexp), 3524 },
+{ HP_POP(pc->nextbaseexp), HP_POP2(HP_pc_nextbaseexp), 3526 },
+{ HP_POP(pc->thisbaseexp), HP_POP2(HP_pc_thisbaseexp), 3528 },
+{ HP_POP(pc->nextjobexp), HP_POP2(HP_pc_nextjobexp), 3530 },
+{ HP_POP(pc->thisjobexp), HP_POP2(HP_pc_thisjobexp), 3532 },
+{ HP_POP(pc->gets_status_point), HP_POP2(HP_pc_gets_status_point), 3534 },
+{ HP_POP(pc->need_status_point), HP_POP2(HP_pc_need_status_point), 3536 },
+{ HP_POP(pc->statusup), HP_POP2(HP_pc_statusup), 3538 },
+{ HP_POP(pc->statusup2), HP_POP2(HP_pc_statusup2), 3540 },
+{ HP_POP(pc->skillup), HP_POP2(HP_pc_skillup), 3542 },
+{ HP_POP(pc->allskillup), HP_POP2(HP_pc_allskillup), 3544 },
+{ HP_POP(pc->resetlvl), HP_POP2(HP_pc_resetlvl), 3546 },
+{ HP_POP(pc->resetstate), HP_POP2(HP_pc_resetstate), 3548 },
+{ HP_POP(pc->resetskill), HP_POP2(HP_pc_resetskill), 3550 },
+{ HP_POP(pc->resetfeel), HP_POP2(HP_pc_resetfeel), 3552 },
+{ HP_POP(pc->resethate), HP_POP2(HP_pc_resethate), 3554 },
+{ HP_POP(pc->equipitem), HP_POP2(HP_pc_equipitem), 3556 },
+{ HP_POP(pc->unequipitem), HP_POP2(HP_pc_unequipitem), 3558 },
+{ HP_POP(pc->checkitem), HP_POP2(HP_pc_checkitem), 3560 },
+{ HP_POP(pc->useitem), HP_POP2(HP_pc_useitem), 3562 },
+{ HP_POP(pc->skillatk_bonus), HP_POP2(HP_pc_skillatk_bonus), 3564 },
+{ HP_POP(pc->skillheal_bonus), HP_POP2(HP_pc_skillheal_bonus), 3566 },
+{ HP_POP(pc->skillheal2_bonus), HP_POP2(HP_pc_skillheal2_bonus), 3568 },
+{ HP_POP(pc->damage), HP_POP2(HP_pc_damage), 3570 },
+{ HP_POP(pc->dead), HP_POP2(HP_pc_dead), 3572 },
+{ HP_POP(pc->revive), HP_POP2(HP_pc_revive), 3574 },
+{ HP_POP(pc->heal), HP_POP2(HP_pc_heal), 3576 },
+{ HP_POP(pc->itemheal), HP_POP2(HP_pc_itemheal), 3578 },
+{ HP_POP(pc->percentheal), HP_POP2(HP_pc_percentheal), 3580 },
+{ HP_POP(pc->jobchange), HP_POP2(HP_pc_jobchange), 3582 },
+{ HP_POP(pc->setoption), HP_POP2(HP_pc_setoption), 3584 },
+{ HP_POP(pc->setcart), HP_POP2(HP_pc_setcart), 3586 },
+{ HP_POP(pc->setfalcon), HP_POP2(HP_pc_setfalcon), 3588 },
+{ HP_POP(pc->setriding), HP_POP2(HP_pc_setriding), 3590 },
+{ HP_POP(pc->setmadogear), HP_POP2(HP_pc_setmadogear), 3592 },
+{ HP_POP(pc->changelook), HP_POP2(HP_pc_changelook), 3594 },
+{ HP_POP(pc->equiplookall), HP_POP2(HP_pc_equiplookall), 3596 },
+{ HP_POP(pc->readparam), HP_POP2(HP_pc_readparam), 3598 },
+{ HP_POP(pc->setparam), HP_POP2(HP_pc_setparam), 3600 },
+{ HP_POP(pc->readreg), HP_POP2(HP_pc_readreg), 3602 },
+{ HP_POP(pc->setreg), HP_POP2(HP_pc_setreg), 3604 },
+{ HP_POP(pc->readregstr), HP_POP2(HP_pc_readregstr), 3606 },
+{ HP_POP(pc->setregstr), HP_POP2(HP_pc_setregstr), 3608 },
+{ HP_POP(pc->readregistry), HP_POP2(HP_pc_readregistry), 3610 },
+{ HP_POP(pc->setregistry), HP_POP2(HP_pc_setregistry), 3612 },
+{ HP_POP(pc->readregistry_str), HP_POP2(HP_pc_readregistry_str), 3614 },
+{ HP_POP(pc->setregistry_str), HP_POP2(HP_pc_setregistry_str), 3616 },
+{ HP_POP(pc->addeventtimer), HP_POP2(HP_pc_addeventtimer), 3618 },
+{ HP_POP(pc->deleventtimer), HP_POP2(HP_pc_deleventtimer), 3620 },
+{ HP_POP(pc->cleareventtimer), HP_POP2(HP_pc_cleareventtimer), 3622 },
+{ HP_POP(pc->addeventtimercount), HP_POP2(HP_pc_addeventtimercount), 3624 },
+{ HP_POP(pc->calc_pvprank), HP_POP2(HP_pc_calc_pvprank), 3626 },
+{ HP_POP(pc->calc_pvprank_timer), HP_POP2(HP_pc_calc_pvprank_timer), 3628 },
+{ HP_POP(pc->ismarried), HP_POP2(HP_pc_ismarried), 3630 },
+{ HP_POP(pc->marriage), HP_POP2(HP_pc_marriage), 3632 },
+{ HP_POP(pc->divorce), HP_POP2(HP_pc_divorce), 3634 },
+{ HP_POP(pc->get_partner), HP_POP2(HP_pc_get_partner), 3636 },
+{ HP_POP(pc->get_father), HP_POP2(HP_pc_get_father), 3638 },
+{ HP_POP(pc->get_mother), HP_POP2(HP_pc_get_mother), 3640 },
+{ HP_POP(pc->get_child), HP_POP2(HP_pc_get_child), 3642 },
+{ HP_POP(pc->bleeding), HP_POP2(HP_pc_bleeding), 3644 },
+{ HP_POP(pc->regen), HP_POP2(HP_pc_regen), 3646 },
+{ HP_POP(pc->setstand), HP_POP2(HP_pc_setstand), 3648 },
+{ HP_POP(pc->candrop), HP_POP2(HP_pc_candrop), 3650 },
+{ HP_POP(pc->jobid2mapid), HP_POP2(HP_pc_jobid2mapid), 3652 },
+{ HP_POP(pc->mapid2jobid), HP_POP2(HP_pc_mapid2jobid), 3654 },
+{ HP_POP(pc->job_name), HP_POP2(HP_pc_job_name), 3656 },
+{ HP_POP(pc->setinvincibletimer), HP_POP2(HP_pc_setinvincibletimer), 3658 },
+{ HP_POP(pc->delinvincibletimer), HP_POP2(HP_pc_delinvincibletimer), 3660 },
+{ HP_POP(pc->addspiritball), HP_POP2(HP_pc_addspiritball), 3662 },
+{ HP_POP(pc->delspiritball), HP_POP2(HP_pc_delspiritball), 3664 },
+{ HP_POP(pc->addfame), HP_POP2(HP_pc_addfame), 3666 },
+{ HP_POP(pc->famerank), HP_POP2(HP_pc_famerank), 3668 },
+{ HP_POP(pc->set_hate_mob), HP_POP2(HP_pc_set_hate_mob), 3670 },
+{ HP_POP(pc->readdb), HP_POP2(HP_pc_readdb), 3672 },
+{ HP_POP(pc->map_day_timer), HP_POP2(HP_pc_map_day_timer), 3674 },
+{ HP_POP(pc->map_night_timer), HP_POP2(HP_pc_map_night_timer), 3676 },
+{ HP_POP(pc->inventory_rentals), HP_POP2(HP_pc_inventory_rentals), 3678 },
+{ HP_POP(pc->inventory_rental_clear), HP_POP2(HP_pc_inventory_rental_clear), 3680 },
+{ HP_POP(pc->inventory_rental_add), HP_POP2(HP_pc_inventory_rental_add), 3682 },
+{ HP_POP(pc->disguise), HP_POP2(HP_pc_disguise), 3684 },
+{ HP_POP(pc->isautolooting), HP_POP2(HP_pc_isautolooting), 3686 },
+{ HP_POP(pc->overheat), HP_POP2(HP_pc_overheat), 3688 },
+{ HP_POP(pc->banding), HP_POP2(HP_pc_banding), 3690 },
+{ HP_POP(pc->itemcd_do), HP_POP2(HP_pc_itemcd_do), 3692 },
+{ HP_POP(pc->load_combo), HP_POP2(HP_pc_load_combo), 3694 },
+{ HP_POP(pc->add_charm), HP_POP2(HP_pc_add_charm), 3696 },
+{ HP_POP(pc->del_charm), HP_POP2(HP_pc_del_charm), 3698 },
+{ HP_POP(pc->baselevelchanged), HP_POP2(HP_pc_baselevelchanged), 3700 },
+{ HP_POP(pc->level_penalty_mod), HP_POP2(HP_pc_level_penalty_mod), 3702 },
+{ HP_POP(pc->calc_skillpoint), HP_POP2(HP_pc_calc_skillpoint), 3704 },
+{ HP_POP(pc->invincible_timer), HP_POP2(HP_pc_invincible_timer), 3706 },
+{ HP_POP(pc->spiritball_timer), HP_POP2(HP_pc_spiritball_timer), 3708 },
+{ HP_POP(pc->check_banding), HP_POP2(HP_pc_check_banding), 3710 },
+{ HP_POP(pc->inventory_rental_end), HP_POP2(HP_pc_inventory_rental_end), 3712 },
+{ HP_POP(pc->check_skilltree), HP_POP2(HP_pc_check_skilltree), 3714 },
+{ HP_POP(pc->bonus_autospell), HP_POP2(HP_pc_bonus_autospell), 3716 },
+{ HP_POP(pc->bonus_autospell_onskill), HP_POP2(HP_pc_bonus_autospell_onskill), 3718 },
+{ HP_POP(pc->bonus_addeff), HP_POP2(HP_pc_bonus_addeff), 3720 },
+{ HP_POP(pc->bonus_addeff_onskill), HP_POP2(HP_pc_bonus_addeff_onskill), 3722 },
+{ HP_POP(pc->bonus_item_drop), HP_POP2(HP_pc_bonus_item_drop), 3724 },
+{ HP_POP(pc->calcexp), HP_POP2(HP_pc_calcexp), 3726 },
+{ HP_POP(pc->respawn_timer), HP_POP2(HP_pc_respawn_timer), 3728 },
+{ HP_POP(pc->jobchange_killclone), HP_POP2(HP_pc_jobchange_killclone), 3730 },
+{ HP_POP(pc->getstat), HP_POP2(HP_pc_getstat), 3732 },
+{ HP_POP(pc->setstat), HP_POP2(HP_pc_setstat), 3734 },
+{ HP_POP(pc->eventtimer), HP_POP2(HP_pc_eventtimer), 3736 },
+{ HP_POP(pc->daynight_timer_sub), HP_POP2(HP_pc_daynight_timer_sub), 3738 },
+{ HP_POP(pc->charm_timer), HP_POP2(HP_pc_charm_timer), 3740 },
+{ HP_POP(pc->readdb_levelpenalty), HP_POP2(HP_pc_readdb_levelpenalty), 3742 },
+{ HP_POP(pc->autosave), HP_POP2(HP_pc_autosave), 3744 },
+{ HP_POP(pc->follow_timer), HP_POP2(HP_pc_follow_timer), 3746 },
+{ HP_POP(pc->read_skill_tree), HP_POP2(HP_pc_read_skill_tree), 3748 },
+{ HP_POP(pc->isUseitem), HP_POP2(HP_pc_isUseitem), 3750 },
+{ HP_POP(pc->show_steal), HP_POP2(HP_pc_show_steal), 3752 },
+{ HP_POP(pc->checkcombo), HP_POP2(HP_pc_checkcombo), 3754 },
+{ HP_POP(pc->calcweapontype), HP_POP2(HP_pc_calcweapontype), 3756 },
+{ HP_POP(pc->removecombo), HP_POP2(HP_pc_removecombo), 3758 },
+/* pet */
+{ HP_POP(pet->init), HP_POP2(HP_pet_init), 3760 },
+{ HP_POP(pet->final), HP_POP2(HP_pet_final), 3762 },
+{ HP_POP(pet->hungry_val), HP_POP2(HP_pet_hungry_val), 3764 },
+{ HP_POP(pet->set_intimate), HP_POP2(HP_pet_set_intimate), 3766 },
+{ HP_POP(pet->create_egg), HP_POP2(HP_pet_create_egg), 3768 },
+{ HP_POP(pet->unlocktarget), HP_POP2(HP_pet_unlocktarget), 3770 },
+{ HP_POP(pet->attackskill), HP_POP2(HP_pet_attackskill), 3772 },
+{ HP_POP(pet->target_check), HP_POP2(HP_pet_target_check), 3774 },
+{ HP_POP(pet->sc_check), HP_POP2(HP_pet_sc_check), 3776 },
+{ HP_POP(pet->hungry), HP_POP2(HP_pet_hungry), 3778 },
+{ HP_POP(pet->search_petDB_index), HP_POP2(HP_pet_search_petDB_index), 3780 },
+{ HP_POP(pet->hungry_timer_delete), HP_POP2(HP_pet_hungry_timer_delete), 3782 },
+{ HP_POP(pet->performance), HP_POP2(HP_pet_performance), 3784 },
+{ HP_POP(pet->return_egg), HP_POP2(HP_pet_return_egg), 3786 },
+{ HP_POP(pet->data_init), HP_POP2(HP_pet_data_init), 3788 },
+{ HP_POP(pet->birth_process), HP_POP2(HP_pet_birth_process), 3790 },
+{ HP_POP(pet->recv_petdata), HP_POP2(HP_pet_recv_petdata), 3792 },
+{ HP_POP(pet->select_egg), HP_POP2(HP_pet_select_egg), 3794 },
+{ HP_POP(pet->catch_process1), HP_POP2(HP_pet_catch_process1), 3796 },
+{ HP_POP(pet->catch_process2), HP_POP2(HP_pet_catch_process2), 3798 },
+{ HP_POP(pet->get_egg), HP_POP2(HP_pet_get_egg), 3800 },
+{ HP_POP(pet->unequipitem), HP_POP2(HP_pet_unequipitem), 3802 },
+{ HP_POP(pet->food), HP_POP2(HP_pet_food), 3804 },
+{ HP_POP(pet->ai_sub_hard_lootsearch), HP_POP2(HP_pet_ai_sub_hard_lootsearch), 3806 },
+{ HP_POP(pet->menu), HP_POP2(HP_pet_menu), 3808 },
+{ HP_POP(pet->change_name), HP_POP2(HP_pet_change_name), 3810 },
+{ HP_POP(pet->change_name_ack), HP_POP2(HP_pet_change_name_ack), 3812 },
+{ HP_POP(pet->equipitem), HP_POP2(HP_pet_equipitem), 3814 },
+{ HP_POP(pet->randomwalk), HP_POP2(HP_pet_randomwalk), 3816 },
+{ HP_POP(pet->ai_sub_hard), HP_POP2(HP_pet_ai_sub_hard), 3818 },
+{ HP_POP(pet->ai_sub_foreachclient), HP_POP2(HP_pet_ai_sub_foreachclient), 3820 },
+{ HP_POP(pet->ai_hard), HP_POP2(HP_pet_ai_hard), 3822 },
+{ HP_POP(pet->delay_item_drop), HP_POP2(HP_pet_delay_item_drop), 3824 },
+{ HP_POP(pet->lootitem_drop), HP_POP2(HP_pet_lootitem_drop), 3826 },
+{ HP_POP(pet->skill_bonus_timer), HP_POP2(HP_pet_skill_bonus_timer), 3828 },
+{ HP_POP(pet->recovery_timer), HP_POP2(HP_pet_recovery_timer), 3830 },
+{ HP_POP(pet->heal_timer), HP_POP2(HP_pet_heal_timer), 3832 },
+{ HP_POP(pet->skill_support_timer), HP_POP2(HP_pet_skill_support_timer), 3834 },
+{ HP_POP(pet->read_db), HP_POP2(HP_pet_read_db), 3836 },
+/* quest */
+{ HP_POP(quest->init), HP_POP2(HP_quest_init), 3838 },
+{ HP_POP(quest->reload), HP_POP2(HP_quest_reload), 3840 },
+{ HP_POP(quest->search_db), HP_POP2(HP_quest_search_db), 3842 },
+{ HP_POP(quest->pc_login), HP_POP2(HP_quest_pc_login), 3844 },
+{ HP_POP(quest->add), HP_POP2(HP_quest_add), 3846 },
+{ HP_POP(quest->change), HP_POP2(HP_quest_change), 3848 },
+{ HP_POP(quest->delete), HP_POP2(HP_quest_delete), 3850 },
+{ HP_POP(quest->update_objective_sub), HP_POP2(HP_quest_update_objective_sub), 3852 },
+{ HP_POP(quest->update_objective), HP_POP2(HP_quest_update_objective), 3854 },
+{ HP_POP(quest->update_status), HP_POP2(HP_quest_update_status), 3856 },
+{ HP_POP(quest->check), HP_POP2(HP_quest_check), 3858 },
+{ HP_POP(quest->read_db), HP_POP2(HP_quest_read_db), 3860 },
+/* script */
+{ HP_POP(script->init), HP_POP2(HP_script_init), 3862 },
+{ HP_POP(script->final), HP_POP2(HP_script_final), 3864 },
+{ HP_POP(script->reload), HP_POP2(HP_script_reload), 3866 },
+{ HP_POP(script->parse), HP_POP2(HP_script_parse), 3868 },
+{ HP_POP(script->parse_builtin), HP_POP2(HP_script_parse_builtin), 3870 },
+{ HP_POP(script->parse_subexpr), HP_POP2(HP_script_parse_subexpr), 3872 },
+{ HP_POP(script->skip_space), HP_POP2(HP_script_skip_space), 3874 },
+{ HP_POP(script->error), HP_POP2(HP_script_error), 3876 },
+{ HP_POP(script->warning), HP_POP2(HP_script_warning), 3878 },
+{ HP_POP(script->addScript), HP_POP2(HP_script_addScript), 3880 },
+{ HP_POP(script->conv_num), HP_POP2(HP_script_conv_num), 3882 },
+{ HP_POP(script->conv_str), HP_POP2(HP_script_conv_str), 3884 },
+{ HP_POP(script->rid2sd), HP_POP2(HP_script_rid2sd), 3886 },
+{ HP_POP(script->detach_rid), HP_POP2(HP_script_detach_rid), 3888 },
+{ HP_POP(script->push_val), HP_POP2(HP_script_push_val), 3890 },
+{ HP_POP(script->get_val), HP_POP2(HP_script_get_val), 3892 },
+{ HP_POP(script->get_val2), HP_POP2(HP_script_get_val2), 3894 },
+{ HP_POP(script->push_str), HP_POP2(HP_script_push_str), 3896 },
+{ HP_POP(script->push_copy), HP_POP2(HP_script_push_copy), 3898 },
+{ HP_POP(script->pop_stack), HP_POP2(HP_script_pop_stack), 3900 },
+{ HP_POP(script->set_constant), HP_POP2(HP_script_set_constant), 3902 },
+{ HP_POP(script->set_constant2), HP_POP2(HP_script_set_constant2), 3904 },
+{ HP_POP(script->set_constant_force), HP_POP2(HP_script_set_constant_force), 3906 },
+{ HP_POP(script->get_constant), HP_POP2(HP_script_get_constant), 3908 },
+{ HP_POP(script->label_add), HP_POP2(HP_script_label_add), 3910 },
+{ HP_POP(script->run), HP_POP2(HP_script_run), 3912 },
+{ HP_POP(script->run_main), HP_POP2(HP_script_run_main), 3914 },
+{ HP_POP(script->run_timer), HP_POP2(HP_script_run_timer), 3916 },
+{ HP_POP(script->set_var), HP_POP2(HP_script_set_var), 3918 },
+{ HP_POP(script->stop_instances), HP_POP2(HP_script_stop_instances), 3920 },
+{ HP_POP(script->free_code), HP_POP2(HP_script_free_code), 3922 },
+{ HP_POP(script->free_vars), HP_POP2(HP_script_free_vars), 3924 },
+{ HP_POP(script->alloc_state), HP_POP2(HP_script_alloc_state), 3926 },
+{ HP_POP(script->free_state), HP_POP2(HP_script_free_state), 3928 },
+{ HP_POP(script->run_autobonus), HP_POP2(HP_script_run_autobonus), 3930 },
+{ HP_POP(script->cleararray_pc), HP_POP2(HP_script_cleararray_pc), 3932 },
+{ HP_POP(script->setarray_pc), HP_POP2(HP_script_setarray_pc), 3934 },
+{ HP_POP(script->config_read), HP_POP2(HP_script_config_read), 3936 },
+{ HP_POP(script->add_str), HP_POP2(HP_script_add_str), 3938 },
+{ HP_POP(script->get_str), HP_POP2(HP_script_get_str), 3940 },
+{ HP_POP(script->search_str), HP_POP2(HP_script_search_str), 3942 },
+{ HP_POP(script->setd_sub), HP_POP2(HP_script_setd_sub), 3944 },
+{ HP_POP(script->attach_state), HP_POP2(HP_script_attach_state), 3946 },
+{ HP_POP(script->queue), HP_POP2(HP_script_queue), 3948 },
+{ HP_POP(script->queue_add), HP_POP2(HP_script_queue_add), 3950 },
+{ HP_POP(script->queue_del), HP_POP2(HP_script_queue_del), 3952 },
+{ HP_POP(script->queue_remove), HP_POP2(HP_script_queue_remove), 3954 },
+{ HP_POP(script->queue_create), HP_POP2(HP_script_queue_create), 3956 },
+{ HP_POP(script->queue_clear), HP_POP2(HP_script_queue_clear), 3958 },
+{ HP_POP(script->parse_curly_close), HP_POP2(HP_script_parse_curly_close), 3960 },
+{ HP_POP(script->parse_syntax_close), HP_POP2(HP_script_parse_syntax_close), 3962 },
+{ HP_POP(script->parse_syntax_close_sub), HP_POP2(HP_script_parse_syntax_close_sub), 3964 },
+{ HP_POP(script->parse_syntax), HP_POP2(HP_script_parse_syntax), 3966 },
+{ HP_POP(script->get_com), HP_POP2(HP_script_get_com), 3968 },
+{ HP_POP(script->get_num), HP_POP2(HP_script_get_num), 3970 },
+{ HP_POP(script->op2name), HP_POP2(HP_script_op2name), 3972 },
+{ HP_POP(script->reportsrc), HP_POP2(HP_script_reportsrc), 3974 },
+{ HP_POP(script->reportdata), HP_POP2(HP_script_reportdata), 3976 },
+{ HP_POP(script->reportfunc), HP_POP2(HP_script_reportfunc), 3978 },
+{ HP_POP(script->disp_error_message2), HP_POP2(HP_script_disp_error_message2), 3980 },
+{ HP_POP(script->disp_warning_message), HP_POP2(HP_script_disp_warning_message), 3982 },
+{ HP_POP(script->check_event), HP_POP2(HP_script_check_event), 3984 },
+{ HP_POP(script->calc_hash), HP_POP2(HP_script_calc_hash), 3986 },
+{ HP_POP(script->addb), HP_POP2(HP_script_addb), 3988 },
+{ HP_POP(script->addc), HP_POP2(HP_script_addc), 3990 },
+{ HP_POP(script->addi), HP_POP2(HP_script_addi), 3992 },
+{ HP_POP(script->addl), HP_POP2(HP_script_addl), 3994 },
+{ HP_POP(script->set_label), HP_POP2(HP_script_set_label), 3996 },
+{ HP_POP(script->skip_word), HP_POP2(HP_script_skip_word), 3998 },
+{ HP_POP(script->add_word), HP_POP2(HP_script_add_word), 4000 },
+{ HP_POP(script->parse_callfunc), HP_POP2(HP_script_parse_callfunc), 4002 },
+{ HP_POP(script->parse_nextline), HP_POP2(HP_script_parse_nextline), 4004 },
+{ HP_POP(script->parse_variable), HP_POP2(HP_script_parse_variable), 4006 },
+{ HP_POP(script->parse_simpleexpr), HP_POP2(HP_script_parse_simpleexpr), 4008 },
+{ HP_POP(script->parse_expr), HP_POP2(HP_script_parse_expr), 4010 },
+{ HP_POP(script->parse_line), HP_POP2(HP_script_parse_line), 4012 },
+{ HP_POP(script->read_constdb), HP_POP2(HP_script_read_constdb), 4014 },
+{ HP_POP(script->print_line), HP_POP2(HP_script_print_line), 4016 },
+{ HP_POP(script->errorwarning_sub), HP_POP2(HP_script_errorwarning_sub), 4018 },
+{ HP_POP(script->set_reg), HP_POP2(HP_script_set_reg), 4020 },
+{ HP_POP(script->stack_expand), HP_POP2(HP_script_stack_expand), 4022 },
+{ HP_POP(script->push_retinfo), HP_POP2(HP_script_push_retinfo), 4024 },
+{ HP_POP(script->pop_val), HP_POP2(HP_script_pop_val), 4026 },
+{ HP_POP(script->op_3), HP_POP2(HP_script_op_3), 4028 },
+{ HP_POP(script->op_2str), HP_POP2(HP_script_op_2str), 4030 },
+{ HP_POP(script->op_2num), HP_POP2(HP_script_op_2num), 4032 },
+{ HP_POP(script->op_2), HP_POP2(HP_script_op_2), 4034 },
+{ HP_POP(script->op_1), HP_POP2(HP_script_op_1), 4036 },
+{ HP_POP(script->check_buildin_argtype), HP_POP2(HP_script_check_buildin_argtype), 4038 },
+{ HP_POP(script->detach_state), HP_POP2(HP_script_detach_state), 4040 },
+{ HP_POP(script->db_free_code_sub), HP_POP2(HP_script_db_free_code_sub), 4042 },
+{ HP_POP(script->add_autobonus), HP_POP2(HP_script_add_autobonus), 4044 },
+{ HP_POP(script->menu_countoptions), HP_POP2(HP_script_menu_countoptions), 4046 },
+{ HP_POP(script->buildin_areawarp_sub), HP_POP2(HP_script_buildin_areawarp_sub), 4048 },
+{ HP_POP(script->buildin_areapercentheal_sub), HP_POP2(HP_script_buildin_areapercentheal_sub), 4050 },
+{ HP_POP(script->getarraysize), HP_POP2(HP_script_getarraysize), 4052 },
+{ HP_POP(script->buildin_delitem_delete), HP_POP2(HP_script_buildin_delitem_delete), 4054 },
+{ HP_POP(script->buildin_delitem_search), HP_POP2(HP_script_buildin_delitem_search), 4056 },
+{ HP_POP(script->buildin_killmonster_sub_strip), HP_POP2(HP_script_buildin_killmonster_sub_strip), 4058 },
+{ HP_POP(script->buildin_killmonster_sub), HP_POP2(HP_script_buildin_killmonster_sub), 4060 },
+{ HP_POP(script->buildin_killmonsterall_sub_strip), HP_POP2(HP_script_buildin_killmonsterall_sub_strip), 4062 },
+{ HP_POP(script->buildin_killmonsterall_sub), HP_POP2(HP_script_buildin_killmonsterall_sub), 4064 },
+{ HP_POP(script->buildin_announce_sub), HP_POP2(HP_script_buildin_announce_sub), 4066 },
+{ HP_POP(script->buildin_getareausers_sub), HP_POP2(HP_script_buildin_getareausers_sub), 4068 },
+{ HP_POP(script->buildin_getareadropitem_sub), HP_POP2(HP_script_buildin_getareadropitem_sub), 4070 },
+{ HP_POP(script->mapflag_pvp_sub), HP_POP2(HP_script_mapflag_pvp_sub), 4072 },
+{ HP_POP(script->buildin_pvpoff_sub), HP_POP2(HP_script_buildin_pvpoff_sub), 4074 },
+{ HP_POP(script->buildin_maprespawnguildid_sub_pc), HP_POP2(HP_script_buildin_maprespawnguildid_sub_pc), 4076 },
+{ HP_POP(script->buildin_maprespawnguildid_sub_mob), HP_POP2(HP_script_buildin_maprespawnguildid_sub_mob), 4078 },
+{ HP_POP(script->buildin_mobcount_sub), HP_POP2(HP_script_buildin_mobcount_sub), 4080 },
+{ HP_POP(script->playBGM_sub), HP_POP2(HP_script_playBGM_sub), 4082 },
+{ HP_POP(script->playBGM_foreachpc_sub), HP_POP2(HP_script_playBGM_foreachpc_sub), 4084 },
+{ HP_POP(script->soundeffect_sub), HP_POP2(HP_script_soundeffect_sub), 4086 },
+{ HP_POP(script->buildin_query_sql_sub), HP_POP2(HP_script_buildin_query_sql_sub), 4088 },
+{ HP_POP(script->axtoi), HP_POP2(HP_script_axtoi), 4090 },
+{ HP_POP(script->buildin_instance_warpall_sub), HP_POP2(HP_script_buildin_instance_warpall_sub), 4092 },
+{ HP_POP(script->buildin_mobuseskill_sub), HP_POP2(HP_script_buildin_mobuseskill_sub), 4094 },
+{ HP_POP(script->cleanfloor_sub), HP_POP2(HP_script_cleanfloor_sub), 4096 },
+{ HP_POP(script->run_func), HP_POP2(HP_script_run_func), 4098 },
+/* searchstore */
+{ HP_POP(searchstore->open), HP_POP2(HP_searchstore_open), 4100 },
+{ HP_POP(searchstore->query), HP_POP2(HP_searchstore_query), 4102 },
+{ HP_POP(searchstore->querynext), HP_POP2(HP_searchstore_querynext), 4104 },
+{ HP_POP(searchstore->next), HP_POP2(HP_searchstore_next), 4106 },
+{ HP_POP(searchstore->clear), HP_POP2(HP_searchstore_clear), 4108 },
+{ HP_POP(searchstore->close), HP_POP2(HP_searchstore_close), 4110 },
+{ HP_POP(searchstore->click), HP_POP2(HP_searchstore_click), 4112 },
+{ HP_POP(searchstore->queryremote), HP_POP2(HP_searchstore_queryremote), 4114 },
+{ HP_POP(searchstore->clearremote), HP_POP2(HP_searchstore_clearremote), 4116 },
+{ HP_POP(searchstore->result), HP_POP2(HP_searchstore_result), 4118 },
+/* skill */
+{ HP_POP(skill->init), HP_POP2(HP_skill_init), 4120 },
+{ HP_POP(skill->final), HP_POP2(HP_skill_final), 4122 },
+{ HP_POP(skill->reload), HP_POP2(HP_skill_reload), 4124 },
+{ HP_POP(skill->read_db), HP_POP2(HP_skill_read_db), 4126 },
+{ HP_POP(skill->get_index), HP_POP2(HP_skill_get_index), 4128 },
+{ HP_POP(skill->get_type), HP_POP2(HP_skill_get_type), 4130 },
+{ HP_POP(skill->get_hit), HP_POP2(HP_skill_get_hit), 4132 },
+{ HP_POP(skill->get_inf), HP_POP2(HP_skill_get_inf), 4134 },
+{ HP_POP(skill->get_ele), HP_POP2(HP_skill_get_ele), 4136 },
+{ HP_POP(skill->get_nk), HP_POP2(HP_skill_get_nk), 4138 },
+{ HP_POP(skill->get_max), HP_POP2(HP_skill_get_max), 4140 },
+{ HP_POP(skill->get_range), HP_POP2(HP_skill_get_range), 4142 },
+{ HP_POP(skill->get_range2), HP_POP2(HP_skill_get_range2), 4144 },
+{ HP_POP(skill->get_splash), HP_POP2(HP_skill_get_splash), 4146 },
+{ HP_POP(skill->get_hp), HP_POP2(HP_skill_get_hp), 4148 },
+{ HP_POP(skill->get_mhp), HP_POP2(HP_skill_get_mhp), 4150 },
+{ HP_POP(skill->get_sp), HP_POP2(HP_skill_get_sp), 4152 },
+{ HP_POP(skill->get_state), HP_POP2(HP_skill_get_state), 4154 },
+{ HP_POP(skill->get_spiritball), HP_POP2(HP_skill_get_spiritball), 4156 },
+{ HP_POP(skill->get_zeny), HP_POP2(HP_skill_get_zeny), 4158 },
+{ HP_POP(skill->get_num), HP_POP2(HP_skill_get_num), 4160 },
+{ HP_POP(skill->get_cast), HP_POP2(HP_skill_get_cast), 4162 },
+{ HP_POP(skill->get_delay), HP_POP2(HP_skill_get_delay), 4164 },
+{ HP_POP(skill->get_walkdelay), HP_POP2(HP_skill_get_walkdelay), 4166 },
+{ HP_POP(skill->get_time), HP_POP2(HP_skill_get_time), 4168 },
+{ HP_POP(skill->get_time2), HP_POP2(HP_skill_get_time2), 4170 },
+{ HP_POP(skill->get_castnodex), HP_POP2(HP_skill_get_castnodex), 4172 },
+{ HP_POP(skill->get_delaynodex), HP_POP2(HP_skill_get_delaynodex), 4174 },
+{ HP_POP(skill->get_castdef), HP_POP2(HP_skill_get_castdef), 4176 },
+{ HP_POP(skill->get_weapontype), HP_POP2(HP_skill_get_weapontype), 4178 },
+{ HP_POP(skill->get_ammotype), HP_POP2(HP_skill_get_ammotype), 4180 },
+{ HP_POP(skill->get_ammo_qty), HP_POP2(HP_skill_get_ammo_qty), 4182 },
+{ HP_POP(skill->get_unit_id), HP_POP2(HP_skill_get_unit_id), 4184 },
+{ HP_POP(skill->get_inf2), HP_POP2(HP_skill_get_inf2), 4186 },
+{ HP_POP(skill->get_castcancel), HP_POP2(HP_skill_get_castcancel), 4188 },
+{ HP_POP(skill->get_maxcount), HP_POP2(HP_skill_get_maxcount), 4190 },
+{ HP_POP(skill->get_blewcount), HP_POP2(HP_skill_get_blewcount), 4192 },
+{ HP_POP(skill->get_unit_flag), HP_POP2(HP_skill_get_unit_flag), 4194 },
+{ HP_POP(skill->get_unit_target), HP_POP2(HP_skill_get_unit_target), 4196 },
+{ HP_POP(skill->get_unit_interval), HP_POP2(HP_skill_get_unit_interval), 4198 },
+{ HP_POP(skill->get_unit_bl_target), HP_POP2(HP_skill_get_unit_bl_target), 4200 },
+{ HP_POP(skill->get_unit_layout_type), HP_POP2(HP_skill_get_unit_layout_type), 4202 },
+{ HP_POP(skill->get_unit_range), HP_POP2(HP_skill_get_unit_range), 4204 },
+{ HP_POP(skill->get_cooldown), HP_POP2(HP_skill_get_cooldown), 4206 },
+{ HP_POP(skill->tree_get_max), HP_POP2(HP_skill_tree_get_max), 4208 },
+{ HP_POP(skill->get_name), HP_POP2(HP_skill_get_name), 4210 },
+{ HP_POP(skill->get_desc), HP_POP2(HP_skill_get_desc), 4212 },
+{ HP_POP(skill->chk), HP_POP2(HP_skill_chk), 4214 },
+{ HP_POP(skill->get_casttype), HP_POP2(HP_skill_get_casttype), 4216 },
+{ HP_POP(skill->get_casttype2), HP_POP2(HP_skill_get_casttype2), 4218 },
+{ HP_POP(skill->name2id), HP_POP2(HP_skill_name2id), 4220 },
+{ HP_POP(skill->isammotype), HP_POP2(HP_skill_isammotype), 4222 },
+{ HP_POP(skill->castend_id), HP_POP2(HP_skill_castend_id), 4224 },
+{ HP_POP(skill->castend_pos), HP_POP2(HP_skill_castend_pos), 4226 },
+{ HP_POP(skill->castend_map), HP_POP2(HP_skill_castend_map), 4228 },
+{ HP_POP(skill->cleartimerskill), HP_POP2(HP_skill_cleartimerskill), 4230 },
+{ HP_POP(skill->addtimerskill), HP_POP2(HP_skill_addtimerskill), 4232 },
+{ HP_POP(skill->additional_effect), HP_POP2(HP_skill_additional_effect), 4234 },
+{ HP_POP(skill->counter_additional_effect), HP_POP2(HP_skill_counter_additional_effect), 4236 },
+{ HP_POP(skill->blown), HP_POP2(HP_skill_blown), 4238 },
+{ HP_POP(skill->break_equip), HP_POP2(HP_skill_break_equip), 4240 },
+{ HP_POP(skill->strip_equip), HP_POP2(HP_skill_strip_equip), 4242 },
+{ HP_POP(skill->id2group), HP_POP2(HP_skill_id2group), 4244 },
+{ HP_POP(skill->unitsetting), HP_POP2(HP_skill_unitsetting), 4246 },
+{ HP_POP(skill->initunit), HP_POP2(HP_skill_initunit), 4248 },
+{ HP_POP(skill->delunit), HP_POP2(HP_skill_delunit), 4250 },
+{ HP_POP(skill->init_unitgroup), HP_POP2(HP_skill_init_unitgroup), 4252 },
+{ HP_POP(skill->del_unitgroup), HP_POP2(HP_skill_del_unitgroup), 4254 },
+{ HP_POP(skill->clear_unitgroup), HP_POP2(HP_skill_clear_unitgroup), 4256 },
+{ HP_POP(skill->clear_group), HP_POP2(HP_skill_clear_group), 4258 },
+{ HP_POP(skill->unit_onplace), HP_POP2(HP_skill_unit_onplace), 4260 },
+{ HP_POP(skill->unit_ondamaged), HP_POP2(HP_skill_unit_ondamaged), 4262 },
+{ HP_POP(skill->cast_fix), HP_POP2(HP_skill_cast_fix), 4264 },
+{ HP_POP(skill->cast_fix_sc), HP_POP2(HP_skill_cast_fix_sc), 4266 },
+{ HP_POP(skill->vf_cast_fix), HP_POP2(HP_skill_vf_cast_fix), 4268 },
+{ HP_POP(skill->delay_fix), HP_POP2(HP_skill_delay_fix), 4270 },
+{ HP_POP(skill->check_condition_castbegin), HP_POP2(HP_skill_check_condition_castbegin), 4272 },
+{ HP_POP(skill->check_condition_castend), HP_POP2(HP_skill_check_condition_castend), 4274 },
+{ HP_POP(skill->consume_requirement), HP_POP2(HP_skill_consume_requirement), 4276 },
+{ HP_POP(skill->get_requirement), HP_POP2(HP_skill_get_requirement), 4278 },
+{ HP_POP(skill->check_pc_partner), HP_POP2(HP_skill_check_pc_partner), 4280 },
+{ HP_POP(skill->unit_move), HP_POP2(HP_skill_unit_move), 4282 },
+{ HP_POP(skill->unit_onleft), HP_POP2(HP_skill_unit_onleft), 4284 },
+{ HP_POP(skill->unit_onout), HP_POP2(HP_skill_unit_onout), 4286 },
+{ HP_POP(skill->unit_move_unit_group), HP_POP2(HP_skill_unit_move_unit_group), 4288 },
+{ HP_POP(skill->sit), HP_POP2(HP_skill_sit), 4290 },
+{ HP_POP(skill->brandishspear), HP_POP2(HP_skill_brandishspear), 4292 },
+{ HP_POP(skill->repairweapon), HP_POP2(HP_skill_repairweapon), 4294 },
+{ HP_POP(skill->identify), HP_POP2(HP_skill_identify), 4296 },
+{ HP_POP(skill->weaponrefine), HP_POP2(HP_skill_weaponrefine), 4298 },
+{ HP_POP(skill->autospell), HP_POP2(HP_skill_autospell), 4300 },
+{ HP_POP(skill->calc_heal), HP_POP2(HP_skill_calc_heal), 4302 },
+{ HP_POP(skill->check_cloaking), HP_POP2(HP_skill_check_cloaking), 4304 },
+{ HP_POP(skill->enchant_elemental_end), HP_POP2(HP_skill_enchant_elemental_end), 4306 },
+{ HP_POP(skill->not_ok), HP_POP2(HP_skill_not_ok), 4308 },
+{ HP_POP(skill->not_ok_hom), HP_POP2(HP_skill_not_ok_hom), 4310 },
+{ HP_POP(skill->not_ok_mercenary), HP_POP2(HP_skill_not_ok_mercenary), 4312 },
+{ HP_POP(skill->chastle_mob_changetarget), HP_POP2(HP_skill_chastle_mob_changetarget), 4314 },
+{ HP_POP(skill->can_produce_mix), HP_POP2(HP_skill_can_produce_mix), 4316 },
+{ HP_POP(skill->produce_mix), HP_POP2(HP_skill_produce_mix), 4318 },
+{ HP_POP(skill->arrow_create), HP_POP2(HP_skill_arrow_create), 4320 },
+{ HP_POP(skill->castend_nodamage_id), HP_POP2(HP_skill_castend_nodamage_id), 4322 },
+{ HP_POP(skill->castend_damage_id), HP_POP2(HP_skill_castend_damage_id), 4324 },
+{ HP_POP(skill->castend_pos2), HP_POP2(HP_skill_castend_pos2), 4326 },
+{ HP_POP(skill->blockpc_start), HP_POP2(HP_skill_blockpc_start), 4328 },
+{ HP_POP(skill->blockhomun_start), HP_POP2(HP_skill_blockhomun_start), 4330 },
+{ HP_POP(skill->blockmerc_start), HP_POP2(HP_skill_blockmerc_start), 4332 },
+{ HP_POP(skill->attack), HP_POP2(HP_skill_attack), 4334 },
+{ HP_POP(skill->attack_area), HP_POP2(HP_skill_attack_area), 4336 },
+{ HP_POP(skill->area_sub), HP_POP2(HP_skill_area_sub), 4338 },
+{ HP_POP(skill->area_sub_count), HP_POP2(HP_skill_area_sub_count), 4340 },
+{ HP_POP(skill->check_unit_range), HP_POP2(HP_skill_check_unit_range), 4342 },
+{ HP_POP(skill->check_unit_range_sub), HP_POP2(HP_skill_check_unit_range_sub), 4344 },
+{ HP_POP(skill->check_unit_range2), HP_POP2(HP_skill_check_unit_range2), 4346 },
+{ HP_POP(skill->check_unit_range2_sub), HP_POP2(HP_skill_check_unit_range2_sub), 4348 },
+{ HP_POP(skill->toggle_magicpower), HP_POP2(HP_skill_toggle_magicpower), 4350 },
+{ HP_POP(skill->magic_reflect), HP_POP2(HP_skill_magic_reflect), 4352 },
+{ HP_POP(skill->onskillusage), HP_POP2(HP_skill_onskillusage), 4354 },
+{ HP_POP(skill->cell_overlap), HP_POP2(HP_skill_cell_overlap), 4356 },
+{ HP_POP(skill->timerskill), HP_POP2(HP_skill_timerskill), 4358 },
+{ HP_POP(skill->trap_splash), HP_POP2(HP_skill_trap_splash), 4360 },
+{ HP_POP(skill->check_condition_mercenary), HP_POP2(HP_skill_check_condition_mercenary), 4362 },
+{ HP_POP(skill->locate_element_field), HP_POP2(HP_skill_locate_element_field), 4364 },
+{ HP_POP(skill->graffitiremover), HP_POP2(HP_skill_graffitiremover), 4366 },
+{ HP_POP(skill->activate_reverberation), HP_POP2(HP_skill_activate_reverberation), 4368 },
+{ HP_POP(skill->dance_overlap_sub), HP_POP2(HP_skill_dance_overlap_sub), 4370 },
+{ HP_POP(skill->dance_overlap), HP_POP2(HP_skill_dance_overlap), 4372 },
+{ HP_POP(skill->get_unit_layout), HP_POP2(HP_skill_get_unit_layout), 4374 },
+{ HP_POP(skill->frostjoke_scream), HP_POP2(HP_skill_frostjoke_scream), 4376 },
+{ HP_POP(skill->greed), HP_POP2(HP_skill_greed), 4378 },
+{ HP_POP(skill->destroy_trap), HP_POP2(HP_skill_destroy_trap), 4380 },
+{ HP_POP(skill->icewall_block), HP_POP2(HP_skill_icewall_block), 4382 },
+{ HP_POP(skill->unitgrouptickset_search), HP_POP2(HP_skill_unitgrouptickset_search), 4384 },
+{ HP_POP(skill->dance_switch), HP_POP2(HP_skill_dance_switch), 4386 },
+{ HP_POP(skill->check_condition_char_sub), HP_POP2(HP_skill_check_condition_char_sub), 4388 },
+{ HP_POP(skill->check_condition_mob_master_sub), HP_POP2(HP_skill_check_condition_mob_master_sub), 4390 },
+{ HP_POP(skill->brandishspear_first), HP_POP2(HP_skill_brandishspear_first), 4392 },
+{ HP_POP(skill->brandishspear_dir), HP_POP2(HP_skill_brandishspear_dir), 4394 },
+{ HP_POP(skill->get_fixed_cast), HP_POP2(HP_skill_get_fixed_cast), 4396 },
+{ HP_POP(skill->sit_count), HP_POP2(HP_skill_sit_count), 4398 },
+{ HP_POP(skill->sit_in), HP_POP2(HP_skill_sit_in), 4400 },
+{ HP_POP(skill->sit_out), HP_POP2(HP_skill_sit_out), 4402 },
+{ HP_POP(skill->unitsetmapcell), HP_POP2(HP_skill_unitsetmapcell), 4404 },
+{ HP_POP(skill->unit_onplace_timer), HP_POP2(HP_skill_unit_onplace_timer), 4406 },
+{ HP_POP(skill->unit_effect), HP_POP2(HP_skill_unit_effect), 4408 },
+{ HP_POP(skill->unit_timer_sub_onplace), HP_POP2(HP_skill_unit_timer_sub_onplace), 4410 },
+{ HP_POP(skill->unit_move_sub), HP_POP2(HP_skill_unit_move_sub), 4412 },
+{ HP_POP(skill->blockpc_end), HP_POP2(HP_skill_blockpc_end), 4414 },
+{ HP_POP(skill->blockhomun_end), HP_POP2(HP_skill_blockhomun_end), 4416 },
+{ HP_POP(skill->blockmerc_end), HP_POP2(HP_skill_blockmerc_end), 4418 },
+{ HP_POP(skill->split_atoi), HP_POP2(HP_skill_split_atoi), 4420 },
+{ HP_POP(skill->unit_timer), HP_POP2(HP_skill_unit_timer), 4422 },
+{ HP_POP(skill->unit_timer_sub), HP_POP2(HP_skill_unit_timer_sub), 4424 },
+{ HP_POP(skill->init_unit_layout), HP_POP2(HP_skill_init_unit_layout), 4426 },
+{ HP_POP(skill->parse_row_skilldb), HP_POP2(HP_skill_parse_row_skilldb), 4428 },
+{ HP_POP(skill->parse_row_requiredb), HP_POP2(HP_skill_parse_row_requiredb), 4430 },
+{ HP_POP(skill->parse_row_castdb), HP_POP2(HP_skill_parse_row_castdb), 4432 },
+{ HP_POP(skill->parse_row_castnodexdb), HP_POP2(HP_skill_parse_row_castnodexdb), 4434 },
+{ HP_POP(skill->parse_row_unitdb), HP_POP2(HP_skill_parse_row_unitdb), 4436 },
+{ HP_POP(skill->parse_row_producedb), HP_POP2(HP_skill_parse_row_producedb), 4438 },
+{ HP_POP(skill->parse_row_createarrowdb), HP_POP2(HP_skill_parse_row_createarrowdb), 4440 },
+{ HP_POP(skill->parse_row_abradb), HP_POP2(HP_skill_parse_row_abradb), 4442 },
+{ HP_POP(skill->parse_row_spellbookdb), HP_POP2(HP_skill_parse_row_spellbookdb), 4444 },
+{ HP_POP(skill->parse_row_magicmushroomdb), HP_POP2(HP_skill_parse_row_magicmushroomdb), 4446 },
+{ HP_POP(skill->parse_row_reproducedb), HP_POP2(HP_skill_parse_row_reproducedb), 4448 },
+{ HP_POP(skill->parse_row_improvisedb), HP_POP2(HP_skill_parse_row_improvisedb), 4450 },
+{ HP_POP(skill->parse_row_changematerialdb), HP_POP2(HP_skill_parse_row_changematerialdb), 4452 },
+{ HP_POP(skill->usave_add), HP_POP2(HP_skill_usave_add), 4454 },
+{ HP_POP(skill->usave_trigger), HP_POP2(HP_skill_usave_trigger), 4456 },
+{ HP_POP(skill->cooldown_load), HP_POP2(HP_skill_cooldown_load), 4458 },
+{ HP_POP(skill->spellbook), HP_POP2(HP_skill_spellbook), 4460 },
+{ HP_POP(skill->block_check), HP_POP2(HP_skill_block_check), 4462 },
+{ HP_POP(skill->detonator), HP_POP2(HP_skill_detonator), 4464 },
+{ HP_POP(skill->check_camouflage), HP_POP2(HP_skill_check_camouflage), 4466 },
+{ HP_POP(skill->magicdecoy), HP_POP2(HP_skill_magicdecoy), 4468 },
+{ HP_POP(skill->poisoningweapon), HP_POP2(HP_skill_poisoningweapon), 4470 },
+{ HP_POP(skill->select_menu), HP_POP2(HP_skill_select_menu), 4472 },
+{ HP_POP(skill->elementalanalysis), HP_POP2(HP_skill_elementalanalysis), 4474 },
+{ HP_POP(skill->changematerial), HP_POP2(HP_skill_changematerial), 4476 },
+{ HP_POP(skill->get_elemental_type), HP_POP2(HP_skill_get_elemental_type), 4478 },
+{ HP_POP(skill->cooldown_save), HP_POP2(HP_skill_cooldown_save), 4480 },
+{ HP_POP(skill->maelstrom_suction), HP_POP2(HP_skill_maelstrom_suction), 4482 },
+{ HP_POP(skill->get_new_group_id), HP_POP2(HP_skill_get_new_group_id), 4484 },
+/* status */
+{ HP_POP(status->init), HP_POP2(HP_status_init), 4486 },
+{ HP_POP(status->final), HP_POP2(HP_status_final), 4488 },
+{ HP_POP(status->get_refine_chance), HP_POP2(HP_status_get_refine_chance), 4490 },
+{ HP_POP(status->skill2sc), HP_POP2(HP_status_skill2sc), 4492 },
+{ HP_POP(status->sc2skill), HP_POP2(HP_status_sc2skill), 4494 },
+{ HP_POP(status->sc2scb_flag), HP_POP2(HP_status_sc2scb_flag), 4496 },
+{ HP_POP(status->type2relevant_bl_types), HP_POP2(HP_status_type2relevant_bl_types), 4498 },
+{ HP_POP(status->get_sc_type), HP_POP2(HP_status_get_sc_type), 4500 },
+{ HP_POP(status->damage), HP_POP2(HP_status_damage), 4502 },
+{ HP_POP(status->charge), HP_POP2(HP_status_charge), 4504 },
+{ HP_POP(status->percent_change), HP_POP2(HP_status_percent_change), 4506 },
+{ HP_POP(status->set_hp), HP_POP2(HP_status_set_hp), 4508 },
+{ HP_POP(status->set_sp), HP_POP2(HP_status_set_sp), 4510 },
+{ HP_POP(status->heal), HP_POP2(HP_status_heal), 4512 },
+{ HP_POP(status->revive), HP_POP2(HP_status_revive), 4514 },
+{ HP_POP(status->get_regen_data), HP_POP2(HP_status_get_regen_data), 4516 },
+{ HP_POP(status->get_status_data), HP_POP2(HP_status_get_status_data), 4518 },
+{ HP_POP(status->get_base_status), HP_POP2(HP_status_get_base_status), 4520 },
+{ HP_POP(status->get_name), HP_POP2(HP_status_get_name), 4522 },
+{ HP_POP(status->get_class), HP_POP2(HP_status_get_class), 4524 },
+{ HP_POP(status->get_lv), HP_POP2(HP_status_get_lv), 4526 },
+{ HP_POP(status->get_def), HP_POP2(HP_status_get_def), 4528 },
+{ HP_POP(status->get_speed), HP_POP2(HP_status_get_speed), 4530 },
+{ HP_POP(status->calc_attack_element), HP_POP2(HP_status_calc_attack_element), 4532 },
+{ HP_POP(status->get_party_id), HP_POP2(HP_status_get_party_id), 4534 },
+{ HP_POP(status->get_guild_id), HP_POP2(HP_status_get_guild_id), 4536 },
+{ HP_POP(status->get_emblem_id), HP_POP2(HP_status_get_emblem_id), 4538 },
+{ HP_POP(status->get_mexp), HP_POP2(HP_status_get_mexp), 4540 },
+{ HP_POP(status->get_race2), HP_POP2(HP_status_get_race2), 4542 },
+{ HP_POP(status->get_viewdata), HP_POP2(HP_status_get_viewdata), 4544 },
+{ HP_POP(status->set_viewdata), HP_POP2(HP_status_set_viewdata), 4546 },
+{ HP_POP(status->change_init), HP_POP2(HP_status_change_init), 4548 },
+{ HP_POP(status->get_sc), HP_POP2(HP_status_get_sc), 4550 },
+{ HP_POP(status->isdead), HP_POP2(HP_status_isdead), 4552 },
+{ HP_POP(status->isimmune), HP_POP2(HP_status_isimmune), 4554 },
+{ HP_POP(status->get_sc_def), HP_POP2(HP_status_get_sc_def), 4556 },
+{ HP_POP(status->change_start), HP_POP2(HP_status_change_start), 4558 },
+{ HP_POP(status->change_end_), HP_POP2(HP_status_change_end_), 4560 },
+{ HP_POP(status->kaahi_heal_timer), HP_POP2(HP_status_kaahi_heal_timer), 4562 },
+{ HP_POP(status->change_timer), HP_POP2(HP_status_change_timer), 4564 },
+{ HP_POP(status->change_timer_sub), HP_POP2(HP_status_change_timer_sub), 4566 },
+{ HP_POP(status->change_clear), HP_POP2(HP_status_change_clear), 4568 },
+{ HP_POP(status->change_clear_buffs), HP_POP2(HP_status_change_clear_buffs), 4570 },
+{ HP_POP(status->calc_bl_), HP_POP2(HP_status_calc_bl_), 4572 },
+{ HP_POP(status->calc_mob_), HP_POP2(HP_status_calc_mob_), 4574 },
+{ HP_POP(status->calc_pet_), HP_POP2(HP_status_calc_pet_), 4576 },
+{ HP_POP(status->calc_pc_), HP_POP2(HP_status_calc_pc_), 4578 },
+{ HP_POP(status->calc_homunculus_), HP_POP2(HP_status_calc_homunculus_), 4580 },
+{ HP_POP(status->calc_mercenary_), HP_POP2(HP_status_calc_mercenary_), 4582 },
+{ HP_POP(status->calc_elemental_), HP_POP2(HP_status_calc_elemental_), 4584 },
+{ HP_POP(status->calc_misc), HP_POP2(HP_status_calc_misc), 4586 },
+{ HP_POP(status->calc_regen), HP_POP2(HP_status_calc_regen), 4588 },
+{ HP_POP(status->calc_regen_rate), HP_POP2(HP_status_calc_regen_rate), 4590 },
+{ HP_POP(status->check_skilluse), HP_POP2(HP_status_check_skilluse), 4592 },
+{ HP_POP(status->check_visibility), HP_POP2(HP_status_check_visibility), 4594 },
+{ HP_POP(status->change_spread), HP_POP2(HP_status_change_spread), 4596 },
+{ HP_POP(status->calc_def), HP_POP2(HP_status_calc_def), 4598 },
+{ HP_POP(status->calc_def2), HP_POP2(HP_status_calc_def2), 4600 },
+{ HP_POP(status->calc_mdef), HP_POP2(HP_status_calc_mdef), 4602 },
+{ HP_POP(status->calc_mdef2), HP_POP2(HP_status_calc_mdef2), 4604 },
+{ HP_POP(status->calc_batk), HP_POP2(HP_status_calc_batk), 4606 },
+{ HP_POP(status->base_matk), HP_POP2(HP_status_base_matk), 4608 },
+{ HP_POP(status->get_weapon_atk), HP_POP2(HP_status_get_weapon_atk), 4610 },
+{ HP_POP(status->get_total_mdef), HP_POP2(HP_status_get_total_mdef), 4612 },
+{ HP_POP(status->get_total_def), HP_POP2(HP_status_get_total_def), 4614 },
+{ HP_POP(status->get_matk), HP_POP2(HP_status_get_matk), 4616 },
+{ HP_POP(status->readdb), HP_POP2(HP_status_readdb), 4618 },
+{ HP_POP(status->initChangeTables), HP_POP2(HP_status_initChangeTables), 4620 },
+{ HP_POP(status->initDummyData), HP_POP2(HP_status_initDummyData), 4622 },
+{ HP_POP(status->base_amotion_pc), HP_POP2(HP_status_base_amotion_pc), 4624 },
+{ HP_POP(status->base_atk), HP_POP2(HP_status_base_atk), 4626 },
+{ HP_POP(status->calc_sigma), HP_POP2(HP_status_calc_sigma), 4628 },
+{ HP_POP(status->base_pc_maxhp), HP_POP2(HP_status_base_pc_maxhp), 4630 },
+{ HP_POP(status->base_pc_maxsp), HP_POP2(HP_status_base_pc_maxsp), 4632 },
+{ HP_POP(status->calc_npc_), HP_POP2(HP_status_calc_npc_), 4634 },
+{ HP_POP(status->calc_str), HP_POP2(HP_status_calc_str), 4636 },
+{ HP_POP(status->calc_agi), HP_POP2(HP_status_calc_agi), 4638 },
+{ HP_POP(status->calc_vit), HP_POP2(HP_status_calc_vit), 4640 },
+{ HP_POP(status->calc_int), HP_POP2(HP_status_calc_int), 4642 },
+{ HP_POP(status->calc_dex), HP_POP2(HP_status_calc_dex), 4644 },
+{ HP_POP(status->calc_luk), HP_POP2(HP_status_calc_luk), 4646 },
+{ HP_POP(status->calc_watk), HP_POP2(HP_status_calc_watk), 4648 },
+{ HP_POP(status->calc_matk), HP_POP2(HP_status_calc_matk), 4650 },
+{ HP_POP(status->calc_hit), HP_POP2(HP_status_calc_hit), 4652 },
+{ HP_POP(status->calc_critical), HP_POP2(HP_status_calc_critical), 4654 },
+{ HP_POP(status->calc_flee), HP_POP2(HP_status_calc_flee), 4656 },
+{ HP_POP(status->calc_flee2), HP_POP2(HP_status_calc_flee2), 4658 },
+{ HP_POP(status->calc_speed), HP_POP2(HP_status_calc_speed), 4660 },
+{ HP_POP(status->calc_aspd_rate), HP_POP2(HP_status_calc_aspd_rate), 4662 },
+{ HP_POP(status->calc_dmotion), HP_POP2(HP_status_calc_dmotion), 4664 },
+{ HP_POP(status->calc_aspd), HP_POP2(HP_status_calc_aspd), 4666 },
+{ HP_POP(status->calc_fix_aspd), HP_POP2(HP_status_calc_fix_aspd), 4668 },
+{ HP_POP(status->calc_maxhp), HP_POP2(HP_status_calc_maxhp), 4670 },
+{ HP_POP(status->calc_maxsp), HP_POP2(HP_status_calc_maxsp), 4672 },
+{ HP_POP(status->calc_element), HP_POP2(HP_status_calc_element), 4674 },
+{ HP_POP(status->calc_element_lv), HP_POP2(HP_status_calc_element_lv), 4676 },
+{ HP_POP(status->calc_mode), HP_POP2(HP_status_calc_mode), 4678 },
+{ HP_POP(status->calc_ematk), HP_POP2(HP_status_calc_ematk), 4680 },
+{ HP_POP(status->calc_bl_main), HP_POP2(HP_status_calc_bl_main), 4682 },
+{ HP_POP(status->display_add), HP_POP2(HP_status_display_add), 4684 },
+{ HP_POP(status->display_remove), HP_POP2(HP_status_display_remove), 4686 },
+{ HP_POP(status->natural_heal), HP_POP2(HP_status_natural_heal), 4688 },
+{ HP_POP(status->natural_heal_timer), HP_POP2(HP_status_natural_heal_timer), 4690 },
+{ HP_POP(status->readdb_job1), HP_POP2(HP_status_readdb_job1), 4692 },
+{ HP_POP(status->readdb_job2), HP_POP2(HP_status_readdb_job2), 4694 },
+{ HP_POP(status->readdb_sizefix), HP_POP2(HP_status_readdb_sizefix), 4696 },
+{ HP_POP(status->readdb_refine), HP_POP2(HP_status_readdb_refine), 4698 },
+{ HP_POP(status->readdb_scconfig), HP_POP2(HP_status_readdb_scconfig), 4700 },
+/* storage */
+{ HP_POP(storage->reconnect), HP_POP2(HP_storage_reconnect), 4702 },
+{ HP_POP(storage->delitem), HP_POP2(HP_storage_delitem), 4704 },
+{ HP_POP(storage->open), HP_POP2(HP_storage_open), 4706 },
+{ HP_POP(storage->add), HP_POP2(HP_storage_add), 4708 },
+{ HP_POP(storage->get), HP_POP2(HP_storage_get), 4710 },
+{ HP_POP(storage->additem), HP_POP2(HP_storage_additem), 4712 },
+{ HP_POP(storage->addfromcart), HP_POP2(HP_storage_addfromcart), 4714 },
+{ HP_POP(storage->gettocart), HP_POP2(HP_storage_gettocart), 4716 },
+{ HP_POP(storage->close), HP_POP2(HP_storage_close), 4718 },
+{ HP_POP(storage->pc_quit), HP_POP2(HP_storage_pc_quit), 4720 },
+{ HP_POP(storage->comp_item), HP_POP2(HP_storage_comp_item), 4722 },
+{ HP_POP(storage->sortitem), HP_POP2(HP_storage_sortitem), 4724 },
+{ HP_POP(storage->reconnect_sub), HP_POP2(HP_storage_reconnect_sub), 4726 },
+/* trade */
+{ HP_POP(trade->request), HP_POP2(HP_trade_request), 4728 },
+{ HP_POP(trade->ack), HP_POP2(HP_trade_ack), 4730 },
+{ HP_POP(trade->check_impossible), HP_POP2(HP_trade_check_impossible), 4732 },
+{ HP_POP(trade->check), HP_POP2(HP_trade_check), 4734 },
+{ HP_POP(trade->additem), HP_POP2(HP_trade_additem), 4736 },
+{ HP_POP(trade->addzeny), HP_POP2(HP_trade_addzeny), 4738 },
+{ HP_POP(trade->ok), HP_POP2(HP_trade_ok), 4740 },
+{ HP_POP(trade->cancel), HP_POP2(HP_trade_cancel), 4742 },
+{ HP_POP(trade->commit), HP_POP2(HP_trade_commit), 4744 },
+/* unit */
+{ HP_POP(unit->init), HP_POP2(HP_unit_init), 4746 },
+{ HP_POP(unit->final), HP_POP2(HP_unit_final), 4748 },
+{ HP_POP(unit->bl2ud), HP_POP2(HP_unit_bl2ud), 4750 },
+{ HP_POP(unit->bl2ud2), HP_POP2(HP_unit_bl2ud2), 4752 },
+{ HP_POP(unit->attack_timer), HP_POP2(HP_unit_attack_timer), 4754 },
+{ HP_POP(unit->walktoxy_timer), HP_POP2(HP_unit_walktoxy_timer), 4756 },
+{ HP_POP(unit->walktoxy_sub), HP_POP2(HP_unit_walktoxy_sub), 4758 },
+{ HP_POP(unit->delay_walktoxy_timer), HP_POP2(HP_unit_delay_walktoxy_timer), 4760 },
+{ HP_POP(unit->walktoxy), HP_POP2(HP_unit_walktoxy), 4762 },
+{ HP_POP(unit->walktobl_sub), HP_POP2(HP_unit_walktobl_sub), 4764 },
+{ HP_POP(unit->walktobl), HP_POP2(HP_unit_walktobl), 4766 },
+{ HP_POP(unit->run), HP_POP2(HP_unit_run), 4768 },
+{ HP_POP(unit->wugdash), HP_POP2(HP_unit_wugdash), 4770 },
+{ HP_POP(unit->escape), HP_POP2(HP_unit_escape), 4772 },
+{ HP_POP(unit->movepos), HP_POP2(HP_unit_movepos), 4774 },
+{ HP_POP(unit->setdir), HP_POP2(HP_unit_setdir), 4776 },
+{ HP_POP(unit->getdir), HP_POP2(HP_unit_getdir), 4778 },
+{ HP_POP(unit->blown), HP_POP2(HP_unit_blown), 4780 },
+{ HP_POP(unit->warp), HP_POP2(HP_unit_warp), 4782 },
+{ HP_POP(unit->stop_walking), HP_POP2(HP_unit_stop_walking), 4784 },
+{ HP_POP(unit->skilluse_id), HP_POP2(HP_unit_skilluse_id), 4786 },
+{ HP_POP(unit->is_walking), HP_POP2(HP_unit_is_walking), 4788 },
+{ HP_POP(unit->can_move), HP_POP2(HP_unit_can_move), 4790 },
+{ HP_POP(unit->resume_running), HP_POP2(HP_unit_resume_running), 4792 },
+{ HP_POP(unit->set_walkdelay), HP_POP2(HP_unit_set_walkdelay), 4794 },
+{ HP_POP(unit->skilluse_id2), HP_POP2(HP_unit_skilluse_id2), 4796 },
+{ HP_POP(unit->skilluse_pos), HP_POP2(HP_unit_skilluse_pos), 4798 },
+{ HP_POP(unit->skilluse_pos2), HP_POP2(HP_unit_skilluse_pos2), 4800 },
+{ HP_POP(unit->set_target), HP_POP2(HP_unit_set_target), 4802 },
+{ HP_POP(unit->stop_attack), HP_POP2(HP_unit_stop_attack), 4804 },
+{ HP_POP(unit->unattackable), HP_POP2(HP_unit_unattackable), 4806 },
+{ HP_POP(unit->attack), HP_POP2(HP_unit_attack), 4808 },
+{ HP_POP(unit->cancel_combo), HP_POP2(HP_unit_cancel_combo), 4810 },
+{ HP_POP(unit->can_reach_pos), HP_POP2(HP_unit_can_reach_pos), 4812 },
+{ HP_POP(unit->can_reach_bl), HP_POP2(HP_unit_can_reach_bl), 4814 },
+{ HP_POP(unit->calc_pos), HP_POP2(HP_unit_calc_pos), 4816 },
+{ HP_POP(unit->attack_timer_sub), HP_POP2(HP_unit_attack_timer_sub), 4818 },
+{ HP_POP(unit->skillcastcancel), HP_POP2(HP_unit_skillcastcancel), 4820 },
+{ HP_POP(unit->dataset), HP_POP2(HP_unit_dataset), 4822 },
+{ HP_POP(unit->counttargeted), HP_POP2(HP_unit_counttargeted), 4824 },
+{ HP_POP(unit->fixdamage), HP_POP2(HP_unit_fixdamage), 4826 },
+{ HP_POP(unit->changeviewsize), HP_POP2(HP_unit_changeviewsize), 4828 },
+{ HP_POP(unit->remove_map), HP_POP2(HP_unit_remove_map), 4830 },
+{ HP_POP(unit->remove_map_pc), HP_POP2(HP_unit_remove_map_pc), 4832 },
+{ HP_POP(unit->free_pc), HP_POP2(HP_unit_free_pc), 4834 },
+{ HP_POP(unit->free), HP_POP2(HP_unit_free), 4836 },
+/* vending */
+{ HP_POP(vending->init), HP_POP2(HP_vending_init), 4838 },
+{ HP_POP(vending->final), HP_POP2(HP_vending_final), 4840 },
+{ HP_POP(vending->close), HP_POP2(HP_vending_close), 4842 },
+{ HP_POP(vending->open), HP_POP2(HP_vending_open), 4844 },
+{ HP_POP(vending->list), HP_POP2(HP_vending_list), 4846 },
+{ HP_POP(vending->purchase), HP_POP2(HP_vending_purchase), 4848 },
+{ HP_POP(vending->search), HP_POP2(HP_vending_search), 4850 },
+{ HP_POP(vending->searchall), HP_POP2(HP_vending_searchall), 4852 },
+};
+int HookingPointsLenMax = 41;
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
new file mode 100644
index 000000000..5915412d1
--- /dev/null
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -0,0 +1,64199 @@
+/* atcommand */
+void HP_atcommand_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_atcommand_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.atcommand.init();
+ }
+ if( HPMHooks.count.HP_atcommand_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_atcommand_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_atcommand_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.atcommand.final();
+ }
+ if( HPMHooks.count.HP_atcommand_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_atcommand_parse(const int fd, struct map_session_data *sd, const char *message, int type) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_atcommand_parse_pre ) {
+ bool (*preHookFunc) (const int *fd, struct map_session_data *sd, const char *message, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_parse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_parse_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, sd, message, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.atcommand.parse(fd, sd, message, type);
+ }
+ if( HPMHooks.count.HP_atcommand_parse_post ) {
+ bool (*postHookFunc) (bool retVal___, const int *fd, struct map_session_data *sd, const char *message, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_parse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_parse_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, sd, message, &type);
+ }
+ }
+ return retVal___;
+}
+bool HP_atcommand_create(char *name, AtCommandFunc func) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_atcommand_create_pre ) {
+ bool (*preHookFunc) (char *name, AtCommandFunc *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_create_pre[hIndex].func;
+ retVal___ = preHookFunc(name, &func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.atcommand.create(name, func);
+ }
+ if( HPMHooks.count.HP_atcommand_create_post ) {
+ bool (*postHookFunc) (bool retVal___, char *name, AtCommandFunc *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name, &func);
+ }
+ }
+ return retVal___;
+}
+bool HP_atcommand_can_use(struct map_session_data *sd, const char *command) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_atcommand_can_use_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, const char *command);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_can_use_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, command);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.atcommand.can_use(sd, command);
+ }
+ if( HPMHooks.count.HP_atcommand_can_use_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *command);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_can_use_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, command);
+ }
+ }
+ return retVal___;
+}
+bool HP_atcommand_can_use2(struct map_session_data *sd, const char *command, AtCommandType type) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_atcommand_can_use2_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, const char *command, AtCommandType *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_can_use2_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, command, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.atcommand.can_use2(sd, command, type);
+ }
+ if( HPMHooks.count.HP_atcommand_can_use2_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *command, AtCommandType *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_can_use2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, command, &type);
+ }
+ }
+ return retVal___;
+}
+void HP_atcommand_load_groups(GroupSettings **groups, config_setting_t **commands_, size_t sz) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_atcommand_load_groups_pre ) {
+ void (*preHookFunc) (GroupSettings **groups, config_setting_t **commands_, size_t *sz);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_load_groups_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_load_groups_pre[hIndex].func;
+ preHookFunc(groups, commands_, &sz);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.atcommand.load_groups(groups, commands_, sz);
+ }
+ if( HPMHooks.count.HP_atcommand_load_groups_post ) {
+ void (*postHookFunc) (GroupSettings **groups, config_setting_t **commands_, size_t *sz);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_load_groups_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_load_groups_post[hIndex].func;
+ postHookFunc(groups, commands_, &sz);
+ }
+ }
+ return;
+}
+AtCommandInfo* HP_atcommand_exists(const char *name) {
+ int hIndex = 0;
+ AtCommandInfo* retVal___ = NULL;
+ if( HPMHooks.count.HP_atcommand_exists_pre ) {
+ AtCommandInfo* (*preHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exists_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_exists_pre[hIndex].func;
+ retVal___ = preHookFunc(name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.atcommand.exists(name);
+ }
+ if( HPMHooks.count.HP_atcommand_exists_post ) {
+ AtCommandInfo* (*postHookFunc) (AtCommandInfo* retVal___, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exists_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_exists_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name);
+ }
+ }
+ return retVal___;
+}
+int HP_atcommand_msg_read(const char *cfgName) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_atcommand_msg_read_pre ) {
+ int (*preHookFunc) (const char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_msg_read_pre[hIndex].func;
+ retVal___ = preHookFunc(cfgName);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.atcommand.msg_read(cfgName);
+ }
+ if( HPMHooks.count.HP_atcommand_msg_read_post ) {
+ int (*postHookFunc) (int retVal___, const char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_msg_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, cfgName);
+ }
+ }
+ return retVal___;
+}
+void HP_atcommand_final_msg(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_atcommand_final_msg_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_msg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_final_msg_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.atcommand.final_msg();
+ }
+ if( HPMHooks.count.HP_atcommand_final_msg_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_msg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_final_msg_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+struct atcmd_binding_data* HP_atcommand_get_bind_byname(const char *name) {
+ int hIndex = 0;
+ struct atcmd_binding_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_atcommand_get_bind_byname_pre ) {
+ struct atcmd_binding_data* (*preHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_bind_byname_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_get_bind_byname_pre[hIndex].func;
+ retVal___ = preHookFunc(name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.atcommand.get_bind_byname(name);
+ }
+ if( HPMHooks.count.HP_atcommand_get_bind_byname_post ) {
+ struct atcmd_binding_data* (*postHookFunc) (struct atcmd_binding_data* retVal___, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_bind_byname_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_get_bind_byname_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name);
+ }
+ }
+ return retVal___;
+}
+AtCommandInfo* HP_atcommand_get_info_byname(const char *name) {
+ int hIndex = 0;
+ AtCommandInfo* retVal___ = NULL;
+ if( HPMHooks.count.HP_atcommand_get_info_byname_pre ) {
+ AtCommandInfo* (*preHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_info_byname_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_get_info_byname_pre[hIndex].func;
+ retVal___ = preHookFunc(name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.atcommand.get_info_byname(name);
+ }
+ if( HPMHooks.count.HP_atcommand_get_info_byname_post ) {
+ AtCommandInfo* (*postHookFunc) (AtCommandInfo* retVal___, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_info_byname_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_get_info_byname_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name);
+ }
+ }
+ return retVal___;
+}
+const char* HP_atcommand_check_alias(const char *aliasname) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_atcommand_check_alias_pre ) {
+ const char* (*preHookFunc) (const char *aliasname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_check_alias_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_check_alias_pre[hIndex].func;
+ retVal___ = preHookFunc(aliasname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.atcommand.check_alias(aliasname);
+ }
+ if( HPMHooks.count.HP_atcommand_check_alias_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *aliasname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_check_alias_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_check_alias_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, aliasname);
+ }
+ }
+ return retVal___;
+}
+void HP_atcommand_get_suggestions(struct map_session_data *sd, const char *name, bool is_atcmd_cmd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_atcommand_get_suggestions_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *name, bool *is_atcmd_cmd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_suggestions_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_get_suggestions_pre[hIndex].func;
+ preHookFunc(sd, name, &is_atcmd_cmd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.atcommand.get_suggestions(sd, name, is_atcmd_cmd);
+ }
+ if( HPMHooks.count.HP_atcommand_get_suggestions_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *name, bool *is_atcmd_cmd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_suggestions_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_get_suggestions_post[hIndex].func;
+ postHookFunc(sd, name, &is_atcmd_cmd);
+ }
+ }
+ return;
+}
+void HP_atcommand_config_read(const char *config_filename) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_atcommand_config_read_pre ) {
+ void (*preHookFunc) (const char *config_filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_config_read_pre[hIndex].func;
+ preHookFunc(config_filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.atcommand.config_read(config_filename);
+ }
+ if( HPMHooks.count.HP_atcommand_config_read_post ) {
+ void (*postHookFunc) (const char *config_filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_config_read_post[hIndex].func;
+ postHookFunc(config_filename);
+ }
+ }
+ return;
+}
+int HP_atcommand_stopattack(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_atcommand_stopattack_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_stopattack_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_atcommand_stopattack_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.atcommand.stopattack(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_atcommand_stopattack_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_stopattack_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_atcommand_stopattack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_atcommand_pvpoff_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_atcommand_pvpoff_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpoff_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_atcommand_pvpoff_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.atcommand.pvpoff_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_atcommand_pvpoff_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpoff_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_atcommand_pvpoff_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_atcommand_pvpon_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_atcommand_pvpon_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpon_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_atcommand_pvpon_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.atcommand.pvpon_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_atcommand_pvpon_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpon_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_atcommand_pvpon_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_atcommand_atkillmonster_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_atcommand_atkillmonster_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_atkillmonster_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_atcommand_atkillmonster_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.atcommand.atkillmonster_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_atcommand_atkillmonster_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_atkillmonster_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_atcommand_atkillmonster_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_atcommand_raise_sub(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_atcommand_raise_sub_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_raise_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_raise_sub_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.atcommand.raise_sub(sd);
+ }
+ if( HPMHooks.count.HP_atcommand_raise_sub_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_raise_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_raise_sub_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_atcommand_get_jail_time(int jailtime, int *year, int *month, int *day, int *hour, int *minute) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_atcommand_get_jail_time_pre ) {
+ void (*preHookFunc) (int *jailtime, int *year, int *month, int *day, int *hour, int *minute);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_jail_time_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_get_jail_time_pre[hIndex].func;
+ preHookFunc(&jailtime, year, month, day, hour, minute);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.atcommand.get_jail_time(jailtime, year, month, day, hour, minute);
+ }
+ if( HPMHooks.count.HP_atcommand_get_jail_time_post ) {
+ void (*postHookFunc) (int *jailtime, int *year, int *month, int *day, int *hour, int *minute);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_jail_time_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_get_jail_time_post[hIndex].func;
+ postHookFunc(&jailtime, year, month, day, hour, minute);
+ }
+ }
+ return;
+}
+int HP_atcommand_cleanfloor_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_atcommand_cleanfloor_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cleanfloor_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_atcommand_cleanfloor_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.atcommand.cleanfloor_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_atcommand_cleanfloor_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cleanfloor_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_atcommand_cleanfloor_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_atcommand_mutearea_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_atcommand_mutearea_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_mutearea_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_atcommand_mutearea_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.atcommand.mutearea_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_atcommand_mutearea_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_mutearea_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_atcommand_mutearea_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_atcommand_commands_sub(struct map_session_data *sd, const int fd, AtCommandType type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_atcommand_commands_sub_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const int *fd, AtCommandType *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_commands_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_commands_sub_pre[hIndex].func;
+ preHookFunc(sd, &fd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.atcommand.commands_sub(sd, fd, type);
+ }
+ if( HPMHooks.count.HP_atcommand_commands_sub_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const int *fd, AtCommandType *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_commands_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_commands_sub_post[hIndex].func;
+ postHookFunc(sd, &fd, &type);
+ }
+ }
+ return;
+}
+void HP_atcommand_cmd_db_clear(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_atcommand_cmd_db_clear_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_cmd_db_clear_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.atcommand.cmd_db_clear();
+ }
+ if( HPMHooks.count.HP_atcommand_cmd_db_clear_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_cmd_db_clear_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_atcommand_cmd_db_clear_sub(DBKey key, DBData *data, va_list args) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_atcommand_cmd_db_clear_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_sub_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_atcommand_cmd_db_clear_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.atcommand.cmd_db_clear_sub(key, data, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_atcommand_cmd_db_clear_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_sub_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_atcommand_cmd_db_clear_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_atcommand_doload(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_atcommand_doload_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_doload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_doload_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.atcommand.doload();
+ }
+ if( HPMHooks.count.HP_atcommand_doload_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_doload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_doload_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_atcommand_base_commands(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_atcommand_base_commands_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_base_commands_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_base_commands_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.atcommand.base_commands();
+ }
+ if( HPMHooks.count.HP_atcommand_base_commands_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_base_commands_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_base_commands_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* battle */
+void HP_battle_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_battle_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.battle.init();
+ }
+ if( HPMHooks.count.HP_battle_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_battle_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_battle_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.battle.final();
+ }
+ if( HPMHooks.count.HP_battle_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+struct Damage HP_battle_calc_attack(int attack_type, struct block_list *bl, struct block_list *target, uint16 skill_id, uint16 skill_lv, int count) {
+ int hIndex = 0;
+ struct Damage retVal___;
+ memset(&retVal___, '\0', sizeof(struct Damage));
+ if( HPMHooks.count.HP_battle_calc_attack_pre ) {
+ struct Damage (*preHookFunc) (int *attack_type, struct block_list *bl, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_attack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_attack_pre[hIndex].func;
+ retVal___ = preHookFunc(&attack_type, bl, target, &skill_id, &skill_lv, &count);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_attack(attack_type, bl, target, skill_id, skill_lv, count);
+ }
+ if( HPMHooks.count.HP_battle_calc_attack_post ) {
+ struct Damage (*postHookFunc) (struct Damage retVal___, int *attack_type, struct block_list *bl, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_attack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_attack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &attack_type, bl, target, &skill_id, &skill_lv, &count);
+ }
+ }
+ return retVal___;
+}
+int64 HP_battle_calc_damage(struct block_list *src, struct block_list *bl, struct Damage *d, int64 damage, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int64 retVal___;
+ memset(&retVal___, '\0', sizeof(int64));
+ if( HPMHooks.count.HP_battle_calc_damage_pre ) {
+ int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, struct Damage *d, int64 *damage, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_damage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_damage_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, d, &damage, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_damage(src, bl, d, damage, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_battle_calc_damage_post ) {
+ int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *bl, struct Damage *d, int64 *damage, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_damage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_damage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, d, &damage, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int64 HP_battle_calc_gvg_damage(struct block_list *src, struct block_list *bl, int64 damage, int div_, uint16 skill_id, uint16 skill_lv, int flag) {
+ int hIndex = 0;
+ int64 retVal___;
+ memset(&retVal___, '\0', sizeof(int64));
+ if( HPMHooks.count.HP_battle_calc_gvg_damage_pre ) {
+ int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_gvg_damage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_gvg_damage_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, &damage, &div_, &skill_id, &skill_lv, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_gvg_damage(src, bl, damage, div_, skill_id, skill_lv, flag);
+ }
+ if( HPMHooks.count.HP_battle_calc_gvg_damage_post ) {
+ int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_gvg_damage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_gvg_damage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, &damage, &div_, &skill_id, &skill_lv, &flag);
+ }
+ }
+ return retVal___;
+}
+int64 HP_battle_calc_bg_damage(struct block_list *src, struct block_list *bl, int64 damage, int div_, uint16 skill_id, uint16 skill_lv, int flag) {
+ int hIndex = 0;
+ int64 retVal___;
+ memset(&retVal___, '\0', sizeof(int64));
+ if( HPMHooks.count.HP_battle_calc_bg_damage_pre ) {
+ int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_bg_damage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_bg_damage_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, &damage, &div_, &skill_id, &skill_lv, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_bg_damage(src, bl, damage, div_, skill_id, skill_lv, flag);
+ }
+ if( HPMHooks.count.HP_battle_calc_bg_damage_post ) {
+ int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_bg_damage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_bg_damage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, &damage, &div_, &skill_id, &skill_lv, &flag);
+ }
+ }
+ return retVal___;
+}
+enum damage_lv HP_battle_weapon_attack(struct block_list *bl, struct block_list *target, unsigned int tick, int flag) {
+ int hIndex = 0;
+ enum damage_lv retVal___;
+ memset(&retVal___, '\0', sizeof(enum damage_lv));
+ if( HPMHooks.count.HP_battle_weapon_attack_pre ) {
+ enum damage_lv (*preHookFunc) (struct block_list *bl, struct block_list *target, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_weapon_attack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_weapon_attack_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, target, &tick, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.weapon_attack(bl, target, tick, flag);
+ }
+ if( HPMHooks.count.HP_battle_weapon_attack_post ) {
+ enum damage_lv (*postHookFunc) (enum damage_lv retVal___, struct block_list *bl, struct block_list *target, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_weapon_attack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_weapon_attack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, target, &tick, &flag);
+ }
+ }
+ return retVal___;
+}
+struct Damage HP_battle_calc_weapon_attack(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int wflag) {
+ int hIndex = 0;
+ struct Damage retVal___;
+ memset(&retVal___, '\0', sizeof(struct Damage));
+ if( HPMHooks.count.HP_battle_calc_weapon_attack_pre ) {
+ struct Damage (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *wflag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_weapon_attack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_weapon_attack_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &wflag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_weapon_attack(src, target, skill_id, skill_lv, wflag);
+ }
+ if( HPMHooks.count.HP_battle_calc_weapon_attack_post ) {
+ struct Damage (*postHookFunc) (struct Damage retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *wflag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_weapon_attack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_weapon_attack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &wflag);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_delay_damage(unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int64 damage, enum damage_lv dmg_lv, int ddelay, bool additional_effects) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_delay_damage_pre ) {
+ int (*preHookFunc) (unsigned int *tick, int *amotion, struct block_list *src, struct block_list *target, int *attack_type, uint16 *skill_id, uint16 *skill_lv, int64 *damage, enum damage_lv *dmg_lv, int *ddelay, bool *additional_effects);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_delay_damage_pre[hIndex].func;
+ retVal___ = preHookFunc(&tick, &amotion, src, target, &attack_type, &skill_id, &skill_lv, &damage, &dmg_lv, &ddelay, &additional_effects);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.delay_damage(tick, amotion, src, target, attack_type, skill_id, skill_lv, damage, dmg_lv, ddelay, additional_effects);
+ }
+ if( HPMHooks.count.HP_battle_delay_damage_post ) {
+ int (*postHookFunc) (int retVal___, unsigned int *tick, int *amotion, struct block_list *src, struct block_list *target, int *attack_type, uint16 *skill_id, uint16 *skill_lv, int64 *damage, enum damage_lv *dmg_lv, int *ddelay, bool *additional_effects);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_delay_damage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tick, &amotion, src, target, &attack_type, &skill_id, &skill_lv, &damage, &dmg_lv, &ddelay, &additional_effects);
+ }
+ }
+ return retVal___;
+}
+void HP_battle_drain(struct map_session_data *sd, struct block_list *tbl, int64 rdamage, int64 ldamage, int race, int boss) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_battle_drain_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct block_list *tbl, int64 *rdamage, int64 *ldamage, int *race, int *boss);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_drain_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_drain_pre[hIndex].func;
+ preHookFunc(sd, tbl, &rdamage, &ldamage, &race, &boss);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.battle.drain(sd, tbl, rdamage, ldamage, race, boss);
+ }
+ if( HPMHooks.count.HP_battle_drain_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct block_list *tbl, int64 *rdamage, int64 *ldamage, int *race, int *boss);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_drain_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_drain_post[hIndex].func;
+ postHookFunc(sd, tbl, &rdamage, &ldamage, &race, &boss);
+ }
+ }
+ return;
+}
+int64 HP_battle_calc_return_damage(struct block_list *bl, struct block_list *src, int64 *p1, int flag, uint16 skill_id, int *rdelay) {
+ int hIndex = 0;
+ int64 retVal___;
+ memset(&retVal___, '\0', sizeof(int64));
+ if( HPMHooks.count.HP_battle_calc_return_damage_pre ) {
+ int64 (*preHookFunc) (struct block_list *bl, struct block_list *src, int64 *p1, int *flag, uint16 *skill_id, int *rdelay);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_return_damage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_return_damage_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, src, p1, &flag, &skill_id, rdelay);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_return_damage(bl, src, p1, flag, skill_id, rdelay);
+ }
+ if( HPMHooks.count.HP_battle_calc_return_damage_post ) {
+ int64 (*postHookFunc) (int64 retVal___, struct block_list *bl, struct block_list *src, int64 *p1, int *flag, uint16 *skill_id, int *rdelay);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_return_damage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_return_damage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, src, p1, &flag, &skill_id, rdelay);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_attr_ratio(int atk_elem, int def_type, int def_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_attr_ratio_pre ) {
+ int (*preHookFunc) (int *atk_elem, int *def_type, int *def_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_attr_ratio_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_attr_ratio_pre[hIndex].func;
+ retVal___ = preHookFunc(&atk_elem, &def_type, &def_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.attr_ratio(atk_elem, def_type, def_lv);
+ }
+ if( HPMHooks.count.HP_battle_attr_ratio_post ) {
+ int (*postHookFunc) (int retVal___, int *atk_elem, int *def_type, int *def_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_attr_ratio_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_attr_ratio_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &atk_elem, &def_type, &def_lv);
+ }
+ }
+ return retVal___;
+}
+int64 HP_battle_attr_fix(struct block_list *src, struct block_list *target, int64 damage, int atk_elem, int def_type, int def_lv) {
+ int hIndex = 0;
+ int64 retVal___;
+ memset(&retVal___, '\0', sizeof(int64));
+ if( HPMHooks.count.HP_battle_attr_fix_pre ) {
+ int64 (*preHookFunc) (struct block_list *src, struct block_list *target, int64 *damage, int *atk_elem, int *def_type, int *def_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_attr_fix_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_attr_fix_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &damage, &atk_elem, &def_type, &def_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.attr_fix(src, target, damage, atk_elem, def_type, def_lv);
+ }
+ if( HPMHooks.count.HP_battle_attr_fix_post ) {
+ int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *target, int64 *damage, int *atk_elem, int *def_type, int *def_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_attr_fix_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_attr_fix_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &damage, &atk_elem, &def_type, &def_lv);
+ }
+ }
+ return retVal___;
+}
+int64 HP_battle_calc_cardfix(int attack_type, struct block_list *src, struct block_list *target, int nk, int s_ele, int s_ele_, int64 damage, int left, int flag) {
+ int hIndex = 0;
+ int64 retVal___;
+ memset(&retVal___, '\0', sizeof(int64));
+ if( HPMHooks.count.HP_battle_calc_cardfix_pre ) {
+ int64 (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *target, int *nk, int *s_ele, int *s_ele_, int64 *damage, int *left, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_cardfix_pre[hIndex].func;
+ retVal___ = preHookFunc(&attack_type, src, target, &nk, &s_ele, &s_ele_, &damage, &left, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_cardfix(attack_type, src, target, nk, s_ele, s_ele_, damage, left, flag);
+ }
+ if( HPMHooks.count.HP_battle_calc_cardfix_post ) {
+ int64 (*postHookFunc) (int64 retVal___, int *attack_type, struct block_list *src, struct block_list *target, int *nk, int *s_ele, int *s_ele_, int64 *damage, int *left, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_cardfix_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &attack_type, src, target, &nk, &s_ele, &s_ele_, &damage, &left, &flag);
+ }
+ }
+ return retVal___;
+}
+int64 HP_battle_calc_elefix(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int nk, int n_ele, int s_ele, int s_ele_, bool left, int flag) {
+ int hIndex = 0;
+ int64 retVal___;
+ memset(&retVal___, '\0', sizeof(int64));
+ if( HPMHooks.count.HP_battle_calc_elefix_pre ) {
+ int64 (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *nk, int *n_ele, int *s_ele, int *s_ele_, bool *left, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_elefix_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_elefix_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &damage, &nk, &n_ele, &s_ele, &s_ele_, &left, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_elefix(src, target, skill_id, skill_lv, damage, nk, n_ele, s_ele, s_ele_, left, flag);
+ }
+ if( HPMHooks.count.HP_battle_calc_elefix_post ) {
+ int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *nk, int *n_ele, int *s_ele, int *s_ele_, bool *left, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_elefix_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_elefix_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &damage, &nk, &n_ele, &s_ele, &s_ele_, &left, &flag);
+ }
+ }
+ return retVal___;
+}
+int64 HP_battle_calc_masteryfix(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int div, bool left, bool weapon) {
+ int hIndex = 0;
+ int64 retVal___;
+ memset(&retVal___, '\0', sizeof(int64));
+ if( HPMHooks.count.HP_battle_calc_masteryfix_pre ) {
+ int64 (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *div, bool *left, bool *weapon);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_masteryfix_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_masteryfix_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &damage, &div, &left, &weapon);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_masteryfix(src, target, skill_id, skill_lv, damage, div, left, weapon);
+ }
+ if( HPMHooks.count.HP_battle_calc_masteryfix_post ) {
+ int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *div, bool *left, bool *weapon);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_masteryfix_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_masteryfix_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &damage, &div, &left, &weapon);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_calc_skillratio(int attack_type, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int skillratio, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_calc_skillratio_pre ) {
+ int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_skillratio_pre[hIndex].func;
+ retVal___ = preHookFunc(&attack_type, src, target, &skill_id, &skill_lv, &skillratio, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_skillratio(attack_type, src, target, skill_id, skill_lv, skillratio, flag);
+ }
+ if( HPMHooks.count.HP_battle_calc_skillratio_post ) {
+ int (*postHookFunc) (int retVal___, int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_skillratio_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &attack_type, src, target, &skill_id, &skill_lv, &skillratio, &flag);
+ }
+ }
+ return retVal___;
+}
+int64 HP_battle_calc_sizefix(struct map_session_data *sd, int64 damage, int type, int size, bool ignore) {
+ int hIndex = 0;
+ int64 retVal___;
+ memset(&retVal___, '\0', sizeof(int64));
+ if( HPMHooks.count.HP_battle_calc_sizefix_pre ) {
+ int64 (*preHookFunc) (struct map_session_data *sd, int64 *damage, int *type, int *size, bool *ignore);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_sizefix_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_sizefix_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &damage, &type, &size, &ignore);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_sizefix(sd, damage, type, size, ignore);
+ }
+ if( HPMHooks.count.HP_battle_calc_sizefix_post ) {
+ int64 (*postHookFunc) (int64 retVal___, struct map_session_data *sd, int64 *damage, int *type, int *size, bool *ignore);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_sizefix_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_sizefix_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &damage, &type, &size, &ignore);
+ }
+ }
+ return retVal___;
+}
+int64 HP_battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, struct weapon_atk *watk, int nk, bool n_ele, short s_ele, short s_ele_, int size, int type, int flag, int flag2) {
+ int hIndex = 0;
+ int64 retVal___;
+ memset(&retVal___, '\0', sizeof(int64));
+ if( HPMHooks.count.HP_battle_calc_weapon_damage_pre ) {
+ int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, struct weapon_atk *watk, int *nk, bool *n_ele, short *s_ele, short *s_ele_, int *size, int *type, int *flag, int *flag2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_weapon_damage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_weapon_damage_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, watk, &nk, &n_ele, &s_ele, &s_ele_, &size, &type, &flag, &flag2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_weapon_damage(src, bl, skill_id, skill_lv, watk, nk, n_ele, s_ele, s_ele_, size, type, flag, flag2);
+ }
+ if( HPMHooks.count.HP_battle_calc_weapon_damage_post ) {
+ int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, struct weapon_atk *watk, int *nk, bool *n_ele, short *s_ele, short *s_ele_, int *size, int *type, int *flag, int *flag2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_weapon_damage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_weapon_damage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, watk, &nk, &n_ele, &s_ele, &s_ele_, &size, &type, &flag, &flag2);
+ }
+ }
+ return retVal___;
+}
+int64 HP_battle_calc_defense(int attack_type, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int flag, int pdef) {
+ int hIndex = 0;
+ int64 retVal___;
+ memset(&retVal___, '\0', sizeof(int64));
+ if( HPMHooks.count.HP_battle_calc_defense_pre ) {
+ int64 (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *flag, int *pdef);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_defense_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_defense_pre[hIndex].func;
+ retVal___ = preHookFunc(&attack_type, src, target, &skill_id, &skill_lv, &damage, &flag, &pdef);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_defense(attack_type, src, target, skill_id, skill_lv, damage, flag, pdef);
+ }
+ if( HPMHooks.count.HP_battle_calc_defense_post ) {
+ int64 (*postHookFunc) (int64 retVal___, int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *flag, int *pdef);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_defense_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_defense_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &attack_type, src, target, &skill_id, &skill_lv, &damage, &flag, &pdef);
+ }
+ }
+ return retVal___;
+}
+struct block_list* HP_battle_get_master(struct block_list *src) {
+ int hIndex = 0;
+ struct block_list* retVal___ = NULL;
+ if( HPMHooks.count.HP_battle_get_master_pre ) {
+ struct block_list* (*preHookFunc) (struct block_list *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_master_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_get_master_pre[hIndex].func;
+ retVal___ = preHookFunc(src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.get_master(src);
+ }
+ if( HPMHooks.count.HP_battle_get_master_post ) {
+ struct block_list* (*postHookFunc) (struct block_list* retVal___, struct block_list *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_master_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_get_master_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src);
+ }
+ }
+ return retVal___;
+}
+struct block_list* HP_battle_get_targeted(struct block_list *target) {
+ int hIndex = 0;
+ struct block_list* retVal___ = NULL;
+ if( HPMHooks.count.HP_battle_get_targeted_pre ) {
+ struct block_list* (*preHookFunc) (struct block_list *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_get_targeted_pre[hIndex].func;
+ retVal___ = preHookFunc(target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.get_targeted(target);
+ }
+ if( HPMHooks.count.HP_battle_get_targeted_post ) {
+ struct block_list* (*postHookFunc) (struct block_list* retVal___, struct block_list *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_get_targeted_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, target);
+ }
+ }
+ return retVal___;
+}
+struct block_list* HP_battle_get_enemy(struct block_list *target, int type, int range) {
+ int hIndex = 0;
+ struct block_list* retVal___ = NULL;
+ if( HPMHooks.count.HP_battle_get_enemy_pre ) {
+ struct block_list* (*preHookFunc) (struct block_list *target, int *type, int *range);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_get_enemy_pre[hIndex].func;
+ retVal___ = preHookFunc(target, &type, &range);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.get_enemy(target, type, range);
+ }
+ if( HPMHooks.count.HP_battle_get_enemy_post ) {
+ struct block_list* (*postHookFunc) (struct block_list* retVal___, struct block_list *target, int *type, int *range);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_get_enemy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, target, &type, &range);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_get_target(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_get_target_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_target_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_get_target_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.get_target(bl);
+ }
+ if( HPMHooks.count.HP_battle_get_target_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_target_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_get_target_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_get_current_skill(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_get_current_skill_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_current_skill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_get_current_skill_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.get_current_skill(bl);
+ }
+ if( HPMHooks.count.HP_battle_get_current_skill_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_current_skill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_get_current_skill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_check_undead(int race, int element) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_check_undead_pre ) {
+ int (*preHookFunc) (int *race, int *element);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_undead_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_check_undead_pre[hIndex].func;
+ retVal___ = preHookFunc(&race, &element);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.check_undead(race, element);
+ }
+ if( HPMHooks.count.HP_battle_check_undead_post ) {
+ int (*postHookFunc) (int retVal___, int *race, int *element);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_undead_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_check_undead_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &race, &element);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_check_target(struct block_list *src, struct block_list *target, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_check_target_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *target, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_target_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_check_target_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.check_target(src, target, flag);
+ }
+ if( HPMHooks.count.HP_battle_check_target_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_target_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_check_target_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &flag);
+ }
+ }
+ return retVal___;
+}
+bool HP_battle_check_range(struct block_list *src, struct block_list *bl, int range) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_battle_check_range_pre ) {
+ bool (*preHookFunc) (struct block_list *src, struct block_list *bl, int *range);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_range_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_check_range_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, &range);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.check_range(src, bl, range);
+ }
+ if( HPMHooks.count.HP_battle_check_range_post ) {
+ bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, int *range);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_range_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_check_range_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, &range);
+ }
+ }
+ return retVal___;
+}
+void HP_battle_consume_ammo(struct map_session_data *sd, int skill_id, int lv) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_battle_consume_ammo_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *skill_id, int *lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_consume_ammo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_consume_ammo_pre[hIndex].func;
+ preHookFunc(sd, &skill_id, &lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.battle.consume_ammo(sd, skill_id, lv);
+ }
+ if( HPMHooks.count.HP_battle_consume_ammo_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *skill_id, int *lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_consume_ammo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_consume_ammo_post[hIndex].func;
+ postHookFunc(sd, &skill_id, &lv);
+ }
+ }
+ return;
+}
+int HP_battle_get_targeted_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_get_targeted_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_battle_get_targeted_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.battle.get_targeted_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_battle_get_targeted_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_battle_get_targeted_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_get_enemy_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_get_enemy_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_battle_get_enemy_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.battle.get_enemy_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_battle_get_enemy_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_battle_get_enemy_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_get_enemy_area_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_get_enemy_area_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_area_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_battle_get_enemy_area_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.battle.get_enemy_area_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_battle_get_enemy_area_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_area_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_battle_get_enemy_area_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_delay_damage_sub_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_delay_damage_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.delay_damage_sub(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_battle_delay_damage_sub_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_delay_damage_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_blewcount_bonus_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_blewcount_bonus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_blewcount_bonus_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.blewcount_bonus(sd, skill_id);
+ }
+ if( HPMHooks.count.HP_battle_blewcount_bonus_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_blewcount_bonus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_blewcount_bonus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_range_type(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_range_type_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_range_type_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_range_type_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.range_type(src, target, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_battle_range_type_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_range_type_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_range_type_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int64 HP_battle_calc_base_damage(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int nk, bool n_ele, short s_ele, short s_ele_, int type, int flag, int flag2) {
+ int hIndex = 0;
+ int64 retVal___;
+ memset(&retVal___, '\0', sizeof(int64));
+ if( HPMHooks.count.HP_battle_calc_base_damage_pre ) {
+ int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *nk, bool *n_ele, short *s_ele, short *s_ele_, int *type, int *flag, int *flag2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_base_damage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_base_damage_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &nk, &n_ele, &s_ele, &s_ele_, &type, &flag, &flag2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_base_damage(src, bl, skill_id, skill_lv, nk, n_ele, s_ele, s_ele_, type, flag, flag2);
+ }
+ if( HPMHooks.count.HP_battle_calc_base_damage_post ) {
+ int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *nk, bool *n_ele, short *s_ele, short *s_ele_, int *type, int *flag, int *flag2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_base_damage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_base_damage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &nk, &n_ele, &s_ele, &s_ele_, &type, &flag, &flag2);
+ }
+ }
+ return retVal___;
+}
+int64 HP_battle_calc_base_damage2(struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ int64 retVal___;
+ memset(&retVal___, '\0', sizeof(int64));
+ if( HPMHooks.count.HP_battle_calc_base_damage2_pre ) {
+ int64 (*preHookFunc) (struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short *t_size, struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_base_damage2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_base_damage2_pre[hIndex].func;
+ retVal___ = preHookFunc(st, wa, sc, &t_size, sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_base_damage2(st, wa, sc, t_size, sd, flag);
+ }
+ if( HPMHooks.count.HP_battle_calc_base_damage2_post ) {
+ int64 (*postHookFunc) (int64 retVal___, struct status_data *st, struct weapon_atk *wa, struct status_change *sc, unsigned short *t_size, struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_base_damage2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_base_damage2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, st, wa, sc, &t_size, sd, &flag);
+ }
+ }
+ return retVal___;
+}
+struct Damage HP_battle_calc_misc_attack(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int mflag) {
+ int hIndex = 0;
+ struct Damage retVal___;
+ memset(&retVal___, '\0', sizeof(struct Damage));
+ if( HPMHooks.count.HP_battle_calc_misc_attack_pre ) {
+ struct Damage (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_misc_attack_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &mflag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_misc_attack(src, target, skill_id, skill_lv, mflag);
+ }
+ if( HPMHooks.count.HP_battle_calc_misc_attack_post ) {
+ struct Damage (*postHookFunc) (struct Damage retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_misc_attack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &mflag);
+ }
+ }
+ return retVal___;
+}
+struct Damage HP_battle_calc_magic_attack(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int mflag) {
+ int hIndex = 0;
+ struct Damage retVal___;
+ memset(&retVal___, '\0', sizeof(struct Damage));
+ if( HPMHooks.count.HP_battle_calc_magic_attack_pre ) {
+ struct Damage (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_magic_attack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_magic_attack_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &mflag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_magic_attack(src, target, skill_id, skill_lv, mflag);
+ }
+ if( HPMHooks.count.HP_battle_calc_magic_attack_post ) {
+ struct Damage (*postHookFunc) (struct Damage retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_magic_attack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_magic_attack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &mflag);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_adjust_skill_damage(int m, unsigned short skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_adjust_skill_damage_pre ) {
+ int (*preHookFunc) (int *m, unsigned short *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_adjust_skill_damage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_adjust_skill_damage_pre[hIndex].func;
+ retVal___ = preHookFunc(&m, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.adjust_skill_damage(m, skill_id);
+ }
+ if( HPMHooks.count.HP_battle_adjust_skill_damage_post ) {
+ int (*postHookFunc) (int retVal___, int *m, unsigned short *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_adjust_skill_damage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_adjust_skill_damage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &m, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int64 HP_battle_add_mastery(struct map_session_data *sd, struct block_list *target, int64 dmg, int type) {
+ int hIndex = 0;
+ int64 retVal___;
+ memset(&retVal___, '\0', sizeof(int64));
+ if( HPMHooks.count.HP_battle_add_mastery_pre ) {
+ int64 (*preHookFunc) (struct map_session_data *sd, struct block_list *target, int64 *dmg, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_add_mastery_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_add_mastery_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, target, &dmg, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.add_mastery(sd, target, dmg, type);
+ }
+ if( HPMHooks.count.HP_battle_add_mastery_post ) {
+ int64 (*postHookFunc) (int64 retVal___, struct map_session_data *sd, struct block_list *target, int64 *dmg, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_add_mastery_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_add_mastery_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, target, &dmg, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_calc_drain(int64 damage, int rate, int per) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_calc_drain_pre ) {
+ int (*preHookFunc) (int64 *damage, int *rate, int *per);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_drain_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_calc_drain_pre[hIndex].func;
+ retVal___ = preHookFunc(&damage, &rate, &per);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.calc_drain(damage, rate, per);
+ }
+ if( HPMHooks.count.HP_battle_calc_drain_post ) {
+ int (*postHookFunc) (int retVal___, int64 *damage, int *rate, int *per);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_drain_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_calc_drain_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &damage, &rate, &per);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_config_read(const char *cfgName) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_config_read_pre ) {
+ int (*preHookFunc) (const char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_config_read_pre[hIndex].func;
+ retVal___ = preHookFunc(cfgName);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.config_read(cfgName);
+ }
+ if( HPMHooks.count.HP_battle_config_read_post ) {
+ int (*postHookFunc) (int retVal___, const char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_config_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, cfgName);
+ }
+ }
+ return retVal___;
+}
+void HP_battle_config_set_defaults(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_battle_config_set_defaults_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_defaults_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_config_set_defaults_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.battle.config_set_defaults();
+ }
+ if( HPMHooks.count.HP_battle_config_set_defaults_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_defaults_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_config_set_defaults_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_battle_config_set_value(const char *w1, const char *w2) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_config_set_value_pre ) {
+ int (*preHookFunc) (const char *w1, const char *w2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_config_set_value_pre[hIndex].func;
+ retVal___ = preHookFunc(w1, w2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.config_set_value(w1, w2);
+ }
+ if( HPMHooks.count.HP_battle_config_set_value_post ) {
+ int (*postHookFunc) (int retVal___, const char *w1, const char *w2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_config_set_value_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, w1, w2);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_config_get_value(const char *w1) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_config_get_value_pre ) {
+ int (*preHookFunc) (const char *w1);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_get_value_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_config_get_value_pre[hIndex].func;
+ retVal___ = preHookFunc(w1);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.config_get_value(w1);
+ }
+ if( HPMHooks.count.HP_battle_config_get_value_post ) {
+ int (*postHookFunc) (int retVal___, const char *w1);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_get_value_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_config_get_value_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, w1);
+ }
+ }
+ return retVal___;
+}
+void HP_battle_config_adjust(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_battle_config_adjust_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_adjust_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_config_adjust_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.battle.config_adjust();
+ }
+ if( HPMHooks.count.HP_battle_config_adjust_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_adjust_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_config_adjust_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+struct block_list* HP_battle_get_enemy_area(struct block_list *src, int x, int y, int range, int type, int ignore_id) {
+ int hIndex = 0;
+ struct block_list* retVal___ = NULL;
+ if( HPMHooks.count.HP_battle_get_enemy_area_pre ) {
+ struct block_list* (*preHookFunc) (struct block_list *src, int *x, int *y, int *range, int *type, int *ignore_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_area_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_get_enemy_area_pre[hIndex].func;
+ retVal___ = preHookFunc(src, &x, &y, &range, &type, &ignore_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.get_enemy_area(src, x, y, range, type, ignore_id);
+ }
+ if( HPMHooks.count.HP_battle_get_enemy_area_post ) {
+ struct block_list* (*postHookFunc) (struct block_list* retVal___, struct block_list *src, int *x, int *y, int *range, int *type, int *ignore_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_area_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_get_enemy_area_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, &x, &y, &range, &type, &ignore_id);
+ }
+ }
+ return retVal___;
+}
+int HP_battle_damage_area(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_battle_damage_area_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_damage_area_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_battle_damage_area_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.battle.damage_area(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_battle_damage_area_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_damage_area_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_battle_damage_area_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+/* bg */
+void HP_bg_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_bg_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.bg.init();
+ }
+ if( HPMHooks.count.HP_bg_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_bg_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_bg_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.bg.final();
+ }
+ if( HPMHooks.count.HP_bg_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+struct bg_arena* HP_bg_name2arena(char *name) {
+ int hIndex = 0;
+ struct bg_arena* retVal___ = NULL;
+ if( HPMHooks.count.HP_bg_name2arena_pre ) {
+ struct bg_arena* (*preHookFunc) (char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_name2arena_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_name2arena_pre[hIndex].func;
+ retVal___ = preHookFunc(name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.name2arena(name);
+ }
+ if( HPMHooks.count.HP_bg_name2arena_post ) {
+ struct bg_arena* (*postHookFunc) (struct bg_arena* retVal___, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_name2arena_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_name2arena_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name);
+ }
+ }
+ return retVal___;
+}
+void HP_bg_queue_add(struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_bg_queue_add_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_queue_add_pre[hIndex].func;
+ preHookFunc(sd, arena, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.bg.queue_add(sd, arena, type);
+ }
+ if( HPMHooks.count.HP_bg_queue_add_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_queue_add_post[hIndex].func;
+ postHookFunc(sd, arena, &type);
+ }
+ }
+ return;
+}
+enum BATTLEGROUNDS_QUEUE_ACK HP_bg_can_queue(struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types type) {
+ int hIndex = 0;
+ enum BATTLEGROUNDS_QUEUE_ACK retVal___;
+ memset(&retVal___, '\0', sizeof(enum BATTLEGROUNDS_QUEUE_ACK));
+ if( HPMHooks.count.HP_bg_can_queue_pre ) {
+ enum BATTLEGROUNDS_QUEUE_ACK (*preHookFunc) (struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_can_queue_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_can_queue_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, arena, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.can_queue(sd, arena, type);
+ }
+ if( HPMHooks.count.HP_bg_can_queue_post ) {
+ enum BATTLEGROUNDS_QUEUE_ACK (*postHookFunc) (enum BATTLEGROUNDS_QUEUE_ACK retVal___, struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_can_queue_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_can_queue_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, arena, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_bg_id2pos(int queue_id, int account_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_bg_id2pos_pre ) {
+ int (*preHookFunc) (int *queue_id, int *account_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_id2pos_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_id2pos_pre[hIndex].func;
+ retVal___ = preHookFunc(&queue_id, &account_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.id2pos(queue_id, account_id);
+ }
+ if( HPMHooks.count.HP_bg_id2pos_post ) {
+ int (*postHookFunc) (int retVal___, int *queue_id, int *account_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_id2pos_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_id2pos_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &queue_id, &account_id);
+ }
+ }
+ return retVal___;
+}
+void HP_bg_queue_pc_cleanup(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_bg_queue_pc_cleanup_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pc_cleanup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_queue_pc_cleanup_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.bg.queue_pc_cleanup(sd);
+ }
+ if( HPMHooks.count.HP_bg_queue_pc_cleanup_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pc_cleanup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_queue_pc_cleanup_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_bg_begin(struct bg_arena *arena) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_bg_begin_pre ) {
+ void (*preHookFunc) (struct bg_arena *arena);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_begin_pre[hIndex].func;
+ preHookFunc(arena);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.bg.begin(arena);
+ }
+ if( HPMHooks.count.HP_bg_begin_post ) {
+ void (*postHookFunc) (struct bg_arena *arena);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_begin_post[hIndex].func;
+ postHookFunc(arena);
+ }
+ }
+ return;
+}
+int HP_bg_begin_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_bg_begin_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_begin_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.begin_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_bg_begin_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_begin_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_bg_queue_pregame(struct bg_arena *arena) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_bg_queue_pregame_pre ) {
+ void (*preHookFunc) (struct bg_arena *arena);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pregame_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_queue_pregame_pre[hIndex].func;
+ preHookFunc(arena);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.bg.queue_pregame(arena);
+ }
+ if( HPMHooks.count.HP_bg_queue_pregame_post ) {
+ void (*postHookFunc) (struct bg_arena *arena);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pregame_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_queue_pregame_post[hIndex].func;
+ postHookFunc(arena);
+ }
+ }
+ return;
+}
+int HP_bg_fillup_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_bg_fillup_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_fillup_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_fillup_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.fillup_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_bg_fillup_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_fillup_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_fillup_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_bg_queue_ready_ack(struct bg_arena *arena, struct map_session_data *sd, bool response) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_bg_queue_ready_ack_pre ) {
+ void (*preHookFunc) (struct bg_arena *arena, struct map_session_data *sd, bool *response);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_ready_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_queue_ready_ack_pre[hIndex].func;
+ preHookFunc(arena, sd, &response);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.bg.queue_ready_ack(arena, sd, response);
+ }
+ if( HPMHooks.count.HP_bg_queue_ready_ack_post ) {
+ void (*postHookFunc) (struct bg_arena *arena, struct map_session_data *sd, bool *response);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_ready_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_queue_ready_ack_post[hIndex].func;
+ postHookFunc(arena, sd, &response);
+ }
+ }
+ return;
+}
+void HP_bg_match_over(struct bg_arena *arena, bool canceled) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_bg_match_over_pre ) {
+ void (*preHookFunc) (struct bg_arena *arena, bool *canceled);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_match_over_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_match_over_pre[hIndex].func;
+ preHookFunc(arena, &canceled);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.bg.match_over(arena, canceled);
+ }
+ if( HPMHooks.count.HP_bg_match_over_post ) {
+ void (*postHookFunc) (struct bg_arena *arena, bool *canceled);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_match_over_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_match_over_post[hIndex].func;
+ postHookFunc(arena, &canceled);
+ }
+ }
+ return;
+}
+void HP_bg_queue_check(struct bg_arena *arena) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_bg_queue_check_pre ) {
+ void (*preHookFunc) (struct bg_arena *arena);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_queue_check_pre[hIndex].func;
+ preHookFunc(arena);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.bg.queue_check(arena);
+ }
+ if( HPMHooks.count.HP_bg_queue_check_post ) {
+ void (*postHookFunc) (struct bg_arena *arena);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_queue_check_post[hIndex].func;
+ postHookFunc(arena);
+ }
+ }
+ return;
+}
+struct battleground_data* HP_bg_team_search(int bg_id) {
+ int hIndex = 0;
+ struct battleground_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_bg_team_search_pre ) {
+ struct battleground_data* (*preHookFunc) (int *bg_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_team_search_pre[hIndex].func;
+ retVal___ = preHookFunc(&bg_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.team_search(bg_id);
+ }
+ if( HPMHooks.count.HP_bg_team_search_post ) {
+ struct battleground_data* (*postHookFunc) (struct battleground_data* retVal___, int *bg_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_team_search_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &bg_id);
+ }
+ }
+ return retVal___;
+}
+struct map_session_data* HP_bg_getavailablesd(struct battleground_data *bgd) {
+ int hIndex = 0;
+ struct map_session_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_bg_getavailablesd_pre ) {
+ struct map_session_data* (*preHookFunc) (struct battleground_data *bgd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_getavailablesd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_getavailablesd_pre[hIndex].func;
+ retVal___ = preHookFunc(bgd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.getavailablesd(bgd);
+ }
+ if( HPMHooks.count.HP_bg_getavailablesd_post ) {
+ struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct battleground_data *bgd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_getavailablesd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_getavailablesd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bgd);
+ }
+ }
+ return retVal___;
+}
+int HP_bg_team_delete(int bg_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_bg_team_delete_pre ) {
+ int (*preHookFunc) (int *bg_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_team_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(&bg_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.team_delete(bg_id);
+ }
+ if( HPMHooks.count.HP_bg_team_delete_post ) {
+ int (*postHookFunc) (int retVal___, int *bg_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_team_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &bg_id);
+ }
+ }
+ return retVal___;
+}
+int HP_bg_team_warp(int bg_id, unsigned short mapindex, short x, short y) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_bg_team_warp_pre ) {
+ int (*preHookFunc) (int *bg_id, unsigned short *mapindex, 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.team_warp(bg_id, mapindex, x, y);
+ }
+ if( HPMHooks.count.HP_bg_team_warp_post ) {
+ int (*postHookFunc) (int retVal___, int *bg_id, unsigned short *mapindex, 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);
+ }
+ }
+ return retVal___;
+}
+int HP_bg_send_dot_remove(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_bg_send_dot_remove_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_dot_remove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_send_dot_remove_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.send_dot_remove(sd);
+ }
+ if( HPMHooks.count.HP_bg_send_dot_remove_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_dot_remove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_send_dot_remove_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_bg_team_join(int bg_id, struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_bg_team_join_pre ) {
+ int (*preHookFunc) (int *bg_id, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_join_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_team_join_pre[hIndex].func;
+ retVal___ = preHookFunc(&bg_id, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.team_join(bg_id, sd);
+ }
+ if( HPMHooks.count.HP_bg_team_join_post ) {
+ int (*postHookFunc) (int retVal___, int *bg_id, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_join_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_team_join_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &bg_id, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_bg_team_leave(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_bg_team_leave_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_leave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_team_leave_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.team_leave(sd, flag);
+ }
+ if( HPMHooks.count.HP_bg_team_leave_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_leave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_team_leave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_bg_member_respawn(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_bg_member_respawn_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_member_respawn_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_member_respawn_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.member_respawn(sd);
+ }
+ if( HPMHooks.count.HP_bg_member_respawn_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_member_respawn_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_member_respawn_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_bg_create(unsigned short mapindex, short rx, short ry, const char *ev, const char *dev) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_bg_create_pre ) {
+ int (*preHookFunc) (unsigned short *mapindex, 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.create(mapindex, 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);
+ 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);
+ }
+ }
+ return retVal___;
+}
+int HP_bg_team_get_id(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_bg_team_get_id_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_get_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_team_get_id_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.team_get_id(bl);
+ }
+ if( HPMHooks.count.HP_bg_team_get_id_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_get_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_team_get_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_bg_send_message(struct map_session_data *sd, const char *mes, int len) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_bg_send_message_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_send_message_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, mes, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.send_message(sd, mes, len);
+ }
+ if( HPMHooks.count.HP_bg_send_message_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_send_message_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, mes, &len);
+ }
+ }
+ return retVal___;
+}
+int HP_bg_send_xy_timer_sub(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_bg_send_xy_timer_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_bg_send_xy_timer_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.bg.send_xy_timer_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_bg_send_xy_timer_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_bg_send_xy_timer_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_bg_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_bg_send_xy_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_send_xy_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.bg.send_xy_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_bg_send_xy_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_send_xy_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_bg_config_read(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_bg_config_read_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_bg_config_read_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.bg.config_read();
+ }
+ if( HPMHooks.count.HP_bg_config_read_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_bg_config_read_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* buyingstore */
+bool HP_buyingstore_setup(struct map_session_data *sd, unsigned char slots) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_buyingstore_setup_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, unsigned char *slots);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_setup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_buyingstore_setup_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &slots);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.buyingstore.setup(sd, slots);
+ }
+ if( HPMHooks.count.HP_buyingstore_setup_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned char *slots);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_setup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_buyingstore_setup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &slots);
+ }
+ }
+ return retVal___;
+}
+void HP_buyingstore_create(struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const uint8 *itemlist, unsigned int count) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_buyingstore_create_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *zenylimit, unsigned char *result, const char *storename, const uint8 *itemlist, unsigned int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_buyingstore_create_pre[hIndex].func;
+ preHookFunc(sd, &zenylimit, &result, storename, itemlist, &count);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.buyingstore.create(sd, zenylimit, result, storename, itemlist, count);
+ }
+ if( HPMHooks.count.HP_buyingstore_create_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *zenylimit, unsigned char *result, const char *storename, const uint8 *itemlist, unsigned int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_buyingstore_create_post[hIndex].func;
+ postHookFunc(sd, &zenylimit, &result, storename, itemlist, &count);
+ }
+ }
+ return;
+}
+void HP_buyingstore_close(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_buyingstore_close_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_close_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_buyingstore_close_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.buyingstore.close(sd);
+ }
+ if( HPMHooks.count.HP_buyingstore_close_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_close_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_buyingstore_close_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_buyingstore_open(struct map_session_data *sd, int account_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_buyingstore_open_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *account_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_open_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_buyingstore_open_pre[hIndex].func;
+ preHookFunc(sd, &account_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.buyingstore.open(sd, account_id);
+ }
+ if( HPMHooks.count.HP_buyingstore_open_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *account_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_open_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_buyingstore_open_post[hIndex].func;
+ postHookFunc(sd, &account_id);
+ }
+ }
+ return;
+}
+void HP_buyingstore_trade(struct map_session_data *sd, int account_id, unsigned int buyer_id, const uint8 *itemlist, unsigned int count) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_buyingstore_trade_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *account_id, unsigned int *buyer_id, const uint8 *itemlist, unsigned int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_trade_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_buyingstore_trade_pre[hIndex].func;
+ preHookFunc(sd, &account_id, &buyer_id, itemlist, &count);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.buyingstore.trade(sd, account_id, buyer_id, itemlist, count);
+ }
+ if( HPMHooks.count.HP_buyingstore_trade_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *account_id, unsigned int *buyer_id, const uint8 *itemlist, unsigned int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_trade_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_buyingstore_trade_post[hIndex].func;
+ postHookFunc(sd, &account_id, &buyer_id, itemlist, &count);
+ }
+ }
+ return;
+}
+bool HP_buyingstore_search(struct map_session_data *sd, unsigned short nameid) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_buyingstore_search_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_buyingstore_search_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.buyingstore.search(sd, nameid);
+ }
+ if( HPMHooks.count.HP_buyingstore_search_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned short *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_buyingstore_search_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &nameid);
+ }
+ }
+ return retVal___;
+}
+bool HP_buyingstore_searchall(struct map_session_data *sd, const struct s_search_store_search *s) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_buyingstore_searchall_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, const struct s_search_store_search *s);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_searchall_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_buyingstore_searchall_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, s);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.buyingstore.searchall(sd, s);
+ }
+ if( HPMHooks.count.HP_buyingstore_searchall_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct s_search_store_search *s);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_searchall_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_buyingstore_searchall_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, s);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_buyingstore_getuid(void) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_buyingstore_getuid_pre ) {
+ unsigned int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_getuid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_buyingstore_getuid_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.buyingstore.getuid();
+ }
+ if( HPMHooks.count.HP_buyingstore_getuid_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_getuid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_buyingstore_getuid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+/* chat */
+int HP_chat_create_pc_chat(struct map_session_data *sd, const char *title, const char *pass, int limit, bool pub) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chat_create_pc_chat_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *title, const char *pass, int *limit, bool *pub);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_pc_chat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chat_create_pc_chat_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, title, pass, &limit, &pub);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chat.create_pc_chat(sd, title, pass, limit, pub);
+ }
+ if( HPMHooks.count.HP_chat_create_pc_chat_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *title, const char *pass, int *limit, bool *pub);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_pc_chat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chat_create_pc_chat_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, title, pass, &limit, &pub);
+ }
+ }
+ return retVal___;
+}
+int HP_chat_join(struct map_session_data *sd, int chatid, const char *pass) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chat_join_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *chatid, const char *pass);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_join_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chat_join_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &chatid, pass);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chat.join(sd, chatid, pass);
+ }
+ if( HPMHooks.count.HP_chat_join_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *chatid, const char *pass);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_join_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chat_join_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &chatid, pass);
+ }
+ }
+ return retVal___;
+}
+int HP_chat_leave(struct map_session_data *sd, bool kicked) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chat_leave_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, bool *kicked);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_leave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chat_leave_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &kicked);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chat.leave(sd, kicked);
+ }
+ if( HPMHooks.count.HP_chat_leave_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, bool *kicked);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_leave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chat_leave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &kicked);
+ }
+ }
+ return retVal___;
+}
+int HP_chat_change_owner(struct map_session_data *sd, const char *nextownername) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chat_change_owner_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *nextownername);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_owner_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chat_change_owner_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, nextownername);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chat.change_owner(sd, nextownername);
+ }
+ if( HPMHooks.count.HP_chat_change_owner_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *nextownername);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_owner_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chat_change_owner_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, nextownername);
+ }
+ }
+ return retVal___;
+}
+int HP_chat_change_status(struct map_session_data *sd, const char *title, const char *pass, int limit, bool pub) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chat_change_status_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *title, const char *pass, int *limit, bool *pub);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_status_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chat_change_status_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, title, pass, &limit, &pub);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chat.change_status(sd, title, pass, limit, pub);
+ }
+ if( HPMHooks.count.HP_chat_change_status_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *title, const char *pass, int *limit, bool *pub);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_status_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chat_change_status_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, title, pass, &limit, &pub);
+ }
+ }
+ return retVal___;
+}
+int HP_chat_kick(struct map_session_data *sd, const char *kickusername) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chat_kick_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *kickusername);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_kick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chat_kick_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, kickusername);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chat.kick(sd, kickusername);
+ }
+ if( HPMHooks.count.HP_chat_kick_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *kickusername);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_kick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chat_kick_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, kickusername);
+ }
+ }
+ return retVal___;
+}
+int HP_chat_create_npc_chat(struct npc_data *nd, const char *title, int limit, bool pub, int trigger, const char *ev, int zeny, int minLvl, int maxLvl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chat_create_npc_chat_pre ) {
+ int (*preHookFunc) (struct npc_data *nd, const char *title, int *limit, bool *pub, int *trigger, const char *ev, int *zeny, int *minLvl, int *maxLvl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_npc_chat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chat_create_npc_chat_pre[hIndex].func;
+ retVal___ = preHookFunc(nd, title, &limit, &pub, &trigger, ev, &zeny, &minLvl, &maxLvl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chat.create_npc_chat(nd, title, limit, pub, trigger, ev, zeny, minLvl, maxLvl);
+ }
+ if( HPMHooks.count.HP_chat_create_npc_chat_post ) {
+ int (*postHookFunc) (int retVal___, struct npc_data *nd, const char *title, int *limit, bool *pub, int *trigger, const char *ev, int *zeny, int *minLvl, int *maxLvl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_npc_chat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chat_create_npc_chat_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, nd, title, &limit, &pub, &trigger, ev, &zeny, &minLvl, &maxLvl);
+ }
+ }
+ return retVal___;
+}
+int HP_chat_delete_npc_chat(struct npc_data *nd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chat_delete_npc_chat_pre ) {
+ int (*preHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_delete_npc_chat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chat_delete_npc_chat_pre[hIndex].func;
+ retVal___ = preHookFunc(nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chat.delete_npc_chat(nd);
+ }
+ if( HPMHooks.count.HP_chat_delete_npc_chat_post ) {
+ int (*postHookFunc) (int retVal___, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_delete_npc_chat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chat_delete_npc_chat_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, nd);
+ }
+ }
+ return retVal___;
+}
+int HP_chat_enable_event(struct chat_data *cd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chat_enable_event_pre ) {
+ int (*preHookFunc) (struct chat_data *cd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_enable_event_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chat_enable_event_pre[hIndex].func;
+ retVal___ = preHookFunc(cd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chat.enable_event(cd);
+ }
+ if( HPMHooks.count.HP_chat_enable_event_post ) {
+ int (*postHookFunc) (int retVal___, struct chat_data *cd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_enable_event_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chat_enable_event_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, cd);
+ }
+ }
+ return retVal___;
+}
+int HP_chat_disable_event(struct chat_data *cd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chat_disable_event_pre ) {
+ int (*preHookFunc) (struct chat_data *cd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_disable_event_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chat_disable_event_pre[hIndex].func;
+ retVal___ = preHookFunc(cd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chat.disable_event(cd);
+ }
+ if( HPMHooks.count.HP_chat_disable_event_post ) {
+ int (*postHookFunc) (int retVal___, struct chat_data *cd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_disable_event_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chat_disable_event_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, cd);
+ }
+ }
+ return retVal___;
+}
+int HP_chat_npc_kick_all(struct chat_data *cd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chat_npc_kick_all_pre ) {
+ int (*preHookFunc) (struct chat_data *cd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_npc_kick_all_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chat_npc_kick_all_pre[hIndex].func;
+ retVal___ = preHookFunc(cd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chat.npc_kick_all(cd);
+ }
+ if( HPMHooks.count.HP_chat_npc_kick_all_post ) {
+ int (*postHookFunc) (int retVal___, struct chat_data *cd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_npc_kick_all_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chat_npc_kick_all_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, cd);
+ }
+ }
+ return retVal___;
+}
+int HP_chat_trigger_event(struct chat_data *cd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chat_trigger_event_pre ) {
+ int (*preHookFunc) (struct chat_data *cd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_trigger_event_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chat_trigger_event_pre[hIndex].func;
+ retVal___ = preHookFunc(cd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chat.trigger_event(cd);
+ }
+ if( HPMHooks.count.HP_chat_trigger_event_post ) {
+ int (*postHookFunc) (int retVal___, struct chat_data *cd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_trigger_event_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chat_trigger_event_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, cd);
+ }
+ }
+ return retVal___;
+}
+struct chat_data* HP_chat_create(struct block_list *bl, const char *title, const char *pass, int limit, bool pub, int trigger, const char *ev, int zeny, int minLvl, int maxLvl) {
+ int hIndex = 0;
+ struct chat_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_chat_create_pre ) {
+ struct chat_data* (*preHookFunc) (struct block_list *bl, const char *title, const char *pass, int *limit, bool *pub, int *trigger, const char *ev, int *zeny, int *minLvl, int *maxLvl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chat_create_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, title, pass, &limit, &pub, &trigger, ev, &zeny, &minLvl, &maxLvl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chat.create(bl, title, pass, limit, pub, trigger, ev, zeny, minLvl, maxLvl);
+ }
+ if( HPMHooks.count.HP_chat_create_post ) {
+ struct chat_data* (*postHookFunc) (struct chat_data* retVal___, struct block_list *bl, const char *title, const char *pass, int *limit, bool *pub, int *trigger, const char *ev, int *zeny, int *minLvl, int *maxLvl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chat_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, title, pass, &limit, &pub, &trigger, ev, &zeny, &minLvl, &maxLvl);
+ }
+ }
+ return retVal___;
+}
+/* chrif */
+int HP_chrif_final(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_final_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_final_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.final();
+ }
+ if( HPMHooks.count.HP_chrif_final_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_init(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_init_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_init_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.init();
+ }
+ if( HPMHooks.count.HP_chrif_init_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_chrif_setuserid(char *id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_setuserid_pre ) {
+ void (*preHookFunc) (char *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setuserid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_setuserid_pre[hIndex].func;
+ preHookFunc(id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.setuserid(id);
+ }
+ if( HPMHooks.count.HP_chrif_setuserid_post ) {
+ void (*postHookFunc) (char *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setuserid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_setuserid_post[hIndex].func;
+ postHookFunc(id);
+ }
+ }
+ return;
+}
+void HP_chrif_setpasswd(char *pwd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_setpasswd_pre ) {
+ void (*preHookFunc) (char *pwd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setpasswd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_setpasswd_pre[hIndex].func;
+ preHookFunc(pwd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.setpasswd(pwd);
+ }
+ if( HPMHooks.count.HP_chrif_setpasswd_post ) {
+ void (*postHookFunc) (char *pwd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setpasswd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_setpasswd_post[hIndex].func;
+ postHookFunc(pwd);
+ }
+ }
+ return;
+}
+void HP_chrif_checkdefaultlogin(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_checkdefaultlogin_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_checkdefaultlogin_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_checkdefaultlogin_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.checkdefaultlogin();
+ }
+ if( HPMHooks.count.HP_chrif_checkdefaultlogin_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_checkdefaultlogin_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_checkdefaultlogin_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_chrif_setip(const char *ip) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_setip_pre ) {
+ int (*preHookFunc) (const char *ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_setip_pre[hIndex].func;
+ retVal___ = preHookFunc(ip);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.setip(ip);
+ }
+ if( HPMHooks.count.HP_chrif_setip_post ) {
+ int (*postHookFunc) (int retVal___, const char *ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_setip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ip);
+ }
+ }
+ return retVal___;
+}
+void HP_chrif_setport(uint16 port) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_setport_pre ) {
+ void (*preHookFunc) (uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setport_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_setport_pre[hIndex].func;
+ preHookFunc(&port);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.setport(port);
+ }
+ if( HPMHooks.count.HP_chrif_setport_post ) {
+ void (*postHookFunc) (uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setport_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_setport_post[hIndex].func;
+ postHookFunc(&port);
+ }
+ }
+ return;
+}
+int HP_chrif_isconnected(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_isconnected_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_isconnected_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_isconnected_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.isconnected();
+ }
+ if( HPMHooks.count.HP_chrif_isconnected_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_isconnected_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_isconnected_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_chrif_check_shutdown(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_check_shutdown_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_shutdown_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_check_shutdown_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.check_shutdown();
+ }
+ if( HPMHooks.count.HP_chrif_check_shutdown_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_shutdown_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_check_shutdown_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+struct auth_node* HP_chrif_search(int account_id) {
+ int hIndex = 0;
+ struct auth_node* retVal___ = NULL;
+ if( HPMHooks.count.HP_chrif_search_pre ) {
+ struct auth_node* (*preHookFunc) (int *account_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_search_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.search(account_id);
+ }
+ if( HPMHooks.count.HP_chrif_search_post ) {
+ struct auth_node* (*postHookFunc) (struct auth_node* retVal___, int *account_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_search_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id);
+ }
+ }
+ return retVal___;
+}
+struct auth_node* HP_chrif_auth_check(int account_id, int char_id, enum sd_state state) {
+ int hIndex = 0;
+ struct auth_node* retVal___ = NULL;
+ if( HPMHooks.count.HP_chrif_auth_check_pre ) {
+ struct auth_node* (*preHookFunc) (int *account_id, int *char_id, enum sd_state *state);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_auth_check_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, &char_id, &state);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.auth_check(account_id, char_id, state);
+ }
+ if( HPMHooks.count.HP_chrif_auth_check_post ) {
+ struct auth_node* (*postHookFunc) (struct auth_node* retVal___, int *account_id, int *char_id, enum sd_state *state);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_auth_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, &char_id, &state);
+ }
+ }
+ return retVal___;
+}
+bool HP_chrif_auth_delete(int account_id, int char_id, enum sd_state state) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_chrif_auth_delete_pre ) {
+ bool (*preHookFunc) (int *account_id, int *char_id, enum sd_state *state);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_auth_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, &char_id, &state);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.auth_delete(account_id, char_id, state);
+ }
+ if( HPMHooks.count.HP_chrif_auth_delete_post ) {
+ bool (*postHookFunc) (bool retVal___, int *account_id, int *char_id, enum sd_state *state);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_auth_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, &char_id, &state);
+ }
+ }
+ return retVal___;
+}
+bool HP_chrif_auth_finished(struct map_session_data *sd) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_chrif_auth_finished_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_finished_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_auth_finished_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.auth_finished(sd);
+ }
+ if( HPMHooks.count.HP_chrif_auth_finished_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_finished_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_auth_finished_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+void HP_chrif_authreq(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_authreq_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authreq_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_authreq_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.authreq(sd);
+ }
+ if( HPMHooks.count.HP_chrif_authreq_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authreq_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_authreq_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_chrif_authok(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_authok_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authok_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_authok_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.authok(fd);
+ }
+ if( HPMHooks.count.HP_chrif_authok_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authok_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_authok_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+int HP_chrif_scdata_request(int account_id, int char_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_scdata_request_pre ) {
+ int (*preHookFunc) (int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_scdata_request_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_scdata_request_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.scdata_request(account_id, char_id);
+ }
+ if( HPMHooks.count.HP_chrif_scdata_request_post ) {
+ int (*postHookFunc) (int retVal___, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_scdata_request_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_scdata_request_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, &char_id);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_save(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_save_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_save_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.save(sd, flag);
+ }
+ if( HPMHooks.count.HP_chrif_save_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_save_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_charselectreq(struct map_session_data *sd, uint32 s_ip) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_charselectreq_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint32 *s_ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_charselectreq_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_charselectreq_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &s_ip);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.charselectreq(sd, s_ip);
+ }
+ if( HPMHooks.count.HP_chrif_charselectreq_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint32 *s_ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_charselectreq_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_charselectreq_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &s_ip);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_changemapserver(struct map_session_data *sd, uint32 ip, uint16 port) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_changemapserver_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint32 *ip, uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserver_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_changemapserver_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &ip, &port);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.changemapserver(sd, ip, port);
+ }
+ if( HPMHooks.count.HP_chrif_changemapserver_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint32 *ip, uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserver_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_changemapserver_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &ip, &port);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_searchcharid(int char_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_searchcharid_pre ) {
+ int (*preHookFunc) (int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_searchcharid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_searchcharid_pre[hIndex].func;
+ retVal___ = preHookFunc(&char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.searchcharid(char_id);
+ }
+ if( HPMHooks.count.HP_chrif_searchcharid_post ) {
+ int (*postHookFunc) (int retVal___, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_searchcharid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_searchcharid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &char_id);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_changeemail(int id, const char *actual_email, const char *new_email) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_changeemail_pre ) {
+ int (*preHookFunc) (int *id, const char *actual_email, const char *new_email);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changeemail_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_changeemail_pre[hIndex].func;
+ retVal___ = preHookFunc(&id, actual_email, new_email);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.changeemail(id, actual_email, new_email);
+ }
+ if( HPMHooks.count.HP_chrif_changeemail_post ) {
+ int (*postHookFunc) (int retVal___, int *id, const char *actual_email, const char *new_email);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changeemail_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_changeemail_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id, actual_email, new_email);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_char_ask_name(int acc, const char *character_name, unsigned short operation_type, int year, int month, int day, int hour, int minute, int second) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_char_ask_name_pre ) {
+ int (*preHookFunc) (int *acc, const char *character_name, unsigned short *operation_type, int *year, int *month, int *day, int *hour, int *minute, int *second);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_char_ask_name_pre[hIndex].func;
+ retVal___ = preHookFunc(&acc, character_name, &operation_type, &year, &month, &day, &hour, &minute, &second);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.char_ask_name(acc, character_name, operation_type, year, month, day, hour, minute, second);
+ }
+ if( HPMHooks.count.HP_chrif_char_ask_name_post ) {
+ int (*postHookFunc) (int retVal___, int *acc, const char *character_name, unsigned short *operation_type, int *year, int *month, int *day, int *hour, int *minute, int *second);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_char_ask_name_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &acc, character_name, &operation_type, &year, &month, &day, &hour, &minute, &second);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_updatefamelist(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_updatefamelist_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_updatefamelist_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.updatefamelist(sd);
+ }
+ if( HPMHooks.count.HP_chrif_updatefamelist_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_updatefamelist_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_buildfamelist(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_buildfamelist_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_buildfamelist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_buildfamelist_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.buildfamelist();
+ }
+ if( HPMHooks.count.HP_chrif_buildfamelist_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_buildfamelist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_buildfamelist_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_save_scdata(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_save_scdata_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_save_scdata_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.save_scdata(sd);
+ }
+ if( HPMHooks.count.HP_chrif_save_scdata_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_save_scdata_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_ragsrvinfo_pre ) {
+ int (*preHookFunc) (int *base_rate, int *job_rate, int *drop_rate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_ragsrvinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_ragsrvinfo_pre[hIndex].func;
+ retVal___ = preHookFunc(&base_rate, &job_rate, &drop_rate);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.ragsrvinfo(base_rate, job_rate, drop_rate);
+ }
+ if( HPMHooks.count.HP_chrif_ragsrvinfo_post ) {
+ int (*postHookFunc) (int retVal___, int *base_rate, int *job_rate, int *drop_rate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_ragsrvinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_ragsrvinfo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &base_rate, &job_rate, &drop_rate);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_char_offline(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_char_offline_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_offline_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_char_offline_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.char_offline(sd);
+ }
+ if( HPMHooks.count.HP_chrif_char_offline_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_offline_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_char_offline_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_char_offline_nsd(int account_id, int char_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_char_offline_nsd_pre ) {
+ int (*preHookFunc) (int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_offline_nsd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_char_offline_nsd_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.char_offline_nsd(account_id, char_id);
+ }
+ if( HPMHooks.count.HP_chrif_char_offline_nsd_post ) {
+ int (*postHookFunc) (int retVal___, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_offline_nsd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_char_offline_nsd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, &char_id);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_char_reset_offline(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_char_reset_offline_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_reset_offline_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_char_reset_offline_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.char_reset_offline();
+ }
+ if( HPMHooks.count.HP_chrif_char_reset_offline_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_reset_offline_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_char_reset_offline_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_send_users_tochar(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_send_users_tochar_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_users_tochar_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_send_users_tochar_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.send_users_tochar();
+ }
+ if( HPMHooks.count.HP_chrif_send_users_tochar_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_users_tochar_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_send_users_tochar_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_char_online(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_char_online_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_online_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_char_online_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.char_online(sd);
+ }
+ if( HPMHooks.count.HP_chrif_char_online_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_online_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_char_online_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_changesex(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_changesex_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changesex_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_changesex_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.changesex(sd);
+ }
+ if( HPMHooks.count.HP_chrif_changesex_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changesex_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_changesex_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_divorce(int partner_id1, int partner_id2) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_divorce_pre ) {
+ int (*preHookFunc) (int *partner_id1, int *partner_id2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorce_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_divorce_pre[hIndex].func;
+ retVal___ = preHookFunc(&partner_id1, &partner_id2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.divorce(partner_id1, partner_id2);
+ }
+ if( HPMHooks.count.HP_chrif_divorce_post ) {
+ int (*postHookFunc) (int retVal___, int *partner_id1, int *partner_id2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorce_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_divorce_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &partner_id1, &partner_id2);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_removefriend(int char_id, int friend_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_removefriend_pre ) {
+ int (*preHookFunc) (int *char_id, int *friend_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removefriend_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_removefriend_pre[hIndex].func;
+ retVal___ = preHookFunc(&char_id, &friend_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.removefriend(char_id, friend_id);
+ }
+ if( HPMHooks.count.HP_chrif_removefriend_post ) {
+ int (*postHookFunc) (int retVal___, int *char_id, int *friend_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removefriend_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_removefriend_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &char_id, &friend_id);
+ }
+ }
+ return retVal___;
+}
+void HP_chrif_send_report(char *buf, int len) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_send_report_pre ) {
+ void (*preHookFunc) (char *buf, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_report_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_send_report_pre[hIndex].func;
+ preHookFunc(buf, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.send_report(buf, len);
+ }
+ if( HPMHooks.count.HP_chrif_send_report_post ) {
+ void (*postHookFunc) (char *buf, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_report_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_send_report_post[hIndex].func;
+ postHookFunc(buf, &len);
+ }
+ }
+ return;
+}
+int HP_chrif_flush_fifo(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_flush_fifo_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_fifo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_flush_fifo_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.flush_fifo();
+ }
+ if( HPMHooks.count.HP_chrif_flush_fifo_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_fifo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_flush_fifo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_chrif_skillid2idx(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_skillid2idx_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_skillid2idx_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_skillid2idx_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.skillid2idx(fd);
+ }
+ if( HPMHooks.count.HP_chrif_skillid2idx_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_skillid2idx_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_skillid2idx_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+bool HP_chrif_sd_to_auth(TBL_PC *sd, enum sd_state state) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_chrif_sd_to_auth_pre ) {
+ bool (*preHookFunc) (TBL_PC *sd, enum sd_state *state);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sd_to_auth_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_sd_to_auth_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &state);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.sd_to_auth(sd, state);
+ }
+ if( HPMHooks.count.HP_chrif_sd_to_auth_post ) {
+ bool (*postHookFunc) (bool retVal___, TBL_PC *sd, enum sd_state *state);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sd_to_auth_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_sd_to_auth_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &state);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_check_connect_char_server(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_check_connect_char_server_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_connect_char_server_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_check_connect_char_server_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.check_connect_char_server(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_chrif_check_connect_char_server_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_connect_char_server_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_check_connect_char_server_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+bool HP_chrif_auth_logout(TBL_PC *sd, enum sd_state state) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_chrif_auth_logout_pre ) {
+ bool (*preHookFunc) (TBL_PC *sd, enum sd_state *state);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_logout_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_auth_logout_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &state);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.auth_logout(sd, state);
+ }
+ if( HPMHooks.count.HP_chrif_auth_logout_post ) {
+ bool (*postHookFunc) (bool retVal___, TBL_PC *sd, enum sd_state *state);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_logout_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_auth_logout_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &state);
+ }
+ }
+ return retVal___;
+}
+void HP_chrif_save_ack(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_save_ack_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_save_ack_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.save_ack(fd);
+ }
+ if( HPMHooks.count.HP_chrif_save_ack_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_save_ack_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+int HP_chrif_reconnect(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_reconnect_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_reconnect_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_chrif_reconnect_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.chrif.reconnect(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_chrif_reconnect_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_reconnect_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_chrif_reconnect_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_auth_db_cleanup_sub(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_auth_db_cleanup_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_chrif_auth_db_cleanup_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.chrif.auth_db_cleanup_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_chrif_auth_db_cleanup_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_chrif_auth_db_cleanup_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_chrif_char_ask_name_answer(int acc, const char *player_name, uint16 type, uint16 answer) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_char_ask_name_answer_pre ) {
+ void (*preHookFunc) (int *acc, const char *player_name, uint16 *type, uint16 *answer);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_answer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_char_ask_name_answer_pre[hIndex].func;
+ preHookFunc(&acc, player_name, &type, &answer);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.char_ask_name_answer(acc, player_name, type, answer);
+ }
+ if( HPMHooks.count.HP_chrif_char_ask_name_answer_post ) {
+ void (*postHookFunc) (int *acc, const char *player_name, uint16 *type, uint16 *answer);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_answer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_char_ask_name_answer_post[hIndex].func;
+ postHookFunc(&acc, player_name, &type, &answer);
+ }
+ }
+ return;
+}
+int HP_chrif_auth_db_final(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_auth_db_final_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_final_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_chrif_auth_db_final_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.chrif.auth_db_final(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_chrif_auth_db_final_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_final_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_chrif_auth_db_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_send_usercount_tochar(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_send_usercount_tochar_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_usercount_tochar_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_send_usercount_tochar_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.send_usercount_tochar(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_chrif_send_usercount_tochar_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_usercount_tochar_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_send_usercount_tochar_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_auth_db_cleanup(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_auth_db_cleanup_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_auth_db_cleanup_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.auth_db_cleanup(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_chrif_auth_db_cleanup_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_auth_db_cleanup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_connect(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_connect_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_connect_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.connect(fd);
+ }
+ if( HPMHooks.count.HP_chrif_connect_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_connect_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_connectack(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_connectack_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connectack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_connectack_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.connectack(fd);
+ }
+ if( HPMHooks.count.HP_chrif_connectack_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connectack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_connectack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_sendmap(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_sendmap_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_sendmap_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.sendmap(fd);
+ }
+ if( HPMHooks.count.HP_chrif_sendmap_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_sendmap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_sendmapack(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_sendmapack_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmapack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_sendmapack_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.sendmapack(fd);
+ }
+ if( HPMHooks.count.HP_chrif_sendmapack_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmapack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_sendmapack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_recvmap(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_recvmap_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvmap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_recvmap_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.recvmap(fd);
+ }
+ if( HPMHooks.count.HP_chrif_recvmap_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvmap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_recvmap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_changemapserverack(int account_id, int login_id1, int login_id2, int char_id, short map_index, short x, short y, uint32 ip, uint16 port) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_changemapserverack_pre ) {
+ int (*preHookFunc) (int *account_id, int *login_id1, int *login_id2, int *char_id, short *map_index, short *x, short *y, uint32 *ip, uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserverack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_changemapserverack_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, &login_id1, &login_id2, &char_id, &map_index, &x, &y, &ip, &port);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.changemapserverack(account_id, login_id1, login_id2, char_id, map_index, x, y, ip, port);
+ }
+ if( HPMHooks.count.HP_chrif_changemapserverack_post ) {
+ int (*postHookFunc) (int retVal___, int *account_id, int *login_id1, int *login_id2, int *char_id, short *map_index, short *x, short *y, uint32 *ip, uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserverack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_changemapserverack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, &login_id1, &login_id2, &char_id, &map_index, &x, &y, &ip, &port);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_changedsex(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_changedsex_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changedsex_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_changedsex_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.changedsex(fd);
+ }
+ if( HPMHooks.count.HP_chrif_changedsex_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changedsex_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_changedsex_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_divorceack(int char_id, int partner_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_divorceack_pre ) {
+ int (*preHookFunc) (int *char_id, int *partner_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorceack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_divorceack_pre[hIndex].func;
+ retVal___ = preHookFunc(&char_id, &partner_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.divorceack(char_id, partner_id);
+ }
+ if( HPMHooks.count.HP_chrif_divorceack_post ) {
+ int (*postHookFunc) (int retVal___, int *char_id, int *partner_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorceack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_divorceack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &char_id, &partner_id);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_accountban(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_accountban_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_accountban_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_accountban_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.accountban(fd);
+ }
+ if( HPMHooks.count.HP_chrif_accountban_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_accountban_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_accountban_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_recvfamelist(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_recvfamelist_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvfamelist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_recvfamelist_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.recvfamelist(fd);
+ }
+ if( HPMHooks.count.HP_chrif_recvfamelist_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvfamelist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_recvfamelist_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_load_scdata(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_load_scdata_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_load_scdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_load_scdata_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.load_scdata(fd);
+ }
+ if( HPMHooks.count.HP_chrif_load_scdata_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_load_scdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_load_scdata_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+void HP_chrif_update_ip(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_update_ip_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_update_ip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_update_ip_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.update_ip(fd);
+ }
+ if( HPMHooks.count.HP_chrif_update_ip_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_update_ip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_update_ip_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+int HP_chrif_disconnectplayer(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_disconnectplayer_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_disconnectplayer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_disconnectplayer_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.disconnectplayer(fd);
+ }
+ if( HPMHooks.count.HP_chrif_disconnectplayer_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_disconnectplayer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_disconnectplayer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_removemap(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_removemap_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removemap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_removemap_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.removemap(fd);
+ }
+ if( HPMHooks.count.HP_chrif_removemap_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removemap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_removemap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+int HP_chrif_updatefamelist_ack(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_updatefamelist_ack_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_updatefamelist_ack_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.updatefamelist_ack(fd);
+ }
+ if( HPMHooks.count.HP_chrif_updatefamelist_ack_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_updatefamelist_ack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+void HP_chrif_keepalive(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_keepalive_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_keepalive_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.keepalive(fd);
+ }
+ if( HPMHooks.count.HP_chrif_keepalive_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_keepalive_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_chrif_keepalive_ack(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_keepalive_ack_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_keepalive_ack_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.keepalive_ack(fd);
+ }
+ if( HPMHooks.count.HP_chrif_keepalive_ack_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_keepalive_ack_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+int HP_chrif_deadopt(int father_id, int mother_id, int child_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_deadopt_pre ) {
+ int (*preHookFunc) (int *father_id, int *mother_id, int *child_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_deadopt_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_deadopt_pre[hIndex].func;
+ retVal___ = preHookFunc(&father_id, &mother_id, &child_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.deadopt(father_id, mother_id, child_id);
+ }
+ if( HPMHooks.count.HP_chrif_deadopt_post ) {
+ int (*postHookFunc) (int retVal___, int *father_id, int *mother_id, int *child_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_deadopt_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_deadopt_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &father_id, &mother_id, &child_id);
+ }
+ }
+ return retVal___;
+}
+void HP_chrif_authfail(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_authfail_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authfail_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_authfail_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.authfail(fd);
+ }
+ if( HPMHooks.count.HP_chrif_authfail_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authfail_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_authfail_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_chrif_on_ready(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_on_ready_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_ready_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_on_ready_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.on_ready();
+ }
+ if( HPMHooks.count.HP_chrif_on_ready_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_ready_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_on_ready_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_chrif_on_disconnect(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_chrif_on_disconnect_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_disconnect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_on_disconnect_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.chrif.on_disconnect();
+ }
+ if( HPMHooks.count.HP_chrif_on_disconnect_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_disconnect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_on_disconnect_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_chrif_parse(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_chrif_parse_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_parse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_parse_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chrif.parse(fd);
+ }
+ if( HPMHooks.count.HP_chrif_parse_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_parse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_parse_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+/* clif */
+int HP_clif_init(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_init_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_init_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.init();
+ }
+ if( HPMHooks.count.HP_clif_init_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.final();
+ }
+ if( HPMHooks.count.HP_clif_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_clif_setip(const char *ip) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_setip_pre ) {
+ int (*preHookFunc) (const char *ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_setip_pre[hIndex].func;
+ retVal___ = preHookFunc(ip);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.setip(ip);
+ }
+ if( HPMHooks.count.HP_clif_setip_post ) {
+ int (*postHookFunc) (int retVal___, const char *ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_setip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ip);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_setbindip(const char *ip) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_setbindip_pre ) {
+ void (*preHookFunc) (const char *ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_setbindip_pre[hIndex].func;
+ preHookFunc(ip);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.setbindip(ip);
+ }
+ if( HPMHooks.count.HP_clif_setbindip_post ) {
+ void (*postHookFunc) (const char *ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_setbindip_post[hIndex].func;
+ postHookFunc(ip);
+ }
+ }
+ return;
+}
+void HP_clif_setport(uint16 port) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_setport_pre ) {
+ void (*preHookFunc) (uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setport_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_setport_pre[hIndex].func;
+ preHookFunc(&port);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.setport(port);
+ }
+ if( HPMHooks.count.HP_clif_setport_post ) {
+ void (*postHookFunc) (uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setport_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_setport_post[hIndex].func;
+ postHookFunc(&port);
+ }
+ }
+ return;
+}
+uint32 HP_clif_refresh_ip(void) {
+ int hIndex = 0;
+ uint32 retVal___;
+ memset(&retVal___, '\0', sizeof(uint32));
+ if( HPMHooks.count.HP_clif_refresh_ip_pre ) {
+ uint32 (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_ip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_refresh_ip_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.refresh_ip();
+ }
+ if( HPMHooks.count.HP_clif_refresh_ip_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_ip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_refresh_ip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_clif_send(const void *buf, int len, struct block_list *bl, enum send_target type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_send_pre ) {
+ int (*preHookFunc) (const void *buf, int *len, struct block_list *bl, enum send_target *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_send_pre[hIndex].func;
+ retVal___ = preHookFunc(buf, &len, bl, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.send(buf, len, bl, type);
+ }
+ if( HPMHooks.count.HP_clif_send_post ) {
+ int (*postHookFunc) (int retVal___, const void *buf, int *len, struct block_list *bl, enum send_target *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_send_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, buf, &len, bl, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_clif_send_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_send_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_clif_send_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.clif.send_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_clif_send_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_clif_send_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_clif_parse(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_parse_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_parse_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.parse(fd);
+ }
+ if( HPMHooks.count.HP_clif_parse_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_parse_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_clif_parse_cmd(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_clif_parse_cmd_pre ) {
+ unsigned short (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_cmd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_parse_cmd_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.parse_cmd(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_parse_cmd_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_cmd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_parse_cmd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, sd);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_clif_decrypt_cmd(int cmd, struct map_session_data *sd) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_clif_decrypt_cmd_pre ) {
+ unsigned short (*preHookFunc) (int *cmd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_decrypt_cmd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_decrypt_cmd_pre[hIndex].func;
+ retVal___ = preHookFunc(&cmd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.decrypt_cmd(cmd, sd);
+ }
+ if( HPMHooks.count.HP_clif_decrypt_cmd_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, int *cmd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_decrypt_cmd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_decrypt_cmd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &cmd, sd);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_authok(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_authok_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authok_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_authok_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.authok(sd);
+ }
+ if( HPMHooks.count.HP_clif_authok_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authok_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_authok_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_authrefuse(int fd, uint8 error_code) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_authrefuse_pre ) {
+ void (*preHookFunc) (int *fd, uint8 *error_code);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authrefuse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_authrefuse_pre[hIndex].func;
+ preHookFunc(&fd, &error_code);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.authrefuse(fd, error_code);
+ }
+ if( HPMHooks.count.HP_clif_authrefuse_post ) {
+ void (*postHookFunc) (int *fd, uint8 *error_code);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authrefuse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_authrefuse_post[hIndex].func;
+ postHookFunc(&fd, &error_code);
+ }
+ }
+ return;
+}
+void HP_clif_authfail_fd(int fd, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_authfail_fd_pre ) {
+ void (*preHookFunc) (int *fd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authfail_fd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_authfail_fd_pre[hIndex].func;
+ preHookFunc(&fd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.authfail_fd(fd, type);
+ }
+ if( HPMHooks.count.HP_clif_authfail_fd_post ) {
+ void (*postHookFunc) (int *fd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authfail_fd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_authfail_fd_post[hIndex].func;
+ postHookFunc(&fd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_charselectok(int id, uint8 ok) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_charselectok_pre ) {
+ void (*preHookFunc) (int *id, uint8 *ok);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charselectok_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_charselectok_pre[hIndex].func;
+ preHookFunc(&id, &ok);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.charselectok(id, ok);
+ }
+ if( HPMHooks.count.HP_clif_charselectok_post ) {
+ void (*postHookFunc) (int *id, uint8 *ok);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charselectok_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_charselectok_post[hIndex].func;
+ postHookFunc(&id, &ok);
+ }
+ }
+ return;
+}
+void HP_clif_dropflooritem(struct flooritem_data *fitem) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_dropflooritem_pre ) {
+ void (*preHookFunc) (struct flooritem_data *fitem);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropflooritem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_dropflooritem_pre[hIndex].func;
+ preHookFunc(fitem);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.dropflooritem(fitem);
+ }
+ if( HPMHooks.count.HP_clif_dropflooritem_post ) {
+ void (*postHookFunc) (struct flooritem_data *fitem);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropflooritem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_dropflooritem_post[hIndex].func;
+ postHookFunc(fitem);
+ }
+ }
+ return;
+}
+void HP_clif_clearflooritem(struct flooritem_data *fitem, int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_clearflooritem_pre ) {
+ void (*preHookFunc) (struct flooritem_data *fitem, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearflooritem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_clearflooritem_pre[hIndex].func;
+ preHookFunc(fitem, &fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.clearflooritem(fitem, fd);
+ }
+ if( HPMHooks.count.HP_clif_clearflooritem_post ) {
+ void (*postHookFunc) (struct flooritem_data *fitem, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearflooritem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_clearflooritem_post[hIndex].func;
+ postHookFunc(fitem, &fd);
+ }
+ }
+ return;
+}
+void HP_clif_additem(struct map_session_data *sd, int n, int amount, int fail) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_additem_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_additem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_additem_pre[hIndex].func;
+ preHookFunc(sd, &n, &amount, &fail);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.additem(sd, n, amount, fail);
+ }
+ if( HPMHooks.count.HP_clif_additem_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *n, int *amount, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_additem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_additem_post[hIndex].func;
+ postHookFunc(sd, &n, &amount, &fail);
+ }
+ }
+ return;
+}
+void HP_clif_dropitem(struct map_session_data *sd, int n, int amount) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_dropitem_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_dropitem_pre[hIndex].func;
+ preHookFunc(sd, &n, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.dropitem(sd, n, amount);
+ }
+ if( HPMHooks.count.HP_clif_dropitem_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *n, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_dropitem_post[hIndex].func;
+ postHookFunc(sd, &n, &amount);
+ }
+ }
+ return;
+}
+void HP_clif_delitem(struct map_session_data *sd, int n, int amount, short reason) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_delitem_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, short *reason);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_delitem_pre[hIndex].func;
+ preHookFunc(sd, &n, &amount, &reason);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.delitem(sd, n, amount, reason);
+ }
+ if( HPMHooks.count.HP_clif_delitem_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *n, int *amount, short *reason);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_delitem_post[hIndex].func;
+ postHookFunc(sd, &n, &amount, &reason);
+ }
+ }
+ return;
+}
+void HP_clif_takeitem(struct block_list *src, struct block_list *dst) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_takeitem_pre ) {
+ void (*preHookFunc) (struct block_list *src, struct block_list *dst);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_takeitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_takeitem_pre[hIndex].func;
+ preHookFunc(src, dst);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.takeitem(src, dst);
+ }
+ if( HPMHooks.count.HP_clif_takeitem_post ) {
+ void (*postHookFunc) (struct block_list *src, struct block_list *dst);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_takeitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_takeitem_post[hIndex].func;
+ postHookFunc(src, dst);
+ }
+ }
+ return;
+}
+void HP_clif_arrowequip(struct map_session_data *sd, int val) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_arrowequip_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrowequip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_arrowequip_pre[hIndex].func;
+ preHookFunc(sd, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.arrowequip(sd, val);
+ }
+ if( HPMHooks.count.HP_clif_arrowequip_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrowequip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_arrowequip_post[hIndex].func;
+ postHookFunc(sd, &val);
+ }
+ }
+ return;
+}
+void HP_clif_arrow_fail(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_arrow_fail_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_fail_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_arrow_fail_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.arrow_fail(sd, type);
+ }
+ if( HPMHooks.count.HP_clif_arrow_fail_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_fail_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_arrow_fail_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_use_card(struct map_session_data *sd, int idx) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_use_card_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_use_card_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_use_card_pre[hIndex].func;
+ preHookFunc(sd, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.use_card(sd, idx);
+ }
+ if( HPMHooks.count.HP_clif_use_card_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_use_card_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_use_card_post[hIndex].func;
+ postHookFunc(sd, &idx);
+ }
+ }
+ return;
+}
+void HP_clif_cart_additem(struct map_session_data *sd, int n, int amount, int fail) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_cart_additem_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_cart_additem_pre[hIndex].func;
+ preHookFunc(sd, &n, &amount, &fail);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.cart_additem(sd, n, amount, fail);
+ }
+ if( HPMHooks.count.HP_clif_cart_additem_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *n, int *amount, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_cart_additem_post[hIndex].func;
+ postHookFunc(sd, &n, &amount, &fail);
+ }
+ }
+ return;
+}
+void HP_clif_cart_delitem(struct map_session_data *sd, int n, int amount) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_cart_delitem_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *n, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_delitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_cart_delitem_pre[hIndex].func;
+ preHookFunc(sd, &n, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.cart_delitem(sd, n, amount);
+ }
+ if( HPMHooks.count.HP_clif_cart_delitem_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *n, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_delitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_cart_delitem_post[hIndex].func;
+ postHookFunc(sd, &n, &amount);
+ }
+ }
+ return;
+}
+void HP_clif_equipitemack(struct map_session_data *sd, int n, int pos, int ok) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_equipitemack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos, int *ok);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_equipitemack_pre[hIndex].func;
+ preHookFunc(sd, &n, &pos, &ok);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.equipitemack(sd, n, pos, ok);
+ }
+ if( HPMHooks.count.HP_clif_equipitemack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos, int *ok);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_equipitemack_post[hIndex].func;
+ postHookFunc(sd, &n, &pos, &ok);
+ }
+ }
+ return;
+}
+void HP_clif_unequipitemack(struct map_session_data *sd, int n, int pos, int ok) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_unequipitemack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos, int *ok);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_unequipitemack_pre[hIndex].func;
+ preHookFunc(sd, &n, &pos, &ok);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.unequipitemack(sd, n, pos, ok);
+ }
+ if( HPMHooks.count.HP_clif_unequipitemack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos, int *ok);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_unequipitemack_post[hIndex].func;
+ postHookFunc(sd, &n, &pos, &ok);
+ }
+ }
+ return;
+}
+void HP_clif_useitemack(struct map_session_data *sd, int index, int amount, bool ok) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_useitemack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *index, int *amount, bool *ok);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_useitemack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_useitemack_pre[hIndex].func;
+ preHookFunc(sd, &index, &amount, &ok);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.useitemack(sd, index, amount, ok);
+ }
+ if( HPMHooks.count.HP_clif_useitemack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *index, int *amount, bool *ok);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_useitemack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_useitemack_post[hIndex].func;
+ postHookFunc(sd, &index, &amount, &ok);
+ }
+ }
+ return;
+}
+void HP_clif_addcards(unsigned char *buf, struct item *item) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_addcards_pre ) {
+ void (*preHookFunc) (unsigned char *buf, struct item *item);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_addcards_pre[hIndex].func;
+ preHookFunc(buf, item);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.addcards(buf, item);
+ }
+ if( HPMHooks.count.HP_clif_addcards_post ) {
+ void (*postHookFunc) (unsigned char *buf, struct item *item);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_addcards_post[hIndex].func;
+ postHookFunc(buf, item);
+ }
+ }
+ return;
+}
+void HP_clif_addcards2(unsigned short *cards, struct item *item) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_addcards2_pre ) {
+ void (*preHookFunc) (unsigned short *cards, struct item *item);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_addcards2_pre[hIndex].func;
+ preHookFunc(cards, item);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.addcards2(cards, item);
+ }
+ if( HPMHooks.count.HP_clif_addcards2_post ) {
+ void (*postHookFunc) (unsigned short *cards, struct item *item);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_addcards2_post[hIndex].func;
+ postHookFunc(cards, item);
+ }
+ }
+ return;
+}
+void HP_clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_data *id, int equip) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_item_sub_pre ) {
+ void (*preHookFunc) (unsigned char *buf, int *n, struct item *i, struct item_data *id, int *equip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_item_sub_pre[hIndex].func;
+ preHookFunc(buf, &n, i, id, &equip);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.item_sub(buf, n, i, id, equip);
+ }
+ if( HPMHooks.count.HP_clif_item_sub_post ) {
+ void (*postHookFunc) (unsigned char *buf, int *n, struct item *i, struct item_data *id, int *equip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_item_sub_post[hIndex].func;
+ postHookFunc(buf, &n, i, id, &equip);
+ }
+ }
+ return;
+}
+void HP_clif_getareachar_item(struct map_session_data *sd, struct flooritem_data *fitem) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_getareachar_item_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct flooritem_data *fitem);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_item_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_getareachar_item_pre[hIndex].func;
+ preHookFunc(sd, fitem);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.getareachar_item(sd, fitem);
+ }
+ if( HPMHooks.count.HP_clif_getareachar_item_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct flooritem_data *fitem);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_item_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_getareachar_item_post[hIndex].func;
+ postHookFunc(sd, fitem);
+ }
+ }
+ return;
+}
+void HP_clif_cart_additem_ack(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_cart_additem_ack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_cart_additem_ack_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.cart_additem_ack(sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_cart_additem_ack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_cart_additem_ack_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_cashshop_load(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_cashshop_load_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_load_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_cashshop_load_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.cashshop_load();
+ }
+ if( HPMHooks.count.HP_clif_cashshop_load_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_load_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_cashshop_load_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_clif_package_announce(struct map_session_data *sd, unsigned short nameid, unsigned short containerid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_package_announce_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid, unsigned short *containerid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_package_announce_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_package_announce_pre[hIndex].func;
+ preHookFunc(sd, &nameid, &containerid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.package_announce(sd, nameid, containerid);
+ }
+ if( HPMHooks.count.HP_clif_package_announce_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned short *nameid, unsigned short *containerid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_package_announce_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_package_announce_post[hIndex].func;
+ postHookFunc(sd, &nameid, &containerid);
+ }
+ }
+ return;
+}
+void HP_clif_clearunit_single(int id, clr_type type, int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_clearunit_single_pre ) {
+ void (*preHookFunc) (int *id, clr_type *type, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_single_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_clearunit_single_pre[hIndex].func;
+ preHookFunc(&id, &type, &fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.clearunit_single(id, type, fd);
+ }
+ if( HPMHooks.count.HP_clif_clearunit_single_post ) {
+ void (*postHookFunc) (int *id, clr_type *type, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_single_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_clearunit_single_post[hIndex].func;
+ postHookFunc(&id, &type, &fd);
+ }
+ }
+ return;
+}
+void HP_clif_clearunit_area(struct block_list *bl, clr_type type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_clearunit_area_pre ) {
+ void (*preHookFunc) (struct block_list *bl, clr_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_area_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_clearunit_area_pre[hIndex].func;
+ preHookFunc(bl, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.clearunit_area(bl, type);
+ }
+ if( HPMHooks.count.HP_clif_clearunit_area_post ) {
+ void (*postHookFunc) (struct block_list *bl, clr_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_area_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_clearunit_area_post[hIndex].func;
+ postHookFunc(bl, &type);
+ }
+ }
+ return;
+}
+void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, unsigned int tick) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_clearunit_delayed_pre ) {
+ void (*preHookFunc) (struct block_list *bl, clr_type *type, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_pre[hIndex].func;
+ preHookFunc(bl, &type, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.clearunit_delayed(bl, type, tick);
+ }
+ if( HPMHooks.count.HP_clif_clearunit_delayed_post ) {
+ void (*postHookFunc) (struct block_list *bl, clr_type *type, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_post[hIndex].func;
+ postHookFunc(bl, &type, &tick);
+ }
+ }
+ return;
+}
+void HP_clif_walkok(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_walkok_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_walkok_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_walkok_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.walkok(sd);
+ }
+ if( HPMHooks.count.HP_clif_walkok_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_walkok_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_walkok_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_move(struct unit_data *ud) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_move_pre ) {
+ void (*preHookFunc) (struct unit_data *ud);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_move_pre[hIndex].func;
+ preHookFunc(ud);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.move(ud);
+ }
+ if( HPMHooks.count.HP_clif_move_post ) {
+ void (*postHookFunc) (struct unit_data *ud);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_move_post[hIndex].func;
+ postHookFunc(ud);
+ }
+ }
+ return;
+}
+void HP_clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data *ud) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_move2_pre ) {
+ void (*preHookFunc) (struct block_list *bl, struct view_data *vd, struct unit_data *ud);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_move2_pre[hIndex].func;
+ preHookFunc(bl, vd, ud);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.move2(bl, vd, ud);
+ }
+ if( HPMHooks.count.HP_clif_move2_post ) {
+ void (*postHookFunc) (struct block_list *bl, struct view_data *vd, struct unit_data *ud);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_move2_post[hIndex].func;
+ postHookFunc(bl, vd, ud);
+ }
+ }
+ return;
+}
+void HP_clif_blown(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_blown_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blown_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_blown_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.blown(bl);
+ }
+ if( HPMHooks.count.HP_clif_blown_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blown_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_blown_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+void HP_clif_slide(struct block_list *bl, int x, int y) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_slide_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *x, int *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_slide_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_slide_pre[hIndex].func;
+ preHookFunc(bl, &x, &y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.slide(bl, x, y);
+ }
+ if( HPMHooks.count.HP_clif_slide_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *x, int *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_slide_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_slide_post[hIndex].func;
+ postHookFunc(bl, &x, &y);
+ }
+ }
+ return;
+}
+void HP_clif_fixpos(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_fixpos_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fixpos_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_fixpos_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.fixpos(bl);
+ }
+ if( HPMHooks.count.HP_clif_fixpos_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fixpos_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_fixpos_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+void HP_clif_changelook(struct block_list *bl, int type, int val) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_changelook_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changelook_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_changelook_pre[hIndex].func;
+ preHookFunc(bl, &type, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.changelook(bl, type, val);
+ }
+ if( HPMHooks.count.HP_clif_changelook_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changelook_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_changelook_post[hIndex].func;
+ postHookFunc(bl, &type, &val);
+ }
+ }
+ return;
+}
+void HP_clif_changetraplook(struct block_list *bl, int val) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_changetraplook_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changetraplook_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_changetraplook_pre[hIndex].func;
+ preHookFunc(bl, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.changetraplook(bl, val);
+ }
+ if( HPMHooks.count.HP_clif_changetraplook_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changetraplook_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_changetraplook_post[hIndex].func;
+ postHookFunc(bl, &val);
+ }
+ }
+ return;
+}
+void HP_clif_refreshlook(struct block_list *bl, int id, int type, int val, enum send_target target) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_refreshlook_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *id, int *type, int *val, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refreshlook_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_refreshlook_pre[hIndex].func;
+ preHookFunc(bl, &id, &type, &val, &target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.refreshlook(bl, id, type, val, target);
+ }
+ if( HPMHooks.count.HP_clif_refreshlook_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *id, int *type, int *val, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refreshlook_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_refreshlook_post[hIndex].func;
+ postHookFunc(bl, &id, &type, &val, &target);
+ }
+ }
+ return;
+}
+void HP_clif_class_change(struct block_list *bl, int class_, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_class_change_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *class_, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_class_change_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_class_change_pre[hIndex].func;
+ preHookFunc(bl, &class_, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.class_change(bl, class_, type);
+ }
+ if( HPMHooks.count.HP_clif_class_change_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *class_, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_class_change_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_class_change_post[hIndex].func;
+ postHookFunc(bl, &class_, &type);
+ }
+ }
+ return;
+}
+void HP_clif_skill_setunit(struct skill_unit *su) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skill_setunit_pre ) {
+ void (*preHookFunc) (struct skill_unit *su);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_setunit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skill_setunit_pre[hIndex].func;
+ preHookFunc(su);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skill_setunit(su);
+ }
+ if( HPMHooks.count.HP_clif_skill_setunit_post ) {
+ void (*postHookFunc) (struct skill_unit *su);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_setunit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skill_setunit_post[hIndex].func;
+ postHookFunc(su);
+ }
+ }
+ return;
+}
+void HP_clif_skill_delunit(struct skill_unit *su) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skill_delunit_pre ) {
+ void (*preHookFunc) (struct skill_unit *su);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_delunit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skill_delunit_pre[hIndex].func;
+ preHookFunc(su);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skill_delunit(su);
+ }
+ if( HPMHooks.count.HP_clif_skill_delunit_post ) {
+ void (*postHookFunc) (struct skill_unit *su);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_delunit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skill_delunit_post[hIndex].func;
+ postHookFunc(su);
+ }
+ }
+ return;
+}
+void HP_clif_skillunit_update(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skillunit_update_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillunit_update_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skillunit_update_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skillunit_update(bl);
+ }
+ if( HPMHooks.count.HP_clif_skillunit_update_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillunit_update_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skillunit_update_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+int HP_clif_clearunit_delayed_sub(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_clearunit_delayed_sub_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.clearunit_delayed_sub(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_clif_clearunit_delayed_sub_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_clearunit_delayed_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_set_unit_idle(struct block_list *bl, struct map_session_data *tsd, enum send_target target) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_set_unit_idle_pre ) {
+ void (*preHookFunc) (struct block_list *bl, struct map_session_data *tsd, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_set_unit_idle_pre[hIndex].func;
+ preHookFunc(bl, tsd, &target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.set_unit_idle(bl, tsd, target);
+ }
+ if( HPMHooks.count.HP_clif_set_unit_idle_post ) {
+ void (*postHookFunc) (struct block_list *bl, struct map_session_data *tsd, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_set_unit_idle_post[hIndex].func;
+ postHookFunc(bl, tsd, &target);
+ }
+ }
+ return;
+}
+void HP_clif_spawn_unit(struct block_list *bl, enum send_target target) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_spawn_unit_pre ) {
+ void (*preHookFunc) (struct block_list *bl, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_spawn_unit_pre[hIndex].func;
+ preHookFunc(bl, &target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.spawn_unit(bl, target);
+ }
+ if( HPMHooks.count.HP_clif_spawn_unit_post ) {
+ void (*postHookFunc) (struct block_list *bl, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_spawn_unit_post[hIndex].func;
+ postHookFunc(bl, &target);
+ }
+ }
+ return;
+}
+void HP_clif_spawn_unit2(struct block_list *bl, enum send_target target) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_spawn_unit2_pre ) {
+ void (*preHookFunc) (struct block_list *bl, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_spawn_unit2_pre[hIndex].func;
+ preHookFunc(bl, &target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.spawn_unit2(bl, target);
+ }
+ if( HPMHooks.count.HP_clif_spawn_unit2_post ) {
+ void (*postHookFunc) (struct block_list *bl, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_spawn_unit2_post[hIndex].func;
+ postHookFunc(bl, &target);
+ }
+ }
+ return;
+}
+void HP_clif_set_unit_idle2(struct block_list *bl, struct map_session_data *tsd, enum send_target target) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_set_unit_idle2_pre ) {
+ void (*preHookFunc) (struct block_list *bl, struct map_session_data *tsd, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_set_unit_idle2_pre[hIndex].func;
+ preHookFunc(bl, tsd, &target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.set_unit_idle2(bl, tsd, target);
+ }
+ if( HPMHooks.count.HP_clif_set_unit_idle2_post ) {
+ void (*postHookFunc) (struct block_list *bl, struct map_session_data *tsd, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_set_unit_idle2_post[hIndex].func;
+ postHookFunc(bl, tsd, &target);
+ }
+ }
+ return;
+}
+void HP_clif_set_unit_walking(struct block_list *bl, struct map_session_data *tsd, struct unit_data *ud, enum send_target target) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_set_unit_walking_pre ) {
+ void (*preHookFunc) (struct block_list *bl, struct map_session_data *tsd, struct unit_data *ud, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_walking_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_set_unit_walking_pre[hIndex].func;
+ preHookFunc(bl, tsd, ud, &target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.set_unit_walking(bl, tsd, ud, target);
+ }
+ if( HPMHooks.count.HP_clif_set_unit_walking_post ) {
+ void (*postHookFunc) (struct block_list *bl, struct map_session_data *tsd, struct unit_data *ud, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_walking_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_set_unit_walking_post[hIndex].func;
+ postHookFunc(bl, tsd, ud, &target);
+ }
+ }
+ return;
+}
+int HP_clif_calc_walkdelay(struct block_list *bl, int delay, int type, int damage, int div_) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_calc_walkdelay_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *delay, int *type, int *damage, int *div_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_calc_walkdelay_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_calc_walkdelay_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &delay, &type, &damage, &div_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.calc_walkdelay(bl, delay, type, damage, div_);
+ }
+ if( HPMHooks.count.HP_clif_calc_walkdelay_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *delay, int *type, int *damage, int *div_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_calc_walkdelay_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_calc_walkdelay_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &delay, &type, &damage, &div_);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_getareachar_skillunit(struct map_session_data *sd, struct skill_unit *su) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_getareachar_skillunit_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct skill_unit *su);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_skillunit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_getareachar_skillunit_pre[hIndex].func;
+ preHookFunc(sd, su);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.getareachar_skillunit(sd, su);
+ }
+ if( HPMHooks.count.HP_clif_getareachar_skillunit_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct skill_unit *su);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_skillunit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_getareachar_skillunit_post[hIndex].func;
+ postHookFunc(sd, su);
+ }
+ }
+ return;
+}
+void HP_clif_getareachar_unit(struct map_session_data *sd, struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_getareachar_unit_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_unit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_getareachar_unit_pre[hIndex].func;
+ preHookFunc(sd, bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.getareachar_unit(sd, bl);
+ }
+ if( HPMHooks.count.HP_clif_getareachar_unit_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_unit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_getareachar_unit_post[hIndex].func;
+ postHookFunc(sd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_clearchar_skillunit(struct skill_unit *su, int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_clearchar_skillunit_pre ) {
+ void (*preHookFunc) (struct skill_unit *su, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchar_skillunit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_clearchar_skillunit_pre[hIndex].func;
+ preHookFunc(su, &fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.clearchar_skillunit(su, fd);
+ }
+ if( HPMHooks.count.HP_clif_clearchar_skillunit_post ) {
+ void (*postHookFunc) (struct skill_unit *su, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchar_skillunit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_clearchar_skillunit_post[hIndex].func;
+ postHookFunc(su, &fd);
+ }
+ }
+ return;
+}
+int HP_clif_getareachar(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_getareachar_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_clif_getareachar_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.clif.getareachar(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_clif_getareachar_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_clif_getareachar_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_clif_spawn(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_spawn_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_spawn_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.spawn(bl);
+ }
+ if( HPMHooks.count.HP_clif_spawn_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_spawn_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_changemap(struct map_session_data *sd, short m, int x, int y) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_changemap_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *m, int *x, int *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_changemap_pre[hIndex].func;
+ preHookFunc(sd, &m, &x, &y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.changemap(sd, m, x, y);
+ }
+ if( HPMHooks.count.HP_clif_changemap_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *m, int *x, int *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_changemap_post[hIndex].func;
+ postHookFunc(sd, &m, &x, &y);
+ }
+ }
+ return;
+}
+void HP_clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_target target) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_changemapcell_pre ) {
+ void (*preHookFunc) (int *fd, int16 *m, int *x, int *y, int *type, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapcell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_changemapcell_pre[hIndex].func;
+ preHookFunc(&fd, &m, &x, &y, &type, &target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.changemapcell(fd, m, x, y, type, target);
+ }
+ if( HPMHooks.count.HP_clif_changemapcell_post ) {
+ void (*postHookFunc) (int *fd, int16 *m, int *x, int *y, int *type, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapcell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_changemapcell_post[hIndex].func;
+ postHookFunc(&fd, &m, &x, &y, &type, &target);
+ }
+ }
+ return;
+}
+void HP_clif_map_property(struct map_session_data *sd, enum map_property property) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_map_property_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, enum map_property *property);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_map_property_pre[hIndex].func;
+ preHookFunc(sd, &property);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.map_property(sd, property);
+ }
+ if( HPMHooks.count.HP_clif_map_property_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, enum map_property *property);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_map_property_post[hIndex].func;
+ postHookFunc(sd, &property);
+ }
+ }
+ return;
+}
+void HP_clif_pvpset(struct map_session_data *sd, int pvprank, int pvpnum, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pvpset_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *pvprank, int *pvpnum, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pvpset_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pvpset_pre[hIndex].func;
+ preHookFunc(sd, &pvprank, &pvpnum, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pvpset(sd, pvprank, pvpnum, type);
+ }
+ if( HPMHooks.count.HP_clif_pvpset_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *pvprank, int *pvpnum, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pvpset_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pvpset_post[hIndex].func;
+ postHookFunc(sd, &pvprank, &pvpnum, &type);
+ }
+ }
+ return;
+}
+void HP_clif_map_property_mapall(int mapid, enum map_property property) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_map_property_mapall_pre ) {
+ void (*preHookFunc) (int *mapid, enum map_property *property);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_mapall_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_map_property_mapall_pre[hIndex].func;
+ preHookFunc(&mapid, &property);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.map_property_mapall(mapid, property);
+ }
+ if( HPMHooks.count.HP_clif_map_property_mapall_post ) {
+ void (*postHookFunc) (int *mapid, enum map_property *property);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_mapall_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_map_property_mapall_post[hIndex].func;
+ postHookFunc(&mapid, &property);
+ }
+ }
+ return;
+}
+void HP_clif_bossmapinfo(int fd, struct mob_data *md, short flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_bossmapinfo_pre ) {
+ void (*preHookFunc) (int *fd, struct mob_data *md, short *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bossmapinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_bossmapinfo_pre[hIndex].func;
+ preHookFunc(&fd, md, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.bossmapinfo(fd, md, flag);
+ }
+ if( HPMHooks.count.HP_clif_bossmapinfo_post ) {
+ void (*postHookFunc) (int *fd, struct mob_data *md, short *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bossmapinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_bossmapinfo_post[hIndex].func;
+ postHookFunc(&fd, md, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_map_type(struct map_session_data *sd, enum map_type type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_map_type_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, enum map_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_type_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_map_type_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.map_type(sd, type);
+ }
+ if( HPMHooks.count.HP_clif_map_type_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, enum map_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_type_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_map_type_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_maptypeproperty2(struct block_list *bl, enum send_target t) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_maptypeproperty2_pre ) {
+ void (*preHookFunc) (struct block_list *bl, enum send_target *t);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_maptypeproperty2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_maptypeproperty2_pre[hIndex].func;
+ preHookFunc(bl, &t);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.maptypeproperty2(bl, t);
+ }
+ if( HPMHooks.count.HP_clif_maptypeproperty2_post ) {
+ void (*postHookFunc) (struct block_list *bl, enum send_target *t);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_maptypeproperty2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_maptypeproperty2_post[hIndex].func;
+ postHookFunc(bl, &t);
+ }
+ }
+ return;
+}
+void HP_clif_changemapserver(struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_changemapserver_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_changemapserver_pre[hIndex].func;
+ preHookFunc(sd, &map_index, &x, &y, &ip, &port);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.changemapserver(sd, map_index, x, y, ip, port);
+ }
+ if( HPMHooks.count.HP_clif_changemapserver_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_changemapserver_post[hIndex].func;
+ postHookFunc(sd, &map_index, &x, &y, &ip, &port);
+ }
+ }
+ return;
+}
+void HP_clif_npcbuysell(struct map_session_data *sd, int id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_npcbuysell_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcbuysell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_npcbuysell_pre[hIndex].func;
+ preHookFunc(sd, &id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.npcbuysell(sd, id);
+ }
+ if( HPMHooks.count.HP_clif_npcbuysell_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcbuysell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_npcbuysell_post[hIndex].func;
+ postHookFunc(sd, &id);
+ }
+ }
+ return;
+}
+void HP_clif_buylist(struct map_session_data *sd, struct npc_data *nd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_buylist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buylist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_buylist_pre[hIndex].func;
+ preHookFunc(sd, nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.buylist(sd, nd);
+ }
+ if( HPMHooks.count.HP_clif_buylist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buylist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_buylist_post[hIndex].func;
+ postHookFunc(sd, nd);
+ }
+ }
+ return;
+}
+void HP_clif_selllist(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_selllist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selllist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_selllist_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.selllist(sd);
+ }
+ if( HPMHooks.count.HP_clif_selllist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selllist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_selllist_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_cashshop_show_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_show_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_cashshop_show_pre[hIndex].func;
+ preHookFunc(sd, nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.cashshop_show(sd, nd);
+ }
+ if( HPMHooks.count.HP_clif_cashshop_show_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_show_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_cashshop_show_post[hIndex].func;
+ postHookFunc(sd, nd);
+ }
+ }
+ return;
+}
+void HP_clif_npc_buy_result(struct map_session_data *sd, unsigned char result) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_npc_buy_result_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned char *result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_buy_result_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_npc_buy_result_pre[hIndex].func;
+ preHookFunc(sd, &result);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.npc_buy_result(sd, result);
+ }
+ if( HPMHooks.count.HP_clif_npc_buy_result_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned char *result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_buy_result_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_npc_buy_result_post[hIndex].func;
+ postHookFunc(sd, &result);
+ }
+ }
+ return;
+}
+void HP_clif_npc_sell_result(struct map_session_data *sd, unsigned char result) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_npc_sell_result_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned char *result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_sell_result_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_npc_sell_result_pre[hIndex].func;
+ preHookFunc(sd, &result);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.npc_sell_result(sd, result);
+ }
+ if( HPMHooks.count.HP_clif_npc_sell_result_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned char *result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_sell_result_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_npc_sell_result_post[hIndex].func;
+ postHookFunc(sd, &result);
+ }
+ }
+ return;
+}
+void HP_clif_cashshop_ack(struct map_session_data *sd, int error) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_cashshop_ack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *error);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_cashshop_ack_pre[hIndex].func;
+ preHookFunc(sd, &error);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.cashshop_ack(sd, error);
+ }
+ if( HPMHooks.count.HP_clif_cashshop_ack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *error);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_cashshop_ack_post[hIndex].func;
+ postHookFunc(sd, &error);
+ }
+ }
+ return;
+}
+void HP_clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_scriptmes_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *npcid, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmes_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_scriptmes_pre[hIndex].func;
+ preHookFunc(sd, &npcid, mes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.scriptmes(sd, npcid, mes);
+ }
+ if( HPMHooks.count.HP_clif_scriptmes_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *npcid, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmes_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_scriptmes_post[hIndex].func;
+ postHookFunc(sd, &npcid, mes);
+ }
+ }
+ return;
+}
+void HP_clif_scriptnext(struct map_session_data *sd, int npcid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_scriptnext_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *npcid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptnext_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_scriptnext_pre[hIndex].func;
+ preHookFunc(sd, &npcid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.scriptnext(sd, npcid);
+ }
+ if( HPMHooks.count.HP_clif_scriptnext_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *npcid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptnext_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_scriptnext_post[hIndex].func;
+ postHookFunc(sd, &npcid);
+ }
+ }
+ return;
+}
+void HP_clif_scriptclose(struct map_session_data *sd, int npcid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_scriptclose_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *npcid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclose_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_scriptclose_pre[hIndex].func;
+ preHookFunc(sd, &npcid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.scriptclose(sd, npcid);
+ }
+ if( HPMHooks.count.HP_clif_scriptclose_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *npcid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclose_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_scriptclose_post[hIndex].func;
+ postHookFunc(sd, &npcid);
+ }
+ }
+ return;
+}
+void HP_clif_scriptmenu(struct map_session_data *sd, int npcid, const char *mes) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_scriptmenu_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *npcid, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmenu_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_scriptmenu_pre[hIndex].func;
+ preHookFunc(sd, &npcid, mes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.scriptmenu(sd, npcid, mes);
+ }
+ if( HPMHooks.count.HP_clif_scriptmenu_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *npcid, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmenu_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_scriptmenu_post[hIndex].func;
+ postHookFunc(sd, &npcid, mes);
+ }
+ }
+ return;
+}
+void HP_clif_scriptinput(struct map_session_data *sd, int npcid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_scriptinput_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *npcid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinput_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_scriptinput_pre[hIndex].func;
+ preHookFunc(sd, &npcid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.scriptinput(sd, npcid);
+ }
+ if( HPMHooks.count.HP_clif_scriptinput_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *npcid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinput_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_scriptinput_post[hIndex].func;
+ postHookFunc(sd, &npcid);
+ }
+ }
+ return;
+}
+void HP_clif_scriptinputstr(struct map_session_data *sd, int npcid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_scriptinputstr_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *npcid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinputstr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_scriptinputstr_pre[hIndex].func;
+ preHookFunc(sd, &npcid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.scriptinputstr(sd, npcid);
+ }
+ if( HPMHooks.count.HP_clif_scriptinputstr_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *npcid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinputstr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_scriptinputstr_post[hIndex].func;
+ postHookFunc(sd, &npcid);
+ }
+ }
+ return;
+}
+void HP_clif_cutin(struct map_session_data *sd, const char *image, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_cutin_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *image, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cutin_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_cutin_pre[hIndex].func;
+ preHookFunc(sd, image, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.cutin(sd, image, type);
+ }
+ if( HPMHooks.count.HP_clif_cutin_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *image, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cutin_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_cutin_post[hIndex].func;
+ postHookFunc(sd, image, &type);
+ }
+ }
+ return;
+}
+void HP_clif_sendfakenpc(struct map_session_data *sd, int npcid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_sendfakenpc_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *npcid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendfakenpc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_sendfakenpc_pre[hIndex].func;
+ preHookFunc(sd, &npcid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.sendfakenpc(sd, npcid);
+ }
+ if( HPMHooks.count.HP_clif_sendfakenpc_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *npcid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendfakenpc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_sendfakenpc_post[hIndex].func;
+ postHookFunc(sd, &npcid);
+ }
+ }
+ return;
+}
+void HP_clif_scriptclear(struct map_session_data *sd, int npcid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_scriptclear_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *npcid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_scriptclear_pre[hIndex].func;
+ preHookFunc(sd, &npcid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.scriptclear(sd, npcid);
+ }
+ if( HPMHooks.count.HP_clif_scriptclear_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *npcid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_scriptclear_post[hIndex].func;
+ postHookFunc(sd, &npcid);
+ }
+ }
+ return;
+}
+void HP_clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x, int y, int id, int color) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_viewpoint_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *npc_id, int *type, int *x, int *y, int *id, int *color);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewpoint_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_viewpoint_pre[hIndex].func;
+ preHookFunc(sd, &npc_id, &type, &x, &y, &id, &color);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.viewpoint(sd, npc_id, type, x, y, id, color);
+ }
+ if( HPMHooks.count.HP_clif_viewpoint_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *npc_id, int *type, int *x, int *y, int *id, int *color);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewpoint_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_viewpoint_post[hIndex].func;
+ postHookFunc(sd, &npc_id, &type, &x, &y, &id, &color);
+ }
+ }
+ return;
+}
+int HP_clif_damage(struct block_list *src, struct block_list *dst, unsigned int tick, int sdelay, int ddelay, int64 damage, int div, int type, int64 damage2) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_damage_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *dst, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_damage_pre[hIndex].func;
+ retVal___ = preHookFunc(src, dst, &tick, &sdelay, &ddelay, &damage, &div, &type, &damage2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.damage(src, dst, tick, sdelay, ddelay, damage, div, type, damage2);
+ }
+ if( HPMHooks.count.HP_clif_damage_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_damage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, dst, &tick, &sdelay, &ddelay, &damage, &div, &type, &damage2);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_sitting(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_sitting_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sitting_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_sitting_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.sitting(bl);
+ }
+ if( HPMHooks.count.HP_clif_sitting_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sitting_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_sitting_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+void HP_clif_standing(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_standing_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_standing_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_standing_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.standing(bl);
+ }
+ if( HPMHooks.count.HP_clif_standing_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_standing_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_standing_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+void HP_clif_arrow_create_list(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_arrow_create_list_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_create_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_arrow_create_list_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.arrow_create_list(sd);
+ }
+ if( HPMHooks.count.HP_clif_arrow_create_list_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_create_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_arrow_create_list_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_refresh(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_refresh_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_refresh_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.refresh(sd);
+ }
+ if( HPMHooks.count.HP_clif_refresh_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_refresh_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_fame_blacksmith(struct map_session_data *sd, int points) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_fame_blacksmith_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *points);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_blacksmith_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_fame_blacksmith_pre[hIndex].func;
+ preHookFunc(sd, &points);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.fame_blacksmith(sd, points);
+ }
+ if( HPMHooks.count.HP_clif_fame_blacksmith_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *points);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_blacksmith_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_fame_blacksmith_post[hIndex].func;
+ postHookFunc(sd, &points);
+ }
+ }
+ return;
+}
+void HP_clif_fame_alchemist(struct map_session_data *sd, int points) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_fame_alchemist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *points);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_alchemist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_fame_alchemist_pre[hIndex].func;
+ preHookFunc(sd, &points);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.fame_alchemist(sd, points);
+ }
+ if( HPMHooks.count.HP_clif_fame_alchemist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *points);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_alchemist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_fame_alchemist_post[hIndex].func;
+ postHookFunc(sd, &points);
+ }
+ }
+ return;
+}
+void HP_clif_fame_taekwon(struct map_session_data *sd, int points) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_fame_taekwon_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *points);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_taekwon_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_fame_taekwon_pre[hIndex].func;
+ preHookFunc(sd, &points);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.fame_taekwon(sd, points);
+ }
+ if( HPMHooks.count.HP_clif_fame_taekwon_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *points);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_taekwon_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_fame_taekwon_post[hIndex].func;
+ postHookFunc(sd, &points);
+ }
+ }
+ return;
+}
+void HP_clif_ranklist(struct map_session_data *sd, enum fame_list_type type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_ranklist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, enum fame_list_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_ranklist_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.ranklist(sd, type);
+ }
+ if( HPMHooks.count.HP_clif_ranklist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, enum fame_list_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_ranklist_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_update_rankingpoint(struct map_session_data *sd, enum fame_list_type type, int points) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_update_rankingpoint_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, enum fame_list_type *type, int *points);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_update_rankingpoint_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_update_rankingpoint_pre[hIndex].func;
+ preHookFunc(sd, &type, &points);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.update_rankingpoint(sd, type, points);
+ }
+ if( HPMHooks.count.HP_clif_update_rankingpoint_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, enum fame_list_type *type, int *points);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_update_rankingpoint_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_update_rankingpoint_post[hIndex].func;
+ postHookFunc(sd, &type, &points);
+ }
+ }
+ return;
+}
+void HP_clif_pRanklist(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pRanklist_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRanklist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pRanklist_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pRanklist(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pRanklist_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRanklist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pRanklist_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_hotkeys(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_hotkeys_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_hotkeys_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.hotkeys(sd);
+ }
+ if( HPMHooks.count.HP_clif_hotkeys_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_hotkeys_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_clif_insight(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_insight_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insight_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_clif_insight_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.clif.insight(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_clif_insight_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insight_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_clif_insight_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_clif_outsight(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_outsight_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_outsight_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_clif_outsight_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.clif.outsight(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_clif_outsight_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_outsight_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_clif_outsight_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_skillcastcancel(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skillcastcancel_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcastcancel_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skillcastcancel_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skillcastcancel(bl);
+ }
+ if( HPMHooks.count.HP_clif_skillcastcancel_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcastcancel_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skillcastcancel_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+void HP_clif_skill_fail(struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skill_fail_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_fail_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skill_fail_pre[hIndex].func;
+ preHookFunc(sd, &skill_id, &cause, &btype);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skill_fail(sd, skill_id, cause, btype);
+ }
+ if( HPMHooks.count.HP_clif_skill_fail_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_fail_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skill_fail_post[hIndex].func;
+ postHookFunc(sd, &skill_id, &cause, &btype);
+ }
+ }
+ return;
+}
+void HP_clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned int tick) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skill_cooldown_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_cooldown_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skill_cooldown_pre[hIndex].func;
+ preHookFunc(sd, &skill_id, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skill_cooldown(sd, skill_id, tick);
+ }
+ if( HPMHooks.count.HP_clif_skill_cooldown_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_cooldown_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skill_cooldown_post[hIndex].func;
+ postHookFunc(sd, &skill_id, &tick);
+ }
+ }
+ return;
+}
+void HP_clif_skill_memomessage(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skill_memomessage_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_memomessage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skill_memomessage_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skill_memomessage(sd, type);
+ }
+ if( HPMHooks.count.HP_clif_skill_memomessage_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_memomessage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skill_memomessage_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_skill_mapinfomessage(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skill_mapinfomessage_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_mapinfomessage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skill_mapinfomessage_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skill_mapinfomessage(sd, type);
+ }
+ if( HPMHooks.count.HP_clif_skill_mapinfomessage_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_mapinfomessage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skill_mapinfomessage_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id, int trigger) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skill_produce_mix_list_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *skill_id, int *trigger);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_produce_mix_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skill_produce_mix_list_pre[hIndex].func;
+ preHookFunc(sd, &skill_id, &trigger);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skill_produce_mix_list(sd, skill_id, trigger);
+ }
+ if( HPMHooks.count.HP_clif_skill_produce_mix_list_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *skill_id, int *trigger);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_produce_mix_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skill_produce_mix_list_post[hIndex].func;
+ postHookFunc(sd, &skill_id, &trigger);
+ }
+ }
+ return;
+}
+void HP_clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id, int qty, int list_type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_cooking_list_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *trigger, uint16 *skill_id, int *qty, int *list_type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooking_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_cooking_list_pre[hIndex].func;
+ preHookFunc(sd, &trigger, &skill_id, &qty, &list_type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.cooking_list(sd, trigger, skill_id, qty, list_type);
+ }
+ if( HPMHooks.count.HP_clif_cooking_list_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *trigger, uint16 *skill_id, int *qty, int *list_type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooking_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_cooking_list_post[hIndex].func;
+ postHookFunc(sd, &trigger, &skill_id, &qty, &list_type);
+ }
+ }
+ return;
+}
+void HP_clif_autospell(struct map_session_data *sd, uint16 skill_lv) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_autospell_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autospell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_autospell_pre[hIndex].func;
+ preHookFunc(sd, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.autospell(sd, skill_lv);
+ }
+ if( HPMHooks.count.HP_clif_autospell_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autospell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_autospell_post[hIndex].func;
+ postHookFunc(sd, &skill_lv);
+ }
+ }
+ return;
+}
+void HP_clif_combo_delay(struct block_list *bl, int wait) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_combo_delay_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *wait);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_combo_delay_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_combo_delay_pre[hIndex].func;
+ preHookFunc(bl, &wait);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.combo_delay(bl, wait);
+ }
+ if( HPMHooks.count.HP_clif_combo_delay_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *wait);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_combo_delay_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_combo_delay_post[hIndex].func;
+ postHookFunc(bl, &wait);
+ }
+ }
+ return;
+}
+void HP_clif_status_change(struct block_list *bl, int type, int flag, int tick, int val1, int val2, int val3) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_status_change_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *type, int *flag, int *tick, int *val1, int *val2, int *val3);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_status_change_pre[hIndex].func;
+ preHookFunc(bl, &type, &flag, &tick, &val1, &val2, &val3);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.status_change(bl, type, flag, tick, val1, val2, val3);
+ }
+ if( HPMHooks.count.HP_clif_status_change_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *type, int *flag, int *tick, int *val1, int *val2, int *val3);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_status_change_post[hIndex].func;
+ postHookFunc(bl, &type, &flag, &tick, &val1, &val2, &val3);
+ }
+ }
+ return;
+}
+void HP_clif_insert_card(struct map_session_data *sd, int idx_equip, int idx_card, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_insert_card_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *idx_equip, int *idx_card, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insert_card_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_insert_card_pre[hIndex].func;
+ preHookFunc(sd, &idx_equip, &idx_card, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.insert_card(sd, idx_equip, idx_card, flag);
+ }
+ if( HPMHooks.count.HP_clif_insert_card_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *idx_equip, int *idx_card, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insert_card_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_insert_card_post[hIndex].func;
+ postHookFunc(sd, &idx_equip, &idx_card, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_inventorylist(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_inventorylist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_inventorylist_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.inventorylist(sd);
+ }
+ if( HPMHooks.count.HP_clif_inventorylist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_inventorylist_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_equiplist(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_equiplist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_equiplist_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.equiplist(sd);
+ }
+ if( HPMHooks.count.HP_clif_equiplist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_equiplist_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_cartlist(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_cartlist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_cartlist_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.cartlist(sd);
+ }
+ if( HPMHooks.count.HP_clif_cartlist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_cartlist_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_favorite_item(struct map_session_data *sd, unsigned short index) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_favorite_item_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned short *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_favorite_item_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_favorite_item_pre[hIndex].func;
+ preHookFunc(sd, &index);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.favorite_item(sd, index);
+ }
+ if( HPMHooks.count.HP_clif_favorite_item_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned short *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_favorite_item_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_favorite_item_post[hIndex].func;
+ postHookFunc(sd, &index);
+ }
+ }
+ return;
+}
+void HP_clif_clearcart(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_clearcart_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearcart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_clearcart_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.clearcart(fd);
+ }
+ if( HPMHooks.count.HP_clif_clearcart_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearcart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_clearcart_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_clif_item_identify_list(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_item_identify_list_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identify_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_item_identify_list_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.item_identify_list(sd);
+ }
+ if( HPMHooks.count.HP_clif_item_identify_list_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identify_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_item_identify_list_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_item_identified(struct map_session_data *sd, int idx, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_item_identified_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *idx, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identified_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_item_identified_pre[hIndex].func;
+ preHookFunc(sd, &idx, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.item_identified(sd, idx, flag);
+ }
+ if( HPMHooks.count.HP_clif_item_identified_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *idx, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identified_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_item_identified_post[hIndex].func;
+ postHookFunc(sd, &idx, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_item_repair_list(struct map_session_data *sd, struct map_session_data *dstsd, int lv) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_item_repair_list_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd, int *lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repair_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_item_repair_list_pre[hIndex].func;
+ preHookFunc(sd, dstsd, &lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.item_repair_list(sd, dstsd, lv);
+ }
+ if( HPMHooks.count.HP_clif_item_repair_list_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd, int *lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repair_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_item_repair_list_post[hIndex].func;
+ postHookFunc(sd, dstsd, &lv);
+ }
+ }
+ return;
+}
+void HP_clif_item_repaireffect(struct map_session_data *sd, int idx, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_item_repaireffect_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *idx, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repaireffect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_item_repaireffect_pre[hIndex].func;
+ preHookFunc(sd, &idx, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.item_repaireffect(sd, idx, flag);
+ }
+ if( HPMHooks.count.HP_clif_item_repaireffect_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *idx, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repaireffect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_item_repaireffect_post[hIndex].func;
+ postHookFunc(sd, &idx, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_item_damaged(struct map_session_data *sd, unsigned short position) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_item_damaged_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned short *position);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_damaged_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_item_damaged_pre[hIndex].func;
+ preHookFunc(sd, &position);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.item_damaged(sd, position);
+ }
+ if( HPMHooks.count.HP_clif_item_damaged_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned short *position);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_damaged_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_item_damaged_post[hIndex].func;
+ postHookFunc(sd, &position);
+ }
+ }
+ return;
+}
+void HP_clif_item_refine_list(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_item_refine_list_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_refine_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_item_refine_list_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.item_refine_list(sd);
+ }
+ if( HPMHooks.count.HP_clif_item_refine_list_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_refine_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_item_refine_list_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_item_skill(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_item_skill_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_skill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_item_skill_pre[hIndex].func;
+ preHookFunc(sd, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.item_skill(sd, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_clif_item_skill_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_skill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_item_skill_post[hIndex].func;
+ postHookFunc(sd, &skill_id, &skill_lv);
+ }
+ }
+ return;
+}
+void HP_clif_mvp_item(struct map_session_data *sd, int nameid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mvp_item_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_item_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mvp_item_pre[hIndex].func;
+ preHookFunc(sd, &nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mvp_item(sd, nameid);
+ }
+ if( HPMHooks.count.HP_clif_mvp_item_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_item_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mvp_item_post[hIndex].func;
+ postHookFunc(sd, &nameid);
+ }
+ }
+ return;
+}
+void HP_clif_mvp_exp(struct map_session_data *sd, unsigned int exp) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mvp_exp_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned int *exp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_exp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mvp_exp_pre[hIndex].func;
+ preHookFunc(sd, &exp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mvp_exp(sd, exp);
+ }
+ if( HPMHooks.count.HP_clif_mvp_exp_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned int *exp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_exp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mvp_exp_post[hIndex].func;
+ postHookFunc(sd, &exp);
+ }
+ }
+ return;
+}
+void HP_clif_mvp_noitem(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mvp_noitem_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_noitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mvp_noitem_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mvp_noitem(sd);
+ }
+ if( HPMHooks.count.HP_clif_mvp_noitem_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_noitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mvp_noitem_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_changed_dir(struct block_list *bl, enum send_target target) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_changed_dir_pre ) {
+ void (*preHookFunc) (struct block_list *bl, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changed_dir_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_changed_dir_pre[hIndex].func;
+ preHookFunc(bl, &target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.changed_dir(bl, target);
+ }
+ if( HPMHooks.count.HP_clif_changed_dir_post ) {
+ void (*postHookFunc) (struct block_list *bl, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changed_dir_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_changed_dir_post[hIndex].func;
+ postHookFunc(bl, &target);
+ }
+ }
+ return;
+}
+void HP_clif_charnameack(int fd, struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_charnameack_pre ) {
+ void (*preHookFunc) (int *fd, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_charnameack_pre[hIndex].func;
+ preHookFunc(&fd, bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.charnameack(fd, bl);
+ }
+ if( HPMHooks.count.HP_clif_charnameack_post ) {
+ void (*postHookFunc) (int *fd, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_charnameack_post[hIndex].func;
+ postHookFunc(&fd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_monster_hp_bar(struct mob_data *md, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_monster_hp_bar_pre ) {
+ void (*preHookFunc) (struct mob_data *md, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_monster_hp_bar_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_monster_hp_bar_pre[hIndex].func;
+ preHookFunc(md, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.monster_hp_bar(md, sd);
+ }
+ if( HPMHooks.count.HP_clif_monster_hp_bar_post ) {
+ void (*postHookFunc) (struct mob_data *md, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_monster_hp_bar_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_monster_hp_bar_post[hIndex].func;
+ postHookFunc(md, sd);
+ }
+ }
+ return;
+}
+int HP_clif_hpmeter(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_hpmeter_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_hpmeter_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.hpmeter(sd);
+ }
+ if( HPMHooks.count.HP_clif_hpmeter_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_hpmeter_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_hpmeter_single_pre ) {
+ void (*preHookFunc) (int *fd, int *id, unsigned int *hp, unsigned int *maxhp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_single_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_hpmeter_single_pre[hIndex].func;
+ preHookFunc(&fd, &id, &hp, &maxhp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.hpmeter_single(fd, id, hp, maxhp);
+ }
+ if( HPMHooks.count.HP_clif_hpmeter_single_post ) {
+ void (*postHookFunc) (int *fd, int *id, unsigned int *hp, unsigned int *maxhp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_single_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_hpmeter_single_post[hIndex].func;
+ postHookFunc(&fd, &id, &hp, &maxhp);
+ }
+ }
+ return;
+}
+int HP_clif_hpmeter_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_hpmeter_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_clif_hpmeter_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.clif.hpmeter_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_clif_hpmeter_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_clif_hpmeter_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_upgrademessage(int fd, int result, int item_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_upgrademessage_pre ) {
+ void (*preHookFunc) (int *fd, int *result, int *item_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_upgrademessage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_upgrademessage_pre[hIndex].func;
+ preHookFunc(&fd, &result, &item_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.upgrademessage(fd, result, item_id);
+ }
+ if( HPMHooks.count.HP_clif_upgrademessage_post ) {
+ void (*postHookFunc) (int *fd, int *result, int *item_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_upgrademessage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_upgrademessage_post[hIndex].func;
+ postHookFunc(&fd, &result, &item_id);
+ }
+ }
+ return;
+}
+void HP_clif_get_weapon_view(struct map_session_data *sd, unsigned short *rhand, unsigned short *lhand) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_get_weapon_view_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned short *rhand, unsigned short *lhand);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_weapon_view_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_get_weapon_view_pre[hIndex].func;
+ preHookFunc(sd, rhand, lhand);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.get_weapon_view(sd, rhand, lhand);
+ }
+ if( HPMHooks.count.HP_clif_get_weapon_view_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned short *rhand, unsigned short *lhand);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_weapon_view_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_get_weapon_view_post[hIndex].func;
+ postHookFunc(sd, rhand, lhand);
+ }
+ }
+ return;
+}
+void HP_clif_gospel_info(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_gospel_info_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_gospel_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_gospel_info_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.gospel_info(sd, type);
+ }
+ if( HPMHooks.count.HP_clif_gospel_info_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_gospel_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_gospel_info_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_feel_req(int fd, struct map_session_data *sd, uint16 skill_lv) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_feel_req_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_req_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_feel_req_pre[hIndex].func;
+ preHookFunc(&fd, sd, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.feel_req(fd, sd, skill_lv);
+ }
+ if( HPMHooks.count.HP_clif_feel_req_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_req_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_feel_req_post[hIndex].func;
+ postHookFunc(&fd, sd, &skill_lv);
+ }
+ }
+ return;
+}
+void HP_clif_starskill(struct map_session_data *sd, const char *mapname, int monster_id, unsigned char star, unsigned char result) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_starskill_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *mapname, int *monster_id, unsigned char *star, unsigned char *result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_starskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_starskill_pre[hIndex].func;
+ preHookFunc(sd, mapname, &monster_id, &star, &result);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.starskill(sd, mapname, monster_id, star, result);
+ }
+ if( HPMHooks.count.HP_clif_starskill_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *mapname, int *monster_id, unsigned char *star, unsigned char *result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_starskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_starskill_post[hIndex].func;
+ postHookFunc(sd, mapname, &monster_id, &star, &result);
+ }
+ }
+ return;
+}
+void HP_clif_feel_info(struct map_session_data *sd, unsigned char feel_level, unsigned char type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_feel_info_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned char *feel_level, unsigned char *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_feel_info_pre[hIndex].func;
+ preHookFunc(sd, &feel_level, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.feel_info(sd, feel_level, type);
+ }
+ if( HPMHooks.count.HP_clif_feel_info_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned char *feel_level, unsigned char *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_feel_info_post[hIndex].func;
+ postHookFunc(sd, &feel_level, &type);
+ }
+ }
+ return;
+}
+void HP_clif_hate_info(struct map_session_data *sd, unsigned char hate_level, int class_, unsigned char type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_hate_info_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned char *hate_level, int *class_, unsigned char *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hate_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_hate_info_pre[hIndex].func;
+ preHookFunc(sd, &hate_level, &class_, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.hate_info(sd, hate_level, class_, type);
+ }
+ if( HPMHooks.count.HP_clif_hate_info_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned char *hate_level, int *class_, unsigned char *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hate_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_hate_info_post[hIndex].func;
+ postHookFunc(sd, &hate_level, &class_, &type);
+ }
+ }
+ return;
+}
+void HP_clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char progress) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mission_info_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *mob_id, unsigned char *progress);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mission_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mission_info_pre[hIndex].func;
+ preHookFunc(sd, &mob_id, &progress);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mission_info(sd, mob_id, progress);
+ }
+ if( HPMHooks.count.HP_clif_mission_info_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *mob_id, unsigned char *progress);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mission_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mission_info_post[hIndex].func;
+ postHookFunc(sd, &mob_id, &progress);
+ }
+ }
+ return;
+}
+void HP_clif_feel_hate_reset(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_feel_hate_reset_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_hate_reset_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_feel_hate_reset_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.feel_hate_reset(sd);
+ }
+ if( HPMHooks.count.HP_clif_feel_hate_reset_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_hate_reset_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_feel_hate_reset_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_partytickack(struct map_session_data *sd, bool flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_partytickack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partytickack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_partytickack_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.partytickack(sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_partytickack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partytickack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_partytickack_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_equiptickack(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_equiptickack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiptickack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_equiptickack_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.equiptickack(sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_equiptickack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiptickack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_equiptickack_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_viewequip_ack(struct map_session_data *sd, struct map_session_data *tsd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_viewequip_ack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_viewequip_ack_pre[hIndex].func;
+ preHookFunc(sd, tsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.viewequip_ack(sd, tsd);
+ }
+ if( HPMHooks.count.HP_clif_viewequip_ack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_viewequip_ack_post[hIndex].func;
+ postHookFunc(sd, tsd);
+ }
+ }
+ return;
+}
+void HP_clif_viewequip_fail(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_viewequip_fail_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_fail_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_viewequip_fail_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.viewequip_fail(sd);
+ }
+ if( HPMHooks.count.HP_clif_viewequip_fail_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_fail_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_viewequip_fail_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_equpcheckbox(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_equpcheckbox_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equpcheckbox_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_equpcheckbox_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.equpcheckbox(sd);
+ }
+ if( HPMHooks.count.HP_clif_equpcheckbox_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equpcheckbox_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_equpcheckbox_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_displayexp(struct map_session_data *sd, unsigned int exp, char type, bool is_quest) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_displayexp_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned int *exp, char *type, bool *is_quest);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_displayexp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_displayexp_pre[hIndex].func;
+ preHookFunc(sd, &exp, &type, &is_quest);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.displayexp(sd, exp, type, is_quest);
+ }
+ if( HPMHooks.count.HP_clif_displayexp_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned int *exp, char *type, bool *is_quest);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_displayexp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_displayexp_post[hIndex].func;
+ postHookFunc(sd, &exp, &type, &is_quest);
+ }
+ }
+ return;
+}
+void HP_clif_font(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_font_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_font_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_font_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.font(sd);
+ }
+ if( HPMHooks.count.HP_clif_font_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_font_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_font_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_progressbar(struct map_session_data *sd, unsigned long 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);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_progressbar_pre[hIndex].func;
+ preHookFunc(sd, &color, &second);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ 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);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_progressbar_post[hIndex].func;
+ postHookFunc(sd, &color, &second);
+ }
+ }
+ return;
+}
+void HP_clif_progressbar_abort(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_progressbar_abort_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_abort_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_progressbar_abort_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.progressbar_abort(sd);
+ }
+ if( HPMHooks.count.HP_clif_progressbar_abort_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_abort_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_progressbar_abort_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_showdigit(struct map_session_data *sd, unsigned char type, int value) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_showdigit_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned char *type, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showdigit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_showdigit_pre[hIndex].func;
+ preHookFunc(sd, &type, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.showdigit(sd, type, value);
+ }
+ if( HPMHooks.count.HP_clif_showdigit_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned char *type, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showdigit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_showdigit_post[hIndex].func;
+ postHookFunc(sd, &type, &value);
+ }
+ }
+ return;
+}
+int HP_clif_elementalconverter_list(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_elementalconverter_list_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elementalconverter_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_elementalconverter_list_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.elementalconverter_list(sd);
+ }
+ if( HPMHooks.count.HP_clif_elementalconverter_list_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elementalconverter_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_elementalconverter_list_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_clif_spellbook_list(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_spellbook_list_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spellbook_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_spellbook_list_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.spellbook_list(sd);
+ }
+ if( HPMHooks.count.HP_clif_spellbook_list_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spellbook_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_spellbook_list_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, short x, short y) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_magicdecoy_list_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv, short *x, short *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_magicdecoy_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_magicdecoy_list_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_lv, &x, &y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.magicdecoy_list(sd, skill_lv, x, y);
+ }
+ if( HPMHooks.count.HP_clif_magicdecoy_list_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_lv, short *x, short *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_magicdecoy_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_magicdecoy_list_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_lv, &x, &y);
+ }
+ }
+ return retVal___;
+}
+int HP_clif_poison_list(struct map_session_data *sd, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_poison_list_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_poison_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_poison_list_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.poison_list(sd, skill_lv);
+ }
+ if( HPMHooks.count.HP_clif_poison_list_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_poison_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_poison_list_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_clif_autoshadowspell_list(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_autoshadowspell_list_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autoshadowspell_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_autoshadowspell_list_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.autoshadowspell_list(sd);
+ }
+ if( HPMHooks.count.HP_clif_autoshadowspell_list_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autoshadowspell_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_autoshadowspell_list_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_clif_skill_itemlistwindow(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_skill_itemlistwindow_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_itemlistwindow_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skill_itemlistwindow_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.skill_itemlistwindow(sd, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_clif_skill_itemlistwindow_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_itemlistwindow_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skill_itemlistwindow_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_sc_load(struct block_list *bl, int tid, enum send_target target, int type, int val1, int val2, int val3) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_sc_load_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *tid, enum send_target *target, int *type, int *val1, int *val2, int *val3);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_load_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_sc_load_pre[hIndex].func;
+ preHookFunc(bl, &tid, &target, &type, &val1, &val2, &val3);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.sc_load(bl, tid, target, type, val1, val2, val3);
+ }
+ if( HPMHooks.count.HP_clif_sc_load_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *tid, enum send_target *target, int *type, int *val1, int *val2, int *val3);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_load_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_sc_load_post[hIndex].func;
+ postHookFunc(bl, &tid, &target, &type, &val1, &val2, &val3);
+ }
+ }
+ return;
+}
+void HP_clif_sc_end(struct block_list *bl, int tid, enum send_target target, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_sc_end_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *tid, enum send_target *target, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_end_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_sc_end_pre[hIndex].func;
+ preHookFunc(bl, &tid, &target, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.sc_end(bl, tid, target, type);
+ }
+ if( HPMHooks.count.HP_clif_sc_end_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *tid, enum send_target *target, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_end_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_sc_end_post[hIndex].func;
+ postHookFunc(bl, &tid, &target, &type);
+ }
+ }
+ return;
+}
+void HP_clif_initialstatus(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_initialstatus_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_initialstatus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_initialstatus_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.initialstatus(sd);
+ }
+ if( HPMHooks.count.HP_clif_initialstatus_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_initialstatus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_initialstatus_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_cooldown_list(int fd, struct skill_cd *cd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_cooldown_list_pre ) {
+ void (*preHookFunc) (int *fd, struct skill_cd *cd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooldown_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_cooldown_list_pre[hIndex].func;
+ preHookFunc(&fd, cd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.cooldown_list(fd, cd);
+ }
+ if( HPMHooks.count.HP_clif_cooldown_list_post ) {
+ void (*postHookFunc) (int *fd, struct skill_cd *cd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooldown_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_cooldown_list_post[hIndex].func;
+ postHookFunc(&fd, cd);
+ }
+ }
+ return;
+}
+void HP_clif_updatestatus(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_updatestatus_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestatus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_updatestatus_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.updatestatus(sd, type);
+ }
+ if( HPMHooks.count.HP_clif_updatestatus_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestatus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_updatestatus_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_changestatus(struct map_session_data *sd, int type, int val) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_changestatus_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changestatus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_changestatus_pre[hIndex].func;
+ preHookFunc(sd, &type, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.changestatus(sd, type, val);
+ }
+ if( HPMHooks.count.HP_clif_changestatus_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changestatus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_changestatus_post[hIndex].func;
+ postHookFunc(sd, &type, &val);
+ }
+ }
+ return;
+}
+void HP_clif_statusupack(struct map_session_data *sd, int type, int ok, int val) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_statusupack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *type, int *ok, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_statusupack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_statusupack_pre[hIndex].func;
+ preHookFunc(sd, &type, &ok, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.statusupack(sd, type, ok, val);
+ }
+ if( HPMHooks.count.HP_clif_statusupack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *type, int *ok, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_statusupack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_statusupack_post[hIndex].func;
+ postHookFunc(sd, &type, &ok, &val);
+ }
+ }
+ return;
+}
+void HP_clif_movetoattack(struct map_session_data *sd, struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_movetoattack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_movetoattack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_movetoattack_pre[hIndex].func;
+ preHookFunc(sd, bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.movetoattack(sd, bl);
+ }
+ if( HPMHooks.count.HP_clif_movetoattack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_movetoattack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_movetoattack_post[hIndex].func;
+ postHookFunc(sd, bl);
+ }
+ }
+ return;
+}
+void HP_clif_solved_charname(int fd, int charid, const char *name) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_solved_charname_pre ) {
+ void (*preHookFunc) (int *fd, int *charid, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_solved_charname_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_solved_charname_pre[hIndex].func;
+ preHookFunc(&fd, &charid, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.solved_charname(fd, charid, name);
+ }
+ if( HPMHooks.count.HP_clif_solved_charname_post ) {
+ void (*postHookFunc) (int *fd, int *charid, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_solved_charname_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_solved_charname_post[hIndex].func;
+ postHookFunc(&fd, &charid, name);
+ }
+ }
+ return;
+}
+void HP_clif_charnameupdate(struct map_session_data *ssd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_charnameupdate_pre ) {
+ void (*preHookFunc) (struct map_session_data *ssd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameupdate_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_charnameupdate_pre[hIndex].func;
+ preHookFunc(ssd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.charnameupdate(ssd);
+ }
+ if( HPMHooks.count.HP_clif_charnameupdate_post ) {
+ void (*postHookFunc) (struct map_session_data *ssd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameupdate_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_charnameupdate_post[hIndex].func;
+ postHookFunc(ssd);
+ }
+ }
+ return;
+}
+int HP_clif_delayquit(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_delayquit_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delayquit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_delayquit_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.delayquit(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_clif_delayquit_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delayquit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_delayquit_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_getareachar_pc(struct map_session_data *sd, struct map_session_data *dstsd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_getareachar_pc_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_pc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_getareachar_pc_pre[hIndex].func;
+ preHookFunc(sd, dstsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.getareachar_pc(sd, dstsd);
+ }
+ if( HPMHooks.count.HP_clif_getareachar_pc_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_pc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_getareachar_pc_post[hIndex].func;
+ postHookFunc(sd, dstsd);
+ }
+ }
+ return;
+}
+void HP_clif_disconnect_ack(struct map_session_data *sd, short result) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_disconnect_ack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disconnect_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_disconnect_ack_pre[hIndex].func;
+ preHookFunc(sd, &result);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.disconnect_ack(sd, result);
+ }
+ if( HPMHooks.count.HP_clif_disconnect_ack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disconnect_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_disconnect_ack_post[hIndex].func;
+ postHookFunc(sd, &result);
+ }
+ }
+ return;
+}
+void HP_clif_PVPInfo(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PVPInfo_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PVPInfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PVPInfo_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PVPInfo(sd);
+ }
+ if( HPMHooks.count.HP_clif_PVPInfo_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PVPInfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PVPInfo_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_blacksmith(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_blacksmith_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blacksmith_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_blacksmith_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.blacksmith(sd);
+ }
+ if( HPMHooks.count.HP_clif_blacksmith_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blacksmith_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_blacksmith_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_alchemist(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_alchemist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_alchemist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_alchemist_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.alchemist(sd);
+ }
+ if( HPMHooks.count.HP_clif_alchemist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_alchemist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_alchemist_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_taekwon(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_taekwon_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_taekwon_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_taekwon_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.taekwon(sd);
+ }
+ if( HPMHooks.count.HP_clif_taekwon_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_taekwon_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_taekwon_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_ranking_pk(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_ranking_pk_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranking_pk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_ranking_pk_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.ranking_pk(sd);
+ }
+ if( HPMHooks.count.HP_clif_ranking_pk_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranking_pk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_ranking_pk_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_quitsave(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_quitsave_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quitsave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_quitsave_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.quitsave(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_quitsave_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quitsave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_quitsave_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_misceffect(struct block_list *bl, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_misceffect_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_misceffect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_misceffect_pre[hIndex].func;
+ preHookFunc(bl, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.misceffect(bl, type);
+ }
+ if( HPMHooks.count.HP_clif_misceffect_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_misceffect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_misceffect_post[hIndex].func;
+ postHookFunc(bl, &type);
+ }
+ }
+ return;
+}
+void HP_clif_changeoption(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_changeoption_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_changeoption_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.changeoption(bl);
+ }
+ if( HPMHooks.count.HP_clif_changeoption_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_changeoption_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+void HP_clif_changeoption2(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_changeoption2_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_changeoption2_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.changeoption2(bl);
+ }
+ if( HPMHooks.count.HP_clif_changeoption2_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_changeoption2_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+void HP_clif_emotion(struct block_list *bl, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_emotion_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_emotion_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_emotion_pre[hIndex].func;
+ preHookFunc(bl, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.emotion(bl, type);
+ }
+ if( HPMHooks.count.HP_clif_emotion_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_emotion_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_emotion_post[hIndex].func;
+ postHookFunc(bl, &type);
+ }
+ }
+ return;
+}
+void HP_clif_talkiebox(struct block_list *bl, const char *talkie) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_talkiebox_pre ) {
+ void (*preHookFunc) (struct block_list *bl, const char *talkie);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_talkiebox_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_talkiebox_pre[hIndex].func;
+ preHookFunc(bl, talkie);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.talkiebox(bl, talkie);
+ }
+ if( HPMHooks.count.HP_clif_talkiebox_post ) {
+ void (*postHookFunc) (struct block_list *bl, const char *talkie);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_talkiebox_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_talkiebox_post[hIndex].func;
+ postHookFunc(bl, talkie);
+ }
+ }
+ return;
+}
+void HP_clif_wedding_effect(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_wedding_effect_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wedding_effect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_wedding_effect_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.wedding_effect(bl);
+ }
+ if( HPMHooks.count.HP_clif_wedding_effect_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wedding_effect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_wedding_effect_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+void HP_clif_divorced(struct map_session_data *sd, const char *name) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_divorced_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_divorced_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_divorced_pre[hIndex].func;
+ preHookFunc(sd, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.divorced(sd, name);
+ }
+ if( HPMHooks.count.HP_clif_divorced_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_divorced_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_divorced_post[hIndex].func;
+ postHookFunc(sd, name);
+ }
+ }
+ return;
+}
+void HP_clif_callpartner(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_callpartner_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_callpartner_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_callpartner_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.callpartner(sd);
+ }
+ if( HPMHooks.count.HP_clif_callpartner_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_callpartner_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_callpartner_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, unsigned int tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_skill_damage_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *dst, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_damage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skill_damage_pre[hIndex].func;
+ retVal___ = preHookFunc(src, dst, &tick, &sdelay, &ddelay, &damage, &div, &skill_id, &skill_lv, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.skill_damage(src, dst, tick, sdelay, ddelay, damage, div, skill_id, skill_lv, type);
+ }
+ if( HPMHooks.count.HP_clif_skill_damage_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_damage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skill_damage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, dst, &tick, &sdelay, &ddelay, &damage, &div, &skill_id, &skill_lv, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_clif_skill_nodamage(struct block_list *src, struct block_list *dst, uint16 skill_id, int heal, int fail) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_skill_nodamage_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *dst, uint16 *skill_id, int *heal, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_nodamage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skill_nodamage_pre[hIndex].func;
+ retVal___ = preHookFunc(src, dst, &skill_id, &heal, &fail);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.skill_nodamage(src, dst, skill_id, heal, fail);
+ }
+ if( HPMHooks.count.HP_clif_skill_nodamage_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, uint16 *skill_id, int *heal, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_nodamage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skill_nodamage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, dst, &skill_id, &heal, &fail);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_skill_poseffect(struct block_list *src, uint16 skill_id, int val, int x, int y, int tick) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skill_poseffect_pre ) {
+ void (*preHookFunc) (struct block_list *src, uint16 *skill_id, int *val, int *x, int *y, int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_poseffect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skill_poseffect_pre[hIndex].func;
+ preHookFunc(src, &skill_id, &val, &x, &y, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skill_poseffect(src, skill_id, val, x, y, tick);
+ }
+ if( HPMHooks.count.HP_clif_skill_poseffect_post ) {
+ void (*postHookFunc) (struct block_list *src, uint16 *skill_id, int *val, int *x, int *y, int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_poseffect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skill_poseffect_post[hIndex].func;
+ postHookFunc(src, &skill_id, &val, &x, &y, &tick);
+ }
+ }
+ return;
+}
+void HP_clif_skill_estimation(struct map_session_data *sd, struct block_list *dst) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skill_estimation_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct block_list *dst);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_estimation_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skill_estimation_pre[hIndex].func;
+ preHookFunc(sd, dst);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skill_estimation(sd, dst);
+ }
+ if( HPMHooks.count.HP_clif_skill_estimation_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct block_list *dst);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_estimation_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skill_estimation_post[hIndex].func;
+ postHookFunc(sd, dst);
+ }
+ }
+ return;
+}
+void HP_clif_skill_warppoint(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, unsigned short map1, unsigned short map2, unsigned short map3, unsigned short map4) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skill_warppoint_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, unsigned short *map1, unsigned short *map2, unsigned short *map3, unsigned short *map4);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_warppoint_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skill_warppoint_pre[hIndex].func;
+ preHookFunc(sd, &skill_id, &skill_lv, &map1, &map2, &map3, &map4);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skill_warppoint(sd, skill_id, skill_lv, map1, map2, map3, map4);
+ }
+ if( HPMHooks.count.HP_clif_skill_warppoint_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, unsigned short *map1, unsigned short *map2, unsigned short *map3, unsigned short *map4);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_warppoint_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skill_warppoint_post[hIndex].func;
+ postHookFunc(sd, &skill_id, &skill_lv, &map1, &map2, &map3, &map4);
+ }
+ }
+ return;
+}
+void HP_clif_skillcasting(struct block_list *bl, int src_id, int dst_id, int dst_x, int dst_y, uint16 skill_id, int property, int casttime) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skillcasting_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *src_id, int *dst_id, int *dst_x, int *dst_y, uint16 *skill_id, int *property, int *casttime);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcasting_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skillcasting_pre[hIndex].func;
+ preHookFunc(bl, &src_id, &dst_id, &dst_x, &dst_y, &skill_id, &property, &casttime);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skillcasting(bl, src_id, dst_id, dst_x, dst_y, skill_id, property, casttime);
+ }
+ if( HPMHooks.count.HP_clif_skillcasting_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *src_id, int *dst_id, int *dst_x, int *dst_y, uint16 *skill_id, int *property, int *casttime);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcasting_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skillcasting_post[hIndex].func;
+ postHookFunc(bl, &src_id, &dst_id, &dst_x, &dst_y, &skill_id, &property, &casttime);
+ }
+ }
+ return;
+}
+void HP_clif_produce_effect(struct map_session_data *sd, int flag, int nameid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_produce_effect_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_produce_effect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_produce_effect_pre[hIndex].func;
+ preHookFunc(sd, &flag, &nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.produce_effect(sd, flag, nameid);
+ }
+ if( HPMHooks.count.HP_clif_produce_effect_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_produce_effect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_produce_effect_post[hIndex].func;
+ postHookFunc(sd, &flag, &nameid);
+ }
+ }
+ return;
+}
+void HP_clif_devotion(struct block_list *src, struct map_session_data *tsd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_devotion_pre ) {
+ void (*preHookFunc) (struct block_list *src, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_devotion_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_devotion_pre[hIndex].func;
+ preHookFunc(src, tsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.devotion(src, tsd);
+ }
+ if( HPMHooks.count.HP_clif_devotion_post ) {
+ void (*postHookFunc) (struct block_list *src, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_devotion_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_devotion_post[hIndex].func;
+ postHookFunc(src, tsd);
+ }
+ }
+ return;
+}
+void HP_clif_spiritball(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_spiritball_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_spiritball_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.spiritball(bl);
+ }
+ if( HPMHooks.count.HP_clif_spiritball_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_spiritball_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+void HP_clif_spiritball_single(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_spiritball_single_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_single_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_spiritball_single_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.spiritball_single(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_spiritball_single_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_single_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_spiritball_single_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_bladestop(struct block_list *src, int dst_id, int active) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_bladestop_pre ) {
+ void (*preHookFunc) (struct block_list *src, int *dst_id, int *active);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bladestop_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_bladestop_pre[hIndex].func;
+ preHookFunc(src, &dst_id, &active);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.bladestop(src, dst_id, active);
+ }
+ if( HPMHooks.count.HP_clif_bladestop_post ) {
+ void (*postHookFunc) (struct block_list *src, int *dst_id, int *active);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bladestop_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_bladestop_post[hIndex].func;
+ postHookFunc(src, &dst_id, &active);
+ }
+ }
+ return;
+}
+void HP_clif_mvp_effect(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mvp_effect_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_effect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mvp_effect_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mvp_effect(sd);
+ }
+ if( HPMHooks.count.HP_clif_mvp_effect_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_effect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mvp_effect_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_heal(int fd, int type, int val) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_heal_pre ) {
+ void (*preHookFunc) (int *fd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_heal_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_heal_pre[hIndex].func;
+ preHookFunc(&fd, &type, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.heal(fd, type, val);
+ }
+ if( HPMHooks.count.HP_clif_heal_post ) {
+ void (*postHookFunc) (int *fd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_heal_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_heal_post[hIndex].func;
+ postHookFunc(&fd, &type, &val);
+ }
+ }
+ return;
+}
+void HP_clif_resurrection(struct block_list *bl, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_resurrection_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_resurrection_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_resurrection_pre[hIndex].func;
+ preHookFunc(bl, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.resurrection(bl, type);
+ }
+ if( HPMHooks.count.HP_clif_resurrection_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_resurrection_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_resurrection_post[hIndex].func;
+ postHookFunc(bl, &type);
+ }
+ }
+ return;
+}
+void HP_clif_refine(int fd, int fail, int index, int val) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_refine_pre ) {
+ void (*preHookFunc) (int *fd, int *fail, int *index, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refine_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_refine_pre[hIndex].func;
+ preHookFunc(&fd, &fail, &index, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.refine(fd, fail, index, val);
+ }
+ if( HPMHooks.count.HP_clif_refine_post ) {
+ void (*postHookFunc) (int *fd, int *fail, int *index, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refine_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_refine_post[hIndex].func;
+ postHookFunc(&fd, &fail, &index, &val);
+ }
+ }
+ return;
+}
+void HP_clif_weather(int16 m) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_weather_pre ) {
+ void (*preHookFunc) (int16 *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_weather_pre[hIndex].func;
+ preHookFunc(&m);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.weather(m);
+ }
+ if( HPMHooks.count.HP_clif_weather_post ) {
+ void (*postHookFunc) (int16 *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_weather_post[hIndex].func;
+ postHookFunc(&m);
+ }
+ }
+ return;
+}
+void HP_clif_specialeffect(struct block_list *bl, int type, enum send_target target) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_specialeffect_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *type, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_specialeffect_pre[hIndex].func;
+ preHookFunc(bl, &type, &target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.specialeffect(bl, type, target);
+ }
+ if( HPMHooks.count.HP_clif_specialeffect_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *type, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_specialeffect_post[hIndex].func;
+ postHookFunc(bl, &type, &target);
+ }
+ }
+ return;
+}
+void HP_clif_specialeffect_single(struct block_list *bl, int type, int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_specialeffect_single_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *type, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_single_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_specialeffect_single_pre[hIndex].func;
+ preHookFunc(bl, &type, &fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.specialeffect_single(bl, type, fd);
+ }
+ if( HPMHooks.count.HP_clif_specialeffect_single_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *type, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_single_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_specialeffect_single_post[hIndex].func;
+ postHookFunc(bl, &type, &fd);
+ }
+ }
+ return;
+}
+void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num, send_target target) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_specialeffect_value_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *effect_id, int *num, send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_specialeffect_value_pre[hIndex].func;
+ preHookFunc(bl, &effect_id, &num, &target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.specialeffect_value(bl, effect_id, num, target);
+ }
+ if( HPMHooks.count.HP_clif_specialeffect_value_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *effect_id, int *num, send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_specialeffect_value_post[hIndex].func;
+ postHookFunc(bl, &effect_id, &num, &target);
+ }
+ }
+ return;
+}
+void HP_clif_millenniumshield(struct map_session_data *sd, short shields) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_millenniumshield_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *shields);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_millenniumshield_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_millenniumshield_pre[hIndex].func;
+ preHookFunc(sd, &shields);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.millenniumshield(sd, shields);
+ }
+ if( HPMHooks.count.HP_clif_millenniumshield_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *shields);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_millenniumshield_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_millenniumshield_post[hIndex].func;
+ postHookFunc(sd, &shields);
+ }
+ }
+ return;
+}
+void HP_clif_charm(struct map_session_data *sd, short type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_charm_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_charm_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.charm(sd, type);
+ }
+ if( HPMHooks.count.HP_clif_charm_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_charm_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_charm_single(int fd, struct map_session_data *sd, short type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_charm_single_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd, short *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_single_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_charm_single_pre[hIndex].func;
+ preHookFunc(&fd, sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.charm_single(fd, sd, type);
+ }
+ if( HPMHooks.count.HP_clif_charm_single_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd, short *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_single_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_charm_single_post[hIndex].func;
+ postHookFunc(&fd, sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_snap(struct block_list *bl, short x, short y) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_snap_pre ) {
+ void (*preHookFunc) (struct block_list *bl, short *x, short *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_snap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_snap_pre[hIndex].func;
+ preHookFunc(bl, &x, &y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.snap(bl, x, y);
+ }
+ if( HPMHooks.count.HP_clif_snap_post ) {
+ void (*postHookFunc) (struct block_list *bl, short *x, short *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_snap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_snap_post[hIndex].func;
+ postHookFunc(bl, &x, &y);
+ }
+ }
+ return;
+}
+void HP_clif_weather_check(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_weather_check_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_weather_check_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.weather_check(sd);
+ }
+ if( HPMHooks.count.HP_clif_weather_check_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_weather_check_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_playBGM(struct map_session_data *sd, const char *name) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_playBGM_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_playBGM_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_playBGM_pre[hIndex].func;
+ preHookFunc(sd, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.playBGM(sd, name);
+ }
+ if( HPMHooks.count.HP_clif_playBGM_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_playBGM_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_playBGM_post[hIndex].func;
+ postHookFunc(sd, name);
+ }
+ }
+ return;
+}
+void HP_clif_soundeffect(struct map_session_data *sd, struct block_list *bl, const char *name, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_soundeffect_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, const char *name, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_soundeffect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_soundeffect_pre[hIndex].func;
+ preHookFunc(sd, bl, name, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.soundeffect(sd, bl, name, type);
+ }
+ if( HPMHooks.count.HP_clif_soundeffect_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct block_list *bl, const char *name, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_soundeffect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_soundeffect_post[hIndex].func;
+ postHookFunc(sd, bl, name, &type);
+ }
+ }
+ return;
+}
+void HP_clif_soundeffectall(struct block_list *bl, const char *name, int type, enum send_target coverage) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_soundeffectall_pre ) {
+ void (*preHookFunc) (struct block_list *bl, const char *name, int *type, enum send_target *coverage);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_soundeffectall_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_soundeffectall_pre[hIndex].func;
+ preHookFunc(bl, name, &type, &coverage);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.soundeffectall(bl, name, type, coverage);
+ }
+ if( HPMHooks.count.HP_clif_soundeffectall_post ) {
+ void (*postHookFunc) (struct block_list *bl, const char *name, int *type, enum send_target *coverage);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_soundeffectall_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_soundeffectall_post[hIndex].func;
+ postHookFunc(bl, name, &type, &coverage);
+ }
+ }
+ return;
+}
+void HP_clif_GlobalMessage(struct block_list *bl, const char *message) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_GlobalMessage_pre ) {
+ void (*preHookFunc) (struct block_list *bl, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GlobalMessage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_GlobalMessage_pre[hIndex].func;
+ preHookFunc(bl, message);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.GlobalMessage(bl, message);
+ }
+ if( HPMHooks.count.HP_clif_GlobalMessage_post ) {
+ void (*postHookFunc) (struct block_list *bl, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GlobalMessage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_GlobalMessage_post[hIndex].func;
+ postHookFunc(bl, message);
+ }
+ }
+ return;
+}
+void HP_clif_createchat(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_createchat_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_createchat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_createchat_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.createchat(sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_createchat_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_createchat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_createchat_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_dispchat(struct chat_data *cd, int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_dispchat_pre ) {
+ void (*preHookFunc) (struct chat_data *cd, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dispchat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_dispchat_pre[hIndex].func;
+ preHookFunc(cd, &fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.dispchat(cd, fd);
+ }
+ if( HPMHooks.count.HP_clif_dispchat_post ) {
+ void (*postHookFunc) (struct chat_data *cd, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dispchat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_dispchat_post[hIndex].func;
+ postHookFunc(cd, &fd);
+ }
+ }
+ return;
+}
+void HP_clif_joinchatfail(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_joinchatfail_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatfail_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_joinchatfail_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.joinchatfail(sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_joinchatfail_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatfail_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_joinchatfail_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_joinchatok(struct map_session_data *sd, struct chat_data *cd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_joinchatok_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct chat_data *cd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatok_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_joinchatok_pre[hIndex].func;
+ preHookFunc(sd, cd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.joinchatok(sd, cd);
+ }
+ if( HPMHooks.count.HP_clif_joinchatok_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct chat_data *cd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatok_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_joinchatok_post[hIndex].func;
+ postHookFunc(sd, cd);
+ }
+ }
+ return;
+}
+void HP_clif_addchat(struct chat_data *cd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_addchat_pre ) {
+ void (*preHookFunc) (struct chat_data *cd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addchat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_addchat_pre[hIndex].func;
+ preHookFunc(cd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.addchat(cd, sd);
+ }
+ if( HPMHooks.count.HP_clif_addchat_post ) {
+ void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addchat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_addchat_post[hIndex].func;
+ postHookFunc(cd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_changechatowner(struct chat_data *cd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_changechatowner_pre ) {
+ void (*preHookFunc) (struct chat_data *cd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatowner_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_changechatowner_pre[hIndex].func;
+ preHookFunc(cd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.changechatowner(cd, sd);
+ }
+ if( HPMHooks.count.HP_clif_changechatowner_post ) {
+ void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatowner_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_changechatowner_post[hIndex].func;
+ postHookFunc(cd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_clearchat(struct chat_data *cd, int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_clearchat_pre ) {
+ void (*preHookFunc) (struct chat_data *cd, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_clearchat_pre[hIndex].func;
+ preHookFunc(cd, &fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.clearchat(cd, fd);
+ }
+ if( HPMHooks.count.HP_clif_clearchat_post ) {
+ void (*postHookFunc) (struct chat_data *cd, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_clearchat_post[hIndex].func;
+ postHookFunc(cd, &fd);
+ }
+ }
+ return;
+}
+void HP_clif_leavechat(struct chat_data *cd, struct map_session_data *sd, bool flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_leavechat_pre ) {
+ void (*preHookFunc) (struct chat_data *cd, struct map_session_data *sd, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_leavechat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_leavechat_pre[hIndex].func;
+ preHookFunc(cd, sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.leavechat(cd, sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_leavechat_post ) {
+ void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_leavechat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_leavechat_post[hIndex].func;
+ postHookFunc(cd, sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_changechatstatus(struct chat_data *cd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_changechatstatus_pre ) {
+ void (*preHookFunc) (struct chat_data *cd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatstatus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_changechatstatus_pre[hIndex].func;
+ preHookFunc(cd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.changechatstatus(cd);
+ }
+ if( HPMHooks.count.HP_clif_changechatstatus_post ) {
+ void (*postHookFunc) (struct chat_data *cd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatstatus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_changechatstatus_post[hIndex].func;
+ postHookFunc(cd);
+ }
+ }
+ return;
+}
+void HP_clif_wis_message(int fd, const char *nick, const char *mes, int 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);
+ 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ 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);
+ 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);
+ }
+ }
+ return;
+}
+void HP_clif_wis_end(int fd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_wis_end_pre ) {
+ void (*preHookFunc) (int *fd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_end_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_wis_end_pre[hIndex].func;
+ preHookFunc(&fd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.wis_end(fd, flag);
+ }
+ if( HPMHooks.count.HP_clif_wis_end_post ) {
+ void (*postHookFunc) (int *fd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_end_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_wis_end_post[hIndex].func;
+ postHookFunc(&fd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_disp_onlyself(struct map_session_data *sd, const char *mes, int len) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_disp_onlyself_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *mes, int *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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ 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);
+ 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);
+ }
+ }
+ return;
+}
+void HP_clif_disp_message(struct block_list *src, const char *mes, int 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);
+ 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ 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);
+ 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);
+ }
+ }
+ return;
+}
+void HP_clif_broadcast(struct block_list *bl, const char *mes, int 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);
+ 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ 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);
+ 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);
+ }
+ }
+ 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) {
+ 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);
+ 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ 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);
+ 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);
+ }
+ }
+ return;
+}
+void HP_clif_messagecolor(struct block_list *bl, unsigned long 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);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_messagecolor_pre[hIndex].func;
+ preHookFunc(bl, &color, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ 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);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_messagecolor_post[hIndex].func;
+ postHookFunc(bl, &color, msg);
+ }
+ }
+ return;
+}
+void HP_clif_disp_overhead(struct block_list *bl, const char *mes) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_disp_overhead_pre ) {
+ void (*preHookFunc) (struct block_list *bl, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_overhead_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_disp_overhead_pre[hIndex].func;
+ preHookFunc(bl, mes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.disp_overhead(bl, mes);
+ }
+ if( HPMHooks.count.HP_clif_disp_overhead_post ) {
+ void (*postHookFunc) (struct block_list *bl, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_overhead_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_disp_overhead_post[hIndex].func;
+ postHookFunc(bl, mes);
+ }
+ }
+ return;
+}
+void HP_clif_msg(struct map_session_data *sd, unsigned short id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_msg_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned short *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_msg_pre[hIndex].func;
+ preHookFunc(sd, &id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.msg(sd, id);
+ }
+ if( HPMHooks.count.HP_clif_msg_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned short *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_msg_post[hIndex].func;
+ postHookFunc(sd, &id);
+ }
+ }
+ return;
+}
+void HP_clif_msg_value(struct map_session_data *sd, unsigned short id, int value) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_msg_value_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned short *id, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_value_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_msg_value_pre[hIndex].func;
+ preHookFunc(sd, &id, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.msg_value(sd, id, value);
+ }
+ if( HPMHooks.count.HP_clif_msg_value_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned short *id, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_value_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_msg_value_post[hIndex].func;
+ postHookFunc(sd, &id, &value);
+ }
+ }
+ return;
+}
+void HP_clif_msg_skill(struct map_session_data *sd, uint16 skill_id, int msg_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_msg_skill_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *msg_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_skill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_msg_skill_pre[hIndex].func;
+ preHookFunc(sd, &skill_id, &msg_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.msg_skill(sd, skill_id, msg_id);
+ }
+ if( HPMHooks.count.HP_clif_msg_skill_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *msg_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msg_skill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_msg_skill_post[hIndex].func;
+ postHookFunc(sd, &skill_id, &msg_id);
+ }
+ }
+ return;
+}
+void HP_clif_msgtable(int fd, int line) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_msgtable_pre ) {
+ void (*preHookFunc) (int *fd, int *line);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_msgtable_pre[hIndex].func;
+ preHookFunc(&fd, &line);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.msgtable(fd, line);
+ }
+ if( HPMHooks.count.HP_clif_msgtable_post ) {
+ void (*postHookFunc) (int *fd, int *line);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_msgtable_post[hIndex].func;
+ postHookFunc(&fd, &line);
+ }
+ }
+ return;
+}
+void HP_clif_msgtable_num(int fd, int line, int num) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_msgtable_num_pre ) {
+ void (*preHookFunc) (int *fd, int *line, int *num);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_msgtable_num_pre[hIndex].func;
+ preHookFunc(&fd, &line, &num);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.msgtable_num(fd, line, num);
+ }
+ if( HPMHooks.count.HP_clif_msgtable_num_post ) {
+ void (*postHookFunc) (int *fd, int *line, int *num);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_msgtable_num_post[hIndex].func;
+ postHookFunc(&fd, &line, &num);
+ }
+ }
+ return;
+}
+void HP_clif_message(const int fd, const char *mes) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_message_pre ) {
+ void (*preHookFunc) (const int *fd, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_message_pre[hIndex].func;
+ preHookFunc(&fd, mes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.message(fd, mes);
+ }
+ if( HPMHooks.count.HP_clif_message_post ) {
+ void (*postHookFunc) (const int *fd, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_message_post[hIndex].func;
+ postHookFunc(&fd, mes);
+ }
+ }
+ return;
+}
+void HP_clif_messageln(const int fd, const char *mes) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_messageln_pre ) {
+ void (*preHookFunc) (const int *fd, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messageln_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_messageln_pre[hIndex].func;
+ preHookFunc(&fd, mes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.messageln(fd, mes);
+ }
+ if( HPMHooks.count.HP_clif_messageln_post ) {
+ void (*postHookFunc) (const int *fd, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messageln_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_messageln_post[hIndex].func;
+ postHookFunc(&fd, mes);
+ }
+ }
+ return;
+}
+int HP_clif_colormes(int fd, enum clif_colors color, const char *msg) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_colormes_pre ) {
+ int (*preHookFunc) (int *fd, enum clif_colors *color, const char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_colormes_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_colormes_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &color, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.colormes(fd, color, msg);
+ }
+ if( HPMHooks.count.HP_clif_colormes_post ) {
+ int (*postHookFunc) (int retVal___, int *fd, enum clif_colors *color, const char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_colormes_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_colormes_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, &color, msg);
+ }
+ }
+ return retVal___;
+}
+bool HP_clif_process_message(struct map_session_data *sd, int format, char **name_, int *namelen_, char **message_, int *messagelen_) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ 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_);
+ 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_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ 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_);
+ 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_);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_wisexin(struct map_session_data *sd, int type, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_wisexin_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *type, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisexin_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_wisexin_pre[hIndex].func;
+ preHookFunc(sd, &type, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.wisexin(sd, type, flag);
+ }
+ if( HPMHooks.count.HP_clif_wisexin_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *type, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisexin_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_wisexin_post[hIndex].func;
+ postHookFunc(sd, &type, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_wisall(struct map_session_data *sd, int type, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_wisall_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *type, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisall_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_wisall_pre[hIndex].func;
+ preHookFunc(sd, &type, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.wisall(sd, type, flag);
+ }
+ if( HPMHooks.count.HP_clif_wisall_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *type, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisall_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_wisall_post[hIndex].func;
+ postHookFunc(sd, &type, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_PMIgnoreList(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PMIgnoreList_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PMIgnoreList_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PMIgnoreList_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PMIgnoreList(sd);
+ }
+ if( HPMHooks.count.HP_clif_PMIgnoreList_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PMIgnoreList_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PMIgnoreList_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_traderequest(struct map_session_data *sd, const char *name) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_traderequest_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_traderequest_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_traderequest_pre[hIndex].func;
+ preHookFunc(sd, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.traderequest(sd, name);
+ }
+ if( HPMHooks.count.HP_clif_traderequest_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_traderequest_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_traderequest_post[hIndex].func;
+ postHookFunc(sd, name);
+ }
+ }
+ return;
+}
+void HP_clif_tradestart(struct map_session_data *sd, uint8 type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_tradestart_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, uint8 *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradestart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_tradestart_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.tradestart(sd, type);
+ }
+ if( HPMHooks.count.HP_clif_tradestart_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, uint8 *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradestart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_tradestart_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_tradeadditem(struct map_session_data *sd, struct map_session_data *tsd, int index, int amount) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_tradeadditem_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeadditem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_tradeadditem_pre[hIndex].func;
+ preHookFunc(sd, tsd, &index, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.tradeadditem(sd, tsd, index, amount);
+ }
+ if( HPMHooks.count.HP_clif_tradeadditem_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeadditem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_tradeadditem_post[hIndex].func;
+ postHookFunc(sd, tsd, &index, &amount);
+ }
+ }
+ return;
+}
+void HP_clif_tradeitemok(struct map_session_data *sd, int index, int fail) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_tradeitemok_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *index, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeitemok_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_tradeitemok_pre[hIndex].func;
+ preHookFunc(sd, &index, &fail);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.tradeitemok(sd, index, fail);
+ }
+ if( HPMHooks.count.HP_clif_tradeitemok_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *index, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeitemok_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_tradeitemok_post[hIndex].func;
+ postHookFunc(sd, &index, &fail);
+ }
+ }
+ return;
+}
+void HP_clif_tradedeal_lock(struct map_session_data *sd, int fail) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_tradedeal_lock_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradedeal_lock_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_tradedeal_lock_pre[hIndex].func;
+ preHookFunc(sd, &fail);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.tradedeal_lock(sd, fail);
+ }
+ if( HPMHooks.count.HP_clif_tradedeal_lock_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradedeal_lock_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_tradedeal_lock_post[hIndex].func;
+ postHookFunc(sd, &fail);
+ }
+ }
+ return;
+}
+void HP_clif_tradecancelled(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_tradecancelled_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecancelled_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_tradecancelled_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.tradecancelled(sd);
+ }
+ if( HPMHooks.count.HP_clif_tradecancelled_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecancelled_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_tradecancelled_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_tradecompleted(struct map_session_data *sd, int fail) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_tradecompleted_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecompleted_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_tradecompleted_pre[hIndex].func;
+ preHookFunc(sd, &fail);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.tradecompleted(sd, fail);
+ }
+ if( HPMHooks.count.HP_clif_tradecompleted_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecompleted_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_tradecompleted_post[hIndex].func;
+ postHookFunc(sd, &fail);
+ }
+ }
+ return;
+}
+void HP_clif_tradeundo(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_tradeundo_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeundo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_tradeundo_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.tradeundo(sd);
+ }
+ if( HPMHooks.count.HP_clif_tradeundo_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeundo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_tradeundo_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_openvendingreq(struct map_session_data *sd, int num) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_openvendingreq_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *num);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingreq_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_openvendingreq_pre[hIndex].func;
+ preHookFunc(sd, &num);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.openvendingreq(sd, num);
+ }
+ if( HPMHooks.count.HP_clif_openvendingreq_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *num);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingreq_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_openvendingreq_post[hIndex].func;
+ postHookFunc(sd, &num);
+ }
+ }
+ return;
+}
+void HP_clif_showvendingboard(struct block_list *bl, const char *message, int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_showvendingboard_pre ) {
+ void (*preHookFunc) (struct block_list *bl, const char *message, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showvendingboard_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_showvendingboard_pre[hIndex].func;
+ preHookFunc(bl, message, &fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.showvendingboard(bl, message, fd);
+ }
+ if( HPMHooks.count.HP_clif_showvendingboard_post ) {
+ void (*postHookFunc) (struct block_list *bl, const char *message, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showvendingboard_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_showvendingboard_post[hIndex].func;
+ postHookFunc(bl, message, &fd);
+ }
+ }
+ return;
+}
+void HP_clif_closevendingboard(struct block_list *bl, int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_closevendingboard_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_closevendingboard_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_closevendingboard_pre[hIndex].func;
+ preHookFunc(bl, &fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.closevendingboard(bl, fd);
+ }
+ if( HPMHooks.count.HP_clif_closevendingboard_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_closevendingboard_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_closevendingboard_post[hIndex].func;
+ postHookFunc(bl, &fd);
+ }
+ }
+ return;
+}
+void HP_clif_vendinglist(struct map_session_data *sd, unsigned int id, struct s_vending *vending_list) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_vendinglist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned int *id, struct s_vending *vending_list);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendinglist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_vendinglist_pre[hIndex].func;
+ preHookFunc(sd, &id, vending_list);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.vendinglist(sd, id, vending_list);
+ }
+ if( HPMHooks.count.HP_clif_vendinglist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned int *id, struct s_vending *vending_list);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendinglist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_vendinglist_post[hIndex].func;
+ postHookFunc(sd, &id, vending_list);
+ }
+ }
+ return;
+}
+void HP_clif_buyvending(struct map_session_data *sd, int index, int amount, int fail) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_buyvending_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *index, int *amount, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyvending_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_buyvending_pre[hIndex].func;
+ preHookFunc(sd, &index, &amount, &fail);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.buyvending(sd, index, amount, fail);
+ }
+ if( HPMHooks.count.HP_clif_buyvending_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *index, int *amount, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyvending_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_buyvending_post[hIndex].func;
+ postHookFunc(sd, &index, &amount, &fail);
+ }
+ }
+ return;
+}
+void HP_clif_openvending(struct map_session_data *sd, int id, struct s_vending *vending_list) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_openvending_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *id, struct s_vending *vending_list);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvending_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_openvending_pre[hIndex].func;
+ preHookFunc(sd, &id, vending_list);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.openvending(sd, id, vending_list);
+ }
+ if( HPMHooks.count.HP_clif_openvending_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *id, struct s_vending *vending_list);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvending_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_openvending_post[hIndex].func;
+ postHookFunc(sd, &id, vending_list);
+ }
+ }
+ return;
+}
+void HP_clif_vendingreport(struct map_session_data *sd, int index, int amount) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_vendingreport_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendingreport_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_vendingreport_pre[hIndex].func;
+ preHookFunc(sd, &index, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.vendingreport(sd, index, amount);
+ }
+ if( HPMHooks.count.HP_clif_vendingreport_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendingreport_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_vendingreport_post[hIndex].func;
+ postHookFunc(sd, &index, &amount);
+ }
+ }
+ return;
+}
+void HP_clif_storagelist(struct map_session_data *sd, struct item *items, int items_length) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_storagelist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct item *items, int *items_length);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storagelist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_storagelist_pre[hIndex].func;
+ preHookFunc(sd, items, &items_length);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.storagelist(sd, items, items_length);
+ }
+ if( HPMHooks.count.HP_clif_storagelist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct item *items, int *items_length);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storagelist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_storagelist_post[hIndex].func;
+ postHookFunc(sd, items, &items_length);
+ }
+ }
+ return;
+}
+void HP_clif_updatestorageamount(struct map_session_data *sd, int amount, int max_amount) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_updatestorageamount_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *amount, int *max_amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestorageamount_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_updatestorageamount_pre[hIndex].func;
+ preHookFunc(sd, &amount, &max_amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.updatestorageamount(sd, amount, max_amount);
+ }
+ if( HPMHooks.count.HP_clif_updatestorageamount_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *amount, int *max_amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestorageamount_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_updatestorageamount_post[hIndex].func;
+ postHookFunc(sd, &amount, &max_amount);
+ }
+ }
+ return;
+}
+void HP_clif_storageitemadded(struct map_session_data *sd, struct item *i, int index, int amount) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_storageitemadded_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct item *i, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemadded_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_storageitemadded_pre[hIndex].func;
+ preHookFunc(sd, i, &index, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.storageitemadded(sd, i, index, amount);
+ }
+ if( HPMHooks.count.HP_clif_storageitemadded_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct item *i, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemadded_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_storageitemadded_post[hIndex].func;
+ postHookFunc(sd, i, &index, &amount);
+ }
+ }
+ return;
+}
+void HP_clif_storageitemremoved(struct map_session_data *sd, int index, int amount) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_storageitemremoved_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemremoved_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_storageitemremoved_pre[hIndex].func;
+ preHookFunc(sd, &index, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.storageitemremoved(sd, index, amount);
+ }
+ if( HPMHooks.count.HP_clif_storageitemremoved_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemremoved_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_storageitemremoved_post[hIndex].func;
+ postHookFunc(sd, &index, &amount);
+ }
+ }
+ return;
+}
+void HP_clif_storageclose(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_storageclose_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageclose_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_storageclose_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.storageclose(sd);
+ }
+ if( HPMHooks.count.HP_clif_storageclose_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageclose_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_storageclose_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_skillinfoblock(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skillinfoblock_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfoblock_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skillinfoblock_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skillinfoblock(sd);
+ }
+ if( HPMHooks.count.HP_clif_skillinfoblock_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfoblock_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skillinfoblock_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_skillup(struct map_session_data *sd, uint16 skill_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skillup_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skillup_pre[hIndex].func;
+ preHookFunc(sd, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skillup(sd, skill_id);
+ }
+ if( HPMHooks.count.HP_clif_skillup_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skillup_post[hIndex].func;
+ postHookFunc(sd, &skill_id);
+ }
+ }
+ return;
+}
+void HP_clif_skillinfo(struct map_session_data *sd, int skill_id, int inf) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_skillinfo_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *skill_id, int *inf);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_skillinfo_pre[hIndex].func;
+ preHookFunc(sd, &skill_id, &inf);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.skillinfo(sd, skill_id, inf);
+ }
+ if( HPMHooks.count.HP_clif_skillinfo_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *skill_id, int *inf);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_skillinfo_post[hIndex].func;
+ postHookFunc(sd, &skill_id, &inf);
+ }
+ }
+ return;
+}
+void HP_clif_addskill(struct map_session_data *sd, int id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_addskill_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_addskill_pre[hIndex].func;
+ preHookFunc(sd, &id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.addskill(sd, id);
+ }
+ if( HPMHooks.count.HP_clif_addskill_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_addskill_post[hIndex].func;
+ postHookFunc(sd, &id);
+ }
+ }
+ return;
+}
+void HP_clif_deleteskill(struct map_session_data *sd, int id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_deleteskill_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_deleteskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_deleteskill_pre[hIndex].func;
+ preHookFunc(sd, &id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.deleteskill(sd, id);
+ }
+ if( HPMHooks.count.HP_clif_deleteskill_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_deleteskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_deleteskill_post[hIndex].func;
+ postHookFunc(sd, &id);
+ }
+ }
+ return;
+}
+void HP_clif_party_created(struct map_session_data *sd, int result) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_party_created_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_created_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_party_created_pre[hIndex].func;
+ preHookFunc(sd, &result);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.party_created(sd, result);
+ }
+ if( HPMHooks.count.HP_clif_party_created_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_created_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_party_created_post[hIndex].func;
+ postHookFunc(sd, &result);
+ }
+ }
+ return;
+}
+void HP_clif_party_member_info(struct party_data *p, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_party_member_info_pre ) {
+ void (*preHookFunc) (struct party_data *p, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_member_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_party_member_info_pre[hIndex].func;
+ preHookFunc(p, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.party_member_info(p, sd);
+ }
+ if( HPMHooks.count.HP_clif_party_member_info_post ) {
+ void (*postHookFunc) (struct party_data *p, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_member_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_party_member_info_post[hIndex].func;
+ postHookFunc(p, sd);
+ }
+ }
+ return;
+}
+void HP_clif_party_info(struct party_data *p, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_party_info_pre ) {
+ void (*preHookFunc) (struct party_data *p, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_party_info_pre[hIndex].func;
+ preHookFunc(p, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.party_info(p, sd);
+ }
+ if( HPMHooks.count.HP_clif_party_info_post ) {
+ void (*postHookFunc) (struct party_data *p, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_party_info_post[hIndex].func;
+ postHookFunc(p, sd);
+ }
+ }
+ return;
+}
+void HP_clif_party_invite(struct map_session_data *sd, struct map_session_data *tsd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_party_invite_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_invite_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_party_invite_pre[hIndex].func;
+ preHookFunc(sd, tsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.party_invite(sd, tsd);
+ }
+ if( HPMHooks.count.HP_clif_party_invite_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_invite_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_party_invite_post[hIndex].func;
+ postHookFunc(sd, tsd);
+ }
+ }
+ return;
+}
+void HP_clif_party_inviteack(struct map_session_data *sd, const char *nick, int result) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_party_inviteack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *nick, int *result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_inviteack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_party_inviteack_pre[hIndex].func;
+ preHookFunc(sd, nick, &result);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.party_inviteack(sd, nick, result);
+ }
+ if( HPMHooks.count.HP_clif_party_inviteack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *nick, int *result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_inviteack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_party_inviteack_post[hIndex].func;
+ postHookFunc(sd, nick, &result);
+ }
+ }
+ return;
+}
+void HP_clif_party_option(struct party_data *p, struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_party_option_pre ) {
+ void (*preHookFunc) (struct party_data *p, struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_option_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_party_option_pre[hIndex].func;
+ preHookFunc(p, sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.party_option(p, sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_party_option_post ) {
+ void (*postHookFunc) (struct party_data *p, struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_option_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_party_option_post[hIndex].func;
+ postHookFunc(p, sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_party_withdraw(struct party_data *p, struct map_session_data *sd, int account_id, const char *name, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_party_withdraw_pre ) {
+ void (*preHookFunc) (struct party_data *p, struct map_session_data *sd, int *account_id, const char *name, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_withdraw_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_party_withdraw_pre[hIndex].func;
+ preHookFunc(p, sd, &account_id, name, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.party_withdraw(p, sd, account_id, name, flag);
+ }
+ if( HPMHooks.count.HP_clif_party_withdraw_post ) {
+ void (*postHookFunc) (struct party_data *p, struct map_session_data *sd, int *account_id, const char *name, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_withdraw_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_party_withdraw_post[hIndex].func;
+ postHookFunc(p, sd, &account_id, name, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_party_message(struct party_data *p, int account_id, const char *mes, int len) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_party_message_pre ) {
+ void (*preHookFunc) (struct party_data *p, int *account_id, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_party_message_pre[hIndex].func;
+ preHookFunc(p, &account_id, mes, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.party_message(p, account_id, mes, len);
+ }
+ if( HPMHooks.count.HP_clif_party_message_post ) {
+ void (*postHookFunc) (struct party_data *p, int *account_id, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_party_message_post[hIndex].func;
+ postHookFunc(p, &account_id, mes, &len);
+ }
+ }
+ return;
+}
+void HP_clif_party_xy(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_party_xy_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_party_xy_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.party_xy(sd);
+ }
+ if( HPMHooks.count.HP_clif_party_xy_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_party_xy_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_party_xy_single(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_party_xy_single_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_single_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_party_xy_single_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.party_xy_single(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_party_xy_single_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_single_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_party_xy_single_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_party_hp(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_party_hp_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_hp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_party_hp_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.party_hp(sd);
+ }
+ if( HPMHooks.count.HP_clif_party_hp_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_hp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_party_hp_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_party_xy_remove(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_party_xy_remove_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_remove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_party_xy_remove_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.party_xy_remove(sd);
+ }
+ if( HPMHooks.count.HP_clif_party_xy_remove_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_remove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_party_xy_remove_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_party_show_picker(struct map_session_data *sd, struct item *item_data) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_party_show_picker_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct item *item_data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_show_picker_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_party_show_picker_pre[hIndex].func;
+ preHookFunc(sd, item_data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.party_show_picker(sd, item_data);
+ }
+ if( HPMHooks.count.HP_clif_party_show_picker_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct item *item_data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_show_picker_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_party_show_picker_post[hIndex].func;
+ postHookFunc(sd, item_data);
+ }
+ }
+ return;
+}
+void HP_clif_partyinvitationstate(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_partyinvitationstate_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partyinvitationstate_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_partyinvitationstate_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.partyinvitationstate(sd);
+ }
+ if( HPMHooks.count.HP_clif_partyinvitationstate_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partyinvitationstate_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_partyinvitationstate_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_guild_created(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_created_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_created_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_created_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_created(sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_guild_created_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_created_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_created_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_guild_belonginfo(struct map_session_data *sd, struct guild *g) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_belonginfo_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct guild *g);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_belonginfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_belonginfo_pre[hIndex].func;
+ preHookFunc(sd, g);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_belonginfo(sd, g);
+ }
+ if( HPMHooks.count.HP_clif_guild_belonginfo_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct guild *g);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_belonginfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_belonginfo_post[hIndex].func;
+ postHookFunc(sd, g);
+ }
+ }
+ return;
+}
+void HP_clif_guild_masterormember(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_masterormember_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_masterormember_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_masterormember_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_masterormember(sd);
+ }
+ if( HPMHooks.count.HP_clif_guild_masterormember_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_masterormember_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_masterormember_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_guild_basicinfo(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_basicinfo_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_basicinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_basicinfo_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_basicinfo(sd);
+ }
+ if( HPMHooks.count.HP_clif_guild_basicinfo_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_basicinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_basicinfo_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_guild_allianceinfo(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_allianceinfo_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_allianceinfo_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_allianceinfo(sd);
+ }
+ if( HPMHooks.count.HP_clif_guild_allianceinfo_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_allianceinfo_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_guild_memberlist(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_memberlist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_memberlist_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_memberlist(sd);
+ }
+ if( HPMHooks.count.HP_clif_guild_memberlist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_memberlist_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_guild_skillinfo(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_skillinfo_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_skillinfo_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_skillinfo(sd);
+ }
+ if( HPMHooks.count.HP_clif_guild_skillinfo_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_skillinfo_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_guild_send_onlineinfo(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_send_onlineinfo_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_send_onlineinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_send_onlineinfo_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_send_onlineinfo(sd);
+ }
+ if( HPMHooks.count.HP_clif_guild_send_onlineinfo_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_send_onlineinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_send_onlineinfo_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_guild_memberlogin_notice(struct guild *g, int idx, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_memberlogin_notice_pre ) {
+ void (*preHookFunc) (struct guild *g, int *idx, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlogin_notice_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_memberlogin_notice_pre[hIndex].func;
+ preHookFunc(g, &idx, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_memberlogin_notice(g, idx, flag);
+ }
+ if( HPMHooks.count.HP_clif_guild_memberlogin_notice_post ) {
+ void (*postHookFunc) (struct guild *g, int *idx, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlogin_notice_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_memberlogin_notice_post[hIndex].func;
+ postHookFunc(g, &idx, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_guild_invite(struct map_session_data *sd, struct guild *g) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_invite_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct guild *g);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_invite_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_invite_pre[hIndex].func;
+ preHookFunc(sd, g);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_invite(sd, g);
+ }
+ if( HPMHooks.count.HP_clif_guild_invite_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct guild *g);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_invite_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_invite_post[hIndex].func;
+ postHookFunc(sd, g);
+ }
+ }
+ return;
+}
+void HP_clif_guild_inviteack(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_inviteack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_inviteack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_inviteack_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_inviteack(sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_guild_inviteack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_inviteack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_inviteack_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_guild_leave(struct map_session_data *sd, const char *name, const char *mes) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_leave_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *name, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_leave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_leave_pre[hIndex].func;
+ preHookFunc(sd, name, mes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_leave(sd, name, mes);
+ }
+ if( HPMHooks.count.HP_clif_guild_leave_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *name, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_leave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_leave_post[hIndex].func;
+ postHookFunc(sd, name, mes);
+ }
+ }
+ return;
+}
+void HP_clif_guild_expulsion(struct map_session_data *sd, const char *name, const char *mes, int account_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_expulsion_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *name, const char *mes, int *account_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsion_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_expulsion_pre[hIndex].func;
+ preHookFunc(sd, name, mes, &account_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_expulsion(sd, name, mes, account_id);
+ }
+ if( HPMHooks.count.HP_clif_guild_expulsion_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *name, const char *mes, int *account_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsion_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_expulsion_post[hIndex].func;
+ postHookFunc(sd, name, mes, &account_id);
+ }
+ }
+ return;
+}
+void HP_clif_guild_positionchanged(struct guild *g, int idx) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_positionchanged_pre ) {
+ void (*preHookFunc) (struct guild *g, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionchanged_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_positionchanged_pre[hIndex].func;
+ preHookFunc(g, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_positionchanged(g, idx);
+ }
+ if( HPMHooks.count.HP_clif_guild_positionchanged_post ) {
+ void (*postHookFunc) (struct guild *g, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionchanged_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_positionchanged_post[hIndex].func;
+ postHookFunc(g, &idx);
+ }
+ }
+ return;
+}
+void HP_clif_guild_memberpositionchanged(struct guild *g, int idx) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_memberpositionchanged_pre ) {
+ void (*preHookFunc) (struct guild *g, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberpositionchanged_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_memberpositionchanged_pre[hIndex].func;
+ preHookFunc(g, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_memberpositionchanged(g, idx);
+ }
+ if( HPMHooks.count.HP_clif_guild_memberpositionchanged_post ) {
+ void (*postHookFunc) (struct guild *g, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberpositionchanged_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_memberpositionchanged_post[hIndex].func;
+ postHookFunc(g, &idx);
+ }
+ }
+ return;
+}
+void HP_clif_guild_emblem(struct map_session_data *sd, struct guild *g) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_emblem_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct guild *g);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_emblem_pre[hIndex].func;
+ preHookFunc(sd, g);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_emblem(sd, g);
+ }
+ if( HPMHooks.count.HP_clif_guild_emblem_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct guild *g);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_emblem_post[hIndex].func;
+ postHookFunc(sd, g);
+ }
+ }
+ return;
+}
+void HP_clif_guild_emblem_area(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_emblem_area_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_area_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_emblem_area_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_emblem_area(bl);
+ }
+ if( HPMHooks.count.HP_clif_guild_emblem_area_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_area_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_emblem_area_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+void HP_clif_guild_notice(struct map_session_data *sd, struct guild *g) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_notice_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct guild *g);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_notice_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_notice_pre[hIndex].func;
+ preHookFunc(sd, g);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_notice(sd, g);
+ }
+ if( HPMHooks.count.HP_clif_guild_notice_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct guild *g);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_notice_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_notice_post[hIndex].func;
+ postHookFunc(sd, g);
+ }
+ }
+ return;
+}
+void HP_clif_guild_message(struct guild *g, int account_id, const char *mes, int len) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_message_pre ) {
+ void (*preHookFunc) (struct guild *g, int *account_id, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_message_pre[hIndex].func;
+ preHookFunc(g, &account_id, mes, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_message(g, account_id, mes, len);
+ }
+ if( HPMHooks.count.HP_clif_guild_message_post ) {
+ void (*postHookFunc) (struct guild *g, int *account_id, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_message_post[hIndex].func;
+ postHookFunc(g, &account_id, mes, &len);
+ }
+ }
+ return;
+}
+int HP_clif_guild_skillup(struct map_session_data *sd, uint16 skill_id, int lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_guild_skillup_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_skillup_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id, &lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.guild_skillup(sd, skill_id, lv);
+ }
+ if( HPMHooks.count.HP_clif_guild_skillup_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, int *lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_skillup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id, &lv);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_guild_reqalliance(struct map_session_data *sd, int account_id, const char *name) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_reqalliance_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *account_id, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_reqalliance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_reqalliance_pre[hIndex].func;
+ preHookFunc(sd, &account_id, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_reqalliance(sd, account_id, name);
+ }
+ if( HPMHooks.count.HP_clif_guild_reqalliance_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *account_id, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_reqalliance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_reqalliance_post[hIndex].func;
+ postHookFunc(sd, &account_id, name);
+ }
+ }
+ return;
+}
+void HP_clif_guild_allianceack(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_allianceack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_allianceack_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_allianceack(sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_guild_allianceack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_allianceack_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_guild_delalliance(struct map_session_data *sd, int guild_id, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_delalliance_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_delalliance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_delalliance_pre[hIndex].func;
+ preHookFunc(sd, &guild_id, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_delalliance(sd, guild_id, flag);
+ }
+ if( HPMHooks.count.HP_clif_guild_delalliance_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *guild_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_delalliance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_delalliance_post[hIndex].func;
+ postHookFunc(sd, &guild_id, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_guild_oppositionack(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_oppositionack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_oppositionack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_oppositionack_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_oppositionack(sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_guild_oppositionack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_oppositionack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_oppositionack_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_guild_broken(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_broken_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_broken_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_broken_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_broken(sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_guild_broken_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_broken_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_broken_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_guild_xy(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_xy_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_xy_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_xy(sd);
+ }
+ if( HPMHooks.count.HP_clif_guild_xy_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_xy_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_guild_xy_single(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_xy_single_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_single_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_xy_single_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_xy_single(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_guild_xy_single_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_single_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_xy_single_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_guild_xy_remove(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_xy_remove_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_remove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_xy_remove_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_xy_remove(sd);
+ }
+ if( HPMHooks.count.HP_clif_guild_xy_remove_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_remove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_xy_remove_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_guild_positionnamelist(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_positionnamelist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionnamelist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_positionnamelist_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_positionnamelist(sd);
+ }
+ if( HPMHooks.count.HP_clif_guild_positionnamelist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionnamelist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_positionnamelist_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_guild_positioninfolist(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_positioninfolist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positioninfolist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_positioninfolist_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_positioninfolist(sd);
+ }
+ if( HPMHooks.count.HP_clif_guild_positioninfolist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positioninfolist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_positioninfolist_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_guild_expulsionlist(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_guild_expulsionlist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsionlist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_guild_expulsionlist_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.guild_expulsionlist(sd);
+ }
+ if( HPMHooks.count.HP_clif_guild_expulsionlist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsionlist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_guild_expulsionlist_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+bool HP_clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_clif_validate_emblem_pre ) {
+ bool (*preHookFunc) (const uint8 *emblem, unsigned long *emblem_len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_validate_emblem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_validate_emblem_pre[hIndex].func;
+ retVal___ = preHookFunc(emblem, &emblem_len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.validate_emblem(emblem, emblem_len);
+ }
+ if( HPMHooks.count.HP_clif_validate_emblem_post ) {
+ bool (*postHookFunc) (bool retVal___, const uint8 *emblem, unsigned long *emblem_len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_validate_emblem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_validate_emblem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, emblem, &emblem_len);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_bg_hp(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_bg_hp_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_hp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_bg_hp_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.bg_hp(sd);
+ }
+ if( HPMHooks.count.HP_clif_bg_hp_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_hp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_bg_hp_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_bg_xy(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_bg_xy_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_bg_xy_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.bg_xy(sd);
+ }
+ if( HPMHooks.count.HP_clif_bg_xy_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_bg_xy_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_bg_xy_remove(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_bg_xy_remove_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_remove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_bg_xy_remove_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.bg_xy_remove(sd);
+ }
+ if( HPMHooks.count.HP_clif_bg_xy_remove_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_remove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_bg_xy_remove_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_bg_message(struct battleground_data *bgd, int src_id, const char *name, const char *mes, int 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);
+ 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ 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);
+ 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);
+ }
+ }
+ return;
+}
+void HP_clif_bg_updatescore(int16 m) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_bg_updatescore_pre ) {
+ void (*preHookFunc) (int16 *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_bg_updatescore_pre[hIndex].func;
+ preHookFunc(&m);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.bg_updatescore(m);
+ }
+ if( HPMHooks.count.HP_clif_bg_updatescore_post ) {
+ void (*postHookFunc) (int16 *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_bg_updatescore_post[hIndex].func;
+ postHookFunc(&m);
+ }
+ }
+ return;
+}
+void HP_clif_bg_updatescore_single(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_bg_updatescore_single_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_single_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_bg_updatescore_single_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.bg_updatescore_single(sd);
+ }
+ if( HPMHooks.count.HP_clif_bg_updatescore_single_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_single_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_bg_updatescore_single_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_sendbgemblem_area(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_sendbgemblem_area_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_area_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_sendbgemblem_area_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.sendbgemblem_area(sd);
+ }
+ if( HPMHooks.count.HP_clif_sendbgemblem_area_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_area_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_sendbgemblem_area_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_sendbgemblem_single(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_sendbgemblem_single_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_single_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_sendbgemblem_single_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.sendbgemblem_single(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_sendbgemblem_single_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_single_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_sendbgemblem_single_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+int HP_clif_instance(int instance_id, int type, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_instance_pre ) {
+ int (*preHookFunc) (int *instance_id, int *type, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_instance_pre[hIndex].func;
+ retVal___ = preHookFunc(&instance_id, &type, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.instance(instance_id, type, flag);
+ }
+ if( HPMHooks.count.HP_clif_instance_post ) {
+ int (*postHookFunc) (int retVal___, int *instance_id, int *type, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_instance_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &instance_id, &type, &flag);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_instance_join(int fd, int instance_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_instance_join_pre ) {
+ void (*preHookFunc) (int *fd, int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_join_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_instance_join_pre[hIndex].func;
+ preHookFunc(&fd, &instance_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.instance_join(fd, instance_id);
+ }
+ if( HPMHooks.count.HP_clif_instance_join_post ) {
+ void (*postHookFunc) (int *fd, int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_join_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_instance_join_post[hIndex].func;
+ postHookFunc(&fd, &instance_id);
+ }
+ }
+ return;
+}
+void HP_clif_instance_leave(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_instance_leave_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_leave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_instance_leave_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.instance_leave(fd);
+ }
+ if( HPMHooks.count.HP_clif_instance_leave_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_leave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_instance_leave_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_clif_catch_process(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_catch_process_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_catch_process_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_catch_process_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.catch_process(sd);
+ }
+ if( HPMHooks.count.HP_clif_catch_process_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_catch_process_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_catch_process_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_pet_roulette(struct map_session_data *sd, int data) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pet_roulette_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_roulette_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pet_roulette_pre[hIndex].func;
+ preHookFunc(sd, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pet_roulette(sd, data);
+ }
+ if( HPMHooks.count.HP_clif_pet_roulette_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_roulette_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pet_roulette_post[hIndex].func;
+ postHookFunc(sd, &data);
+ }
+ }
+ return;
+}
+void HP_clif_sendegg(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_sendegg_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendegg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_sendegg_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.sendegg(sd);
+ }
+ if( HPMHooks.count.HP_clif_sendegg_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendegg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_sendegg_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_send_petstatus(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_send_petstatus_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petstatus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_send_petstatus_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.send_petstatus(sd);
+ }
+ if( HPMHooks.count.HP_clif_send_petstatus_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petstatus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_send_petstatus_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_send_petdata(struct map_session_data *sd, struct pet_data *pd, int type, int param) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_send_petdata_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd, int *type, int *param);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_send_petdata_pre[hIndex].func;
+ preHookFunc(sd, pd, &type, &param);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.send_petdata(sd, pd, type, param);
+ }
+ if( HPMHooks.count.HP_clif_send_petdata_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct pet_data *pd, int *type, int *param);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_send_petdata_post[hIndex].func;
+ postHookFunc(sd, pd, &type, &param);
+ }
+ }
+ return;
+}
+void HP_clif_pet_emotion(struct pet_data *pd, int param) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pet_emotion_pre ) {
+ void (*preHookFunc) (struct pet_data *pd, int *param);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_emotion_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pet_emotion_pre[hIndex].func;
+ preHookFunc(pd, &param);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pet_emotion(pd, param);
+ }
+ if( HPMHooks.count.HP_clif_pet_emotion_post ) {
+ void (*postHookFunc) (struct pet_data *pd, int *param);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_emotion_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pet_emotion_post[hIndex].func;
+ postHookFunc(pd, &param);
+ }
+ }
+ return;
+}
+void HP_clif_pet_food(struct map_session_data *sd, int foodid, int fail) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pet_food_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *foodid, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_food_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pet_food_pre[hIndex].func;
+ preHookFunc(sd, &foodid, &fail);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pet_food(sd, foodid, fail);
+ }
+ if( HPMHooks.count.HP_clif_pet_food_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *foodid, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_food_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pet_food_post[hIndex].func;
+ postHookFunc(sd, &foodid, &fail);
+ }
+ }
+ return;
+}
+int HP_clif_friendslist_toggle_sub(struct map_session_data *sd, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_friendslist_toggle_sub_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_toggle_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_clif_friendslist_toggle_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.clif.friendslist_toggle_sub(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_clif_friendslist_toggle_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_toggle_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_clif_friendslist_toggle_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_friendslist_send(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_friendslist_send_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_send_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_friendslist_send_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.friendslist_send(sd);
+ }
+ if( HPMHooks.count.HP_clif_friendslist_send_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_send_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_friendslist_send_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_friendslist_reqack(struct map_session_data *sd, struct map_session_data *f_sd, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_friendslist_reqack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *f_sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_reqack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_friendslist_reqack_pre[hIndex].func;
+ preHookFunc(sd, f_sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.friendslist_reqack(sd, f_sd, type);
+ }
+ if( HPMHooks.count.HP_clif_friendslist_reqack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *f_sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_reqack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_friendslist_reqack_post[hIndex].func;
+ postHookFunc(sd, f_sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_friendslist_toggle(struct map_session_data *sd, int account_id, int char_id, int online) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_friendslist_toggle_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, int *online);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_toggle_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_friendslist_toggle_pre[hIndex].func;
+ preHookFunc(sd, &account_id, &char_id, &online);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.friendslist_toggle(sd, account_id, char_id, online);
+ }
+ if( HPMHooks.count.HP_clif_friendslist_toggle_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, int *online);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_toggle_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_friendslist_toggle_post[hIndex].func;
+ postHookFunc(sd, &account_id, &char_id, &online);
+ }
+ }
+ return;
+}
+void HP_clif_friendlist_req(struct map_session_data *sd, int account_id, int char_id, const char *name) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_friendlist_req_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendlist_req_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_friendlist_req_pre[hIndex].func;
+ preHookFunc(sd, &account_id, &char_id, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.friendlist_req(sd, account_id, char_id, name);
+ }
+ if( HPMHooks.count.HP_clif_friendlist_req_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendlist_req_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_friendlist_req_post[hIndex].func;
+ postHookFunc(sd, &account_id, &char_id, name);
+ }
+ }
+ return;
+}
+void HP_clif_GM_kickack(struct map_session_data *sd, int id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_GM_kickack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kickack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_GM_kickack_pre[hIndex].func;
+ preHookFunc(sd, &id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.GM_kickack(sd, id);
+ }
+ if( HPMHooks.count.HP_clif_GM_kickack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kickack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_GM_kickack_post[hIndex].func;
+ postHookFunc(sd, &id);
+ }
+ }
+ return;
+}
+void HP_clif_GM_kick(struct map_session_data *sd, struct map_session_data *tsd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_GM_kick_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_GM_kick_pre[hIndex].func;
+ preHookFunc(sd, tsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.GM_kick(sd, tsd);
+ }
+ if( HPMHooks.count.HP_clif_GM_kick_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_GM_kick_post[hIndex].func;
+ postHookFunc(sd, tsd);
+ }
+ }
+ return;
+}
+void HP_clif_manner_message(struct map_session_data *sd, uint32 type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_manner_message_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, uint32 *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_manner_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_manner_message_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.manner_message(sd, type);
+ }
+ if( HPMHooks.count.HP_clif_manner_message_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, uint32 *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_manner_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_manner_message_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_GM_silence(struct map_session_data *sd, struct map_session_data *tsd, uint8 type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_GM_silence_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd, uint8 *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_silence_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_GM_silence_pre[hIndex].func;
+ preHookFunc(sd, tsd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.GM_silence(sd, tsd, type);
+ }
+ if( HPMHooks.count.HP_clif_GM_silence_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd, uint8 *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_silence_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_GM_silence_post[hIndex].func;
+ postHookFunc(sd, tsd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_account_name(struct map_session_data *sd, int account_id, const char *accname) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_account_name_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *account_id, const char *accname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_account_name_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_account_name_pre[hIndex].func;
+ preHookFunc(sd, &account_id, accname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.account_name(sd, account_id, accname);
+ }
+ if( HPMHooks.count.HP_clif_account_name_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *account_id, const char *accname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_account_name_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_account_name_post[hIndex].func;
+ postHookFunc(sd, &account_id, accname);
+ }
+ }
+ return;
+}
+void HP_clif_check(int fd, struct map_session_data *pl_sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_check_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *pl_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_check_pre[hIndex].func;
+ preHookFunc(&fd, pl_sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.check(fd, pl_sd);
+ }
+ if( HPMHooks.count.HP_clif_check_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *pl_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_check_post[hIndex].func;
+ postHookFunc(&fd, pl_sd);
+ }
+ }
+ return;
+}
+void HP_clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_hominfo_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct homun_data *hd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hominfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_hominfo_pre[hIndex].func;
+ preHookFunc(sd, hd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.hominfo(sd, hd, flag);
+ }
+ if( HPMHooks.count.HP_clif_hominfo_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct homun_data *hd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hominfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_hominfo_post[hIndex].func;
+ postHookFunc(sd, hd, &flag);
+ }
+ }
+ return;
+}
+int HP_clif_homskillinfoblock(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_homskillinfoblock_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_homskillinfoblock_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.homskillinfoblock(sd);
+ }
+ if( HPMHooks.count.HP_clif_homskillinfoblock_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_homskillinfoblock_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_homskillup(struct map_session_data *sd, uint16 skill_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_homskillup_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_homskillup_pre[hIndex].func;
+ preHookFunc(sd, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.homskillup(sd, skill_id);
+ }
+ if( HPMHooks.count.HP_clif_homskillup_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_homskillup_post[hIndex].func;
+ postHookFunc(sd, &skill_id);
+ }
+ }
+ return;
+}
+int HP_clif_hom_food(struct map_session_data *sd, int foodid, int fail) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_hom_food_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *foodid, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hom_food_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_hom_food_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &foodid, &fail);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.hom_food(sd, foodid, fail);
+ }
+ if( HPMHooks.count.HP_clif_hom_food_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *foodid, int *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hom_food_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_hom_food_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &foodid, &fail);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_send_homdata(struct map_session_data *sd, int state, int param) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_send_homdata_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *state, int *param);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_homdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_send_homdata_pre[hIndex].func;
+ preHookFunc(sd, &state, &param);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.send_homdata(sd, state, param);
+ }
+ if( HPMHooks.count.HP_clif_send_homdata_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *state, int *param);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_homdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_send_homdata_post[hIndex].func;
+ postHookFunc(sd, &state, &param);
+ }
+ }
+ return;
+}
+void HP_clif_quest_send_list(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_quest_send_list_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_quest_send_list_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.quest_send_list(sd);
+ }
+ if( HPMHooks.count.HP_clif_quest_send_list_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_quest_send_list_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_quest_send_mission(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_quest_send_mission_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_mission_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_quest_send_mission_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.quest_send_mission(sd);
+ }
+ if( HPMHooks.count.HP_clif_quest_send_mission_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_mission_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_quest_send_mission_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd, int index) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_quest_add_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct quest *qd, int *index);
+ 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.quest_add(sd, qd, index);
+ }
+ if( HPMHooks.count.HP_clif_quest_add_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct quest *qd, int *index);
+ 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);
+ }
+ }
+ return;
+}
+void HP_clif_quest_delete(struct map_session_data *sd, int quest_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_quest_delete_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *quest_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_quest_delete_pre[hIndex].func;
+ preHookFunc(sd, &quest_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.quest_delete(sd, quest_id);
+ }
+ if( HPMHooks.count.HP_clif_quest_delete_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *quest_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_quest_delete_post[hIndex].func;
+ postHookFunc(sd, &quest_id);
+ }
+ }
+ return;
+}
+void HP_clif_quest_update_status(struct map_session_data *sd, int quest_id, bool active) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_quest_update_status_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *quest_id, bool *active);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_status_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_quest_update_status_pre[hIndex].func;
+ preHookFunc(sd, &quest_id, &active);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.quest_update_status(sd, quest_id, active);
+ }
+ if( HPMHooks.count.HP_clif_quest_update_status_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *quest_id, bool *active);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_status_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_quest_update_status_post[hIndex].func;
+ postHookFunc(sd, &quest_id, &active);
+ }
+ }
+ return;
+}
+void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *qd, int index) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_quest_update_objective_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct quest *qd, int *index);
+ 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.quest_update_objective(sd, qd, index);
+ }
+ if( HPMHooks.count.HP_clif_quest_update_objective_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct quest *qd, int *index);
+ 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);
+ }
+ }
+ return;
+}
+void HP_clif_quest_show_event(struct map_session_data *sd, struct block_list *bl, short state, short color) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_quest_show_event_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, short *state, short *color);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_show_event_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_quest_show_event_pre[hIndex].func;
+ preHookFunc(sd, bl, &state, &color);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.quest_show_event(sd, bl, state, color);
+ }
+ if( HPMHooks.count.HP_clif_quest_show_event_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct block_list *bl, short *state, short *color);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_show_event_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_quest_show_event_post[hIndex].func;
+ postHookFunc(sd, bl, &state, &color);
+ }
+ }
+ return;
+}
+void HP_clif_mail_window(int fd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mail_window_pre ) {
+ void (*preHookFunc) (int *fd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_window_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mail_window_pre[hIndex].func;
+ preHookFunc(&fd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mail_window(fd, flag);
+ }
+ if( HPMHooks.count.HP_clif_mail_window_post ) {
+ void (*postHookFunc) (int *fd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_window_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mail_window_post[hIndex].func;
+ postHookFunc(&fd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_mail_read(struct map_session_data *sd, int mail_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mail_read_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *mail_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mail_read_pre[hIndex].func;
+ preHookFunc(sd, &mail_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mail_read(sd, mail_id);
+ }
+ if( HPMHooks.count.HP_clif_mail_read_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *mail_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mail_read_post[hIndex].func;
+ postHookFunc(sd, &mail_id);
+ }
+ }
+ return;
+}
+void HP_clif_mail_delete(int fd, int mail_id, short fail) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mail_delete_pre ) {
+ void (*preHookFunc) (int *fd, int *mail_id, short *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mail_delete_pre[hIndex].func;
+ preHookFunc(&fd, &mail_id, &fail);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mail_delete(fd, mail_id, fail);
+ }
+ if( HPMHooks.count.HP_clif_mail_delete_post ) {
+ void (*postHookFunc) (int *fd, int *mail_id, short *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mail_delete_post[hIndex].func;
+ postHookFunc(&fd, &mail_id, &fail);
+ }
+ }
+ return;
+}
+void HP_clif_mail_return(int fd, int mail_id, short fail) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mail_return_pre ) {
+ void (*preHookFunc) (int *fd, int *mail_id, short *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_return_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mail_return_pre[hIndex].func;
+ preHookFunc(&fd, &mail_id, &fail);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mail_return(fd, mail_id, fail);
+ }
+ if( HPMHooks.count.HP_clif_mail_return_post ) {
+ void (*postHookFunc) (int *fd, int *mail_id, short *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_return_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mail_return_post[hIndex].func;
+ postHookFunc(&fd, &mail_id, &fail);
+ }
+ }
+ return;
+}
+void HP_clif_mail_send(int fd, bool fail) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mail_send_pre ) {
+ void (*preHookFunc) (int *fd, bool *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_send_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mail_send_pre[hIndex].func;
+ preHookFunc(&fd, &fail);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mail_send(fd, fail);
+ }
+ if( HPMHooks.count.HP_clif_mail_send_post ) {
+ void (*postHookFunc) (int *fd, bool *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_send_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mail_send_post[hIndex].func;
+ postHookFunc(&fd, &fail);
+ }
+ }
+ return;
+}
+void HP_clif_mail_new(int fd, int mail_id, const char *sender, const char *title) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mail_new_pre ) {
+ void (*preHookFunc) (int *fd, int *mail_id, const char *sender, const char *title);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_new_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mail_new_pre[hIndex].func;
+ preHookFunc(&fd, &mail_id, sender, title);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mail_new(fd, mail_id, sender, title);
+ }
+ if( HPMHooks.count.HP_clif_mail_new_post ) {
+ void (*postHookFunc) (int *fd, int *mail_id, const char *sender, const char *title);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_new_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mail_new_post[hIndex].func;
+ postHookFunc(&fd, &mail_id, sender, title);
+ }
+ }
+ return;
+}
+void HP_clif_mail_refreshinbox(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mail_refreshinbox_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_refreshinbox_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mail_refreshinbox_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mail_refreshinbox(sd);
+ }
+ if( HPMHooks.count.HP_clif_mail_refreshinbox_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_refreshinbox_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mail_refreshinbox_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_mail_getattachment(int fd, uint8 flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mail_getattachment_pre ) {
+ void (*preHookFunc) (int *fd, uint8 *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_getattachment_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mail_getattachment_pre[hIndex].func;
+ preHookFunc(&fd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mail_getattachment(fd, flag);
+ }
+ if( HPMHooks.count.HP_clif_mail_getattachment_post ) {
+ void (*postHookFunc) (int *fd, uint8 *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_getattachment_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mail_getattachment_post[hIndex].func;
+ postHookFunc(&fd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_mail_setattachment(int fd, int index, uint8 flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mail_setattachment_pre ) {
+ void (*preHookFunc) (int *fd, int *index, uint8 *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_setattachment_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mail_setattachment_pre[hIndex].func;
+ preHookFunc(&fd, &index, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mail_setattachment(fd, index, flag);
+ }
+ if( HPMHooks.count.HP_clif_mail_setattachment_post ) {
+ void (*postHookFunc) (int *fd, int *index, uint8 *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_setattachment_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mail_setattachment_post[hIndex].func;
+ postHookFunc(&fd, &index, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_auction_openwindow(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_auction_openwindow_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_openwindow_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_auction_openwindow_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.auction_openwindow(sd);
+ }
+ if( HPMHooks.count.HP_clif_auction_openwindow_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_openwindow_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_auction_openwindow_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_auction_results(struct map_session_data *sd, short count, short pages, uint8 *buf) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_auction_results_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *count, short *pages, uint8 *buf);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_results_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_auction_results_pre[hIndex].func;
+ preHookFunc(sd, &count, &pages, buf);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.auction_results(sd, count, pages, buf);
+ }
+ if( HPMHooks.count.HP_clif_auction_results_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *count, short *pages, uint8 *buf);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_results_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_auction_results_post[hIndex].func;
+ postHookFunc(sd, &count, &pages, buf);
+ }
+ }
+ return;
+}
+void HP_clif_auction_message(int fd, unsigned char flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_auction_message_pre ) {
+ void (*preHookFunc) (int *fd, unsigned char *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_auction_message_pre[hIndex].func;
+ preHookFunc(&fd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.auction_message(fd, flag);
+ }
+ if( HPMHooks.count.HP_clif_auction_message_post ) {
+ void (*postHookFunc) (int *fd, unsigned char *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_auction_message_post[hIndex].func;
+ postHookFunc(&fd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_auction_close(int fd, unsigned char flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_auction_close_pre ) {
+ void (*preHookFunc) (int *fd, unsigned char *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_close_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_auction_close_pre[hIndex].func;
+ preHookFunc(&fd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.auction_close(fd, flag);
+ }
+ if( HPMHooks.count.HP_clif_auction_close_post ) {
+ void (*postHookFunc) (int *fd, unsigned char *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_close_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_auction_close_post[hIndex].func;
+ postHookFunc(&fd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_auction_setitem(int fd, int index, bool fail) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_auction_setitem_pre ) {
+ void (*preHookFunc) (int *fd, int *index, bool *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_setitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_auction_setitem_pre[hIndex].func;
+ preHookFunc(&fd, &index, &fail);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.auction_setitem(fd, index, fail);
+ }
+ if( HPMHooks.count.HP_clif_auction_setitem_post ) {
+ void (*postHookFunc) (int *fd, int *index, bool *fail);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_setitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_auction_setitem_post[hIndex].func;
+ postHookFunc(&fd, &index, &fail);
+ }
+ }
+ return;
+}
+void HP_clif_mercenary_info(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mercenary_info_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mercenary_info_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mercenary_info(sd);
+ }
+ if( HPMHooks.count.HP_clif_mercenary_info_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mercenary_info_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_mercenary_skillblock(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mercenary_skillblock_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_skillblock_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mercenary_skillblock_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mercenary_skillblock(sd);
+ }
+ if( HPMHooks.count.HP_clif_mercenary_skillblock_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_skillblock_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mercenary_skillblock_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_mercenary_message(struct map_session_data *sd, int message) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mercenary_message_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mercenary_message_pre[hIndex].func;
+ preHookFunc(sd, &message);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mercenary_message(sd, message);
+ }
+ if( HPMHooks.count.HP_clif_mercenary_message_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mercenary_message_post[hIndex].func;
+ postHookFunc(sd, &message);
+ }
+ }
+ return;
+}
+void HP_clif_mercenary_updatestatus(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_mercenary_updatestatus_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_updatestatus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_mercenary_updatestatus_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.mercenary_updatestatus(sd, type);
+ }
+ if( HPMHooks.count.HP_clif_mercenary_updatestatus_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_updatestatus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_mercenary_updatestatus_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_rental_time(int fd, int nameid, int seconds) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_rental_time_pre ) {
+ void (*preHookFunc) (int *fd, int *nameid, int *seconds);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_time_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_rental_time_pre[hIndex].func;
+ preHookFunc(&fd, &nameid, &seconds);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.rental_time(fd, nameid, seconds);
+ }
+ if( HPMHooks.count.HP_clif_rental_time_post ) {
+ void (*postHookFunc) (int *fd, int *nameid, int *seconds);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_time_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_rental_time_post[hIndex].func;
+ postHookFunc(&fd, &nameid, &seconds);
+ }
+ }
+ return;
+}
+void HP_clif_rental_expired(int fd, int index, int nameid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_rental_expired_pre ) {
+ void (*preHookFunc) (int *fd, int *index, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_expired_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_rental_expired_pre[hIndex].func;
+ preHookFunc(&fd, &index, &nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.rental_expired(fd, index, nameid);
+ }
+ if( HPMHooks.count.HP_clif_rental_expired_post ) {
+ void (*postHookFunc) (int *fd, int *index, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_expired_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_rental_expired_post[hIndex].func;
+ postHookFunc(&fd, &index, &nameid);
+ }
+ }
+ return;
+}
+void HP_clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyBookingRegisterAck_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRegisterAck_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyBookingRegisterAck_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyBookingRegisterAck(sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_PartyBookingRegisterAck_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRegisterAck_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyBookingRegisterAck_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_PartyBookingDeleteAck(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyBookingDeleteAck_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteAck_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyBookingDeleteAck_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyBookingDeleteAck(sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_PartyBookingDeleteAck_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteAck_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyBookingDeleteAck_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info **results, int count, bool more_result) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyBookingSearchAck_pre ) {
+ void (*preHookFunc) (int *fd, struct party_booking_ad_info **results, int *count, bool *more_result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSearchAck_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyBookingSearchAck_pre[hIndex].func;
+ preHookFunc(&fd, results, &count, &more_result);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyBookingSearchAck(fd, results, count, more_result);
+ }
+ if( HPMHooks.count.HP_clif_PartyBookingSearchAck_post ) {
+ void (*postHookFunc) (int *fd, struct party_booking_ad_info **results, int *count, bool *more_result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSearchAck_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyBookingSearchAck_post[hIndex].func;
+ postHookFunc(&fd, results, &count, &more_result);
+ }
+ }
+ return;
+}
+void HP_clif_PartyBookingUpdateNotify(struct map_session_data *sd, struct party_booking_ad_info *pb_ad) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyBookingUpdateNotify_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingUpdateNotify_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyBookingUpdateNotify_pre[hIndex].func;
+ preHookFunc(sd, pb_ad);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyBookingUpdateNotify(sd, pb_ad);
+ }
+ if( HPMHooks.count.HP_clif_PartyBookingUpdateNotify_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingUpdateNotify_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyBookingUpdateNotify_post[hIndex].func;
+ postHookFunc(sd, pb_ad);
+ }
+ }
+ return;
+}
+void HP_clif_PartyBookingDeleteNotify(struct map_session_data *sd, int index) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyBookingDeleteNotify_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteNotify_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyBookingDeleteNotify_pre[hIndex].func;
+ preHookFunc(sd, &index);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyBookingDeleteNotify(sd, index);
+ }
+ if( HPMHooks.count.HP_clif_PartyBookingDeleteNotify_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteNotify_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyBookingDeleteNotify_post[hIndex].func;
+ postHookFunc(sd, &index);
+ }
+ }
+ return;
+}
+void HP_clif_PartyBookingInsertNotify(struct map_session_data *sd, struct party_booking_ad_info *pb_ad) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyBookingInsertNotify_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingInsertNotify_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyBookingInsertNotify_pre[hIndex].func;
+ preHookFunc(sd, pb_ad);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyBookingInsertNotify(sd, pb_ad);
+ }
+ if( HPMHooks.count.HP_clif_PartyBookingInsertNotify_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingInsertNotify_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyBookingInsertNotify_post[hIndex].func;
+ postHookFunc(sd, pb_ad);
+ }
+ }
+ return;
+}
+void HP_clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyRecruitRegisterAck_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitRegisterAck_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyRecruitRegisterAck_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyRecruitRegisterAck(sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_PartyRecruitRegisterAck_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitRegisterAck_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyRecruitRegisterAck_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_PartyRecruitDeleteAck(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyRecruitDeleteAck_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteAck_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyRecruitDeleteAck_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyRecruitDeleteAck(sd, flag);
+ }
+ if( HPMHooks.count.HP_clif_PartyRecruitDeleteAck_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteAck_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyRecruitDeleteAck_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+void HP_clif_PartyRecruitSearchAck(int fd, struct party_booking_ad_info **results, int count, bool more_result) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyRecruitSearchAck_pre ) {
+ void (*preHookFunc) (int *fd, struct party_booking_ad_info **results, int *count, bool *more_result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitSearchAck_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyRecruitSearchAck_pre[hIndex].func;
+ preHookFunc(&fd, results, &count, &more_result);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyRecruitSearchAck(fd, results, count, more_result);
+ }
+ if( HPMHooks.count.HP_clif_PartyRecruitSearchAck_post ) {
+ void (*postHookFunc) (int *fd, struct party_booking_ad_info **results, int *count, bool *more_result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitSearchAck_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyRecruitSearchAck_post[hIndex].func;
+ postHookFunc(&fd, results, &count, &more_result);
+ }
+ }
+ return;
+}
+void HP_clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_booking_ad_info *pb_ad) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyRecruitUpdateNotify_pre[hIndex].func;
+ preHookFunc(sd, pb_ad);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyRecruitUpdateNotify(sd, pb_ad);
+ }
+ if( HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyRecruitUpdateNotify_post[hIndex].func;
+ postHookFunc(sd, pb_ad);
+ }
+ }
+ return;
+}
+void HP_clif_PartyRecruitDeleteNotify(struct map_session_data *sd, int index) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyRecruitDeleteNotify_pre[hIndex].func;
+ preHookFunc(sd, &index);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyRecruitDeleteNotify(sd, index);
+ }
+ if( HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyRecruitDeleteNotify_post[hIndex].func;
+ postHookFunc(sd, &index);
+ }
+ }
+ return;
+}
+void HP_clif_PartyRecruitInsertNotify(struct map_session_data *sd, struct party_booking_ad_info *pb_ad) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyRecruitInsertNotify_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitInsertNotify_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyRecruitInsertNotify_pre[hIndex].func;
+ preHookFunc(sd, pb_ad);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyRecruitInsertNotify(sd, pb_ad);
+ }
+ if( HPMHooks.count.HP_clif_PartyRecruitInsertNotify_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitInsertNotify_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyRecruitInsertNotify_post[hIndex].func;
+ postHookFunc(sd, pb_ad);
+ }
+ }
+ return;
+}
+void HP_clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_pre ) {
+ void (*preHookFunc) (int *index, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyBookingVolunteerInfo_pre[hIndex].func;
+ preHookFunc(&index, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyBookingVolunteerInfo(index, sd);
+ }
+ if( HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_post ) {
+ void (*postHookFunc) (int *index, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyBookingVolunteerInfo_post[hIndex].func;
+ postHookFunc(&index, sd);
+ }
+ }
+ return;
+}
+void HP_clif_PartyBookingRefuseVolunteer(unsigned long 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);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyBookingRefuseVolunteer_pre[hIndex].func;
+ preHookFunc(&aid, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyBookingRefuseVolunteer(aid, sd);
+ }
+ if( HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_post ) {
+ void (*postHookFunc) (unsigned long *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);
+ }
+ }
+ return;
+}
+void HP_clif_PartyBookingCancelVolunteer(int index, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_pre ) {
+ void (*preHookFunc) (int *index, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyBookingCancelVolunteer_pre[hIndex].func;
+ preHookFunc(&index, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyBookingCancelVolunteer(index, sd);
+ }
+ if( HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_post ) {
+ void (*postHookFunc) (int *index, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyBookingCancelVolunteer_post[hIndex].func;
+ postHookFunc(&index, sd);
+ }
+ }
+ return;
+}
+void HP_clif_PartyBookingAddFilteringList(int index, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyBookingAddFilteringList_pre ) {
+ void (*preHookFunc) (int *index, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingAddFilteringList_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyBookingAddFilteringList_pre[hIndex].func;
+ preHookFunc(&index, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyBookingAddFilteringList(index, sd);
+ }
+ if( HPMHooks.count.HP_clif_PartyBookingAddFilteringList_post ) {
+ void (*postHookFunc) (int *index, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingAddFilteringList_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyBookingAddFilteringList_post[hIndex].func;
+ postHookFunc(&index, sd);
+ }
+ }
+ return;
+}
+void HP_clif_PartyBookingSubFilteringList(int gid, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_PartyBookingSubFilteringList_pre ) {
+ void (*preHookFunc) (int *gid, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSubFilteringList_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_PartyBookingSubFilteringList_pre[hIndex].func;
+ preHookFunc(&gid, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.PartyBookingSubFilteringList(gid, sd);
+ }
+ if( HPMHooks.count.HP_clif_PartyBookingSubFilteringList_post ) {
+ void (*postHookFunc) (int *gid, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSubFilteringList_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_PartyBookingSubFilteringList_post[hIndex].func;
+ postHookFunc(&gid, sd);
+ }
+ }
+ return;
+}
+void HP_clif_buyingstore_open(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_buyingstore_open_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_buyingstore_open_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.buyingstore_open(sd);
+ }
+ if( HPMHooks.count.HP_clif_buyingstore_open_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_buyingstore_open_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_buyingstore_open_failed(struct map_session_data *sd, unsigned short result, unsigned int weight) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_buyingstore_open_failed_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned short *result, unsigned int *weight);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_failed_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_buyingstore_open_failed_pre[hIndex].func;
+ preHookFunc(sd, &result, &weight);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.buyingstore_open_failed(sd, result, weight);
+ }
+ if( HPMHooks.count.HP_clif_buyingstore_open_failed_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned short *result, unsigned int *weight);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_failed_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_buyingstore_open_failed_post[hIndex].func;
+ postHookFunc(sd, &result, &weight);
+ }
+ }
+ return;
+}
+void HP_clif_buyingstore_myitemlist(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_buyingstore_myitemlist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_myitemlist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_buyingstore_myitemlist_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.buyingstore_myitemlist(sd);
+ }
+ if( HPMHooks.count.HP_clif_buyingstore_myitemlist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_myitemlist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_buyingstore_myitemlist_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_buyingstore_entry(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_buyingstore_entry_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_buyingstore_entry_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.buyingstore_entry(sd);
+ }
+ if( HPMHooks.count.HP_clif_buyingstore_entry_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_buyingstore_entry_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_buyingstore_entry_single(struct map_session_data *sd, struct map_session_data *pl_sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_buyingstore_entry_single_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_single_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_buyingstore_entry_single_pre[hIndex].func;
+ preHookFunc(sd, pl_sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.buyingstore_entry_single(sd, pl_sd);
+ }
+ if( HPMHooks.count.HP_clif_buyingstore_entry_single_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_single_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_buyingstore_entry_single_post[hIndex].func;
+ postHookFunc(sd, pl_sd);
+ }
+ }
+ return;
+}
+void HP_clif_buyingstore_disappear_entry(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_buyingstore_disappear_entry_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.buyingstore_disappear_entry(sd);
+ }
+ if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_buyingstore_disappear_entry_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_buyingstore_disappear_entry_single(struct map_session_data *sd, struct map_session_data *pl_sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_buyingstore_disappear_entry_single_pre[hIndex].func;
+ preHookFunc(sd, pl_sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.buyingstore_disappear_entry_single(sd, pl_sd);
+ }
+ if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_buyingstore_disappear_entry_single_post[hIndex].func;
+ postHookFunc(sd, pl_sd);
+ }
+ }
+ return;
+}
+void HP_clif_buyingstore_itemlist(struct map_session_data *sd, struct map_session_data *pl_sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_buyingstore_itemlist_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_itemlist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_buyingstore_itemlist_pre[hIndex].func;
+ preHookFunc(sd, pl_sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.buyingstore_itemlist(sd, pl_sd);
+ }
+ if( HPMHooks.count.HP_clif_buyingstore_itemlist_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *pl_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_itemlist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_buyingstore_itemlist_post[hIndex].func;
+ postHookFunc(sd, pl_sd);
+ }
+ }
+ return;
+}
+void HP_clif_buyingstore_trade_failed_buyer(struct map_session_data *sd, short result) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_buyingstore_trade_failed_buyer_pre[hIndex].func;
+ preHookFunc(sd, &result);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.buyingstore_trade_failed_buyer(sd, result);
+ }
+ if( HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *result);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_buyingstore_trade_failed_buyer_post[hIndex].func;
+ postHookFunc(sd, &result);
+ }
+ }
+ return;
+}
+void HP_clif_buyingstore_update_item(struct map_session_data *sd, unsigned short nameid, unsigned short amount) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_buyingstore_update_item_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid, unsigned short *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_update_item_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_buyingstore_update_item_pre[hIndex].func;
+ preHookFunc(sd, &nameid, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.buyingstore_update_item(sd, nameid, amount);
+ }
+ if( HPMHooks.count.HP_clif_buyingstore_update_item_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned short *nameid, unsigned short *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_update_item_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_buyingstore_update_item_post[hIndex].func;
+ postHookFunc(sd, &nameid, &amount);
+ }
+ }
+ return;
+}
+void HP_clif_buyingstore_delete_item(struct map_session_data *sd, short index, unsigned short amount, int price) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_buyingstore_delete_item_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *index, unsigned short *amount, int *price);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_delete_item_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_buyingstore_delete_item_pre[hIndex].func;
+ preHookFunc(sd, &index, &amount, &price);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.buyingstore_delete_item(sd, index, amount, price);
+ }
+ if( HPMHooks.count.HP_clif_buyingstore_delete_item_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *index, unsigned short *amount, int *price);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_delete_item_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_buyingstore_delete_item_post[hIndex].func;
+ postHookFunc(sd, &index, &amount, &price);
+ }
+ }
+ return;
+}
+void HP_clif_buyingstore_trade_failed_seller(struct map_session_data *sd, short result, unsigned short nameid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *result, unsigned short *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_buyingstore_trade_failed_seller_pre[hIndex].func;
+ preHookFunc(sd, &result, &nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.buyingstore_trade_failed_seller(sd, result, nameid);
+ }
+ if( HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *result, unsigned short *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_buyingstore_trade_failed_seller_post[hIndex].func;
+ postHookFunc(sd, &result, &nameid);
+ }
+ }
+ return;
+}
+void HP_clif_search_store_info_ack(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_search_store_info_ack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_search_store_info_ack_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.search_store_info_ack(sd);
+ }
+ if( HPMHooks.count.HP_clif_search_store_info_ack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_search_store_info_ack_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_search_store_info_failed(struct map_session_data *sd, unsigned char reason) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_search_store_info_failed_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned char *reason);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_failed_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_search_store_info_failed_pre[hIndex].func;
+ preHookFunc(sd, &reason);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.search_store_info_failed(sd, reason);
+ }
+ if( HPMHooks.count.HP_clif_search_store_info_failed_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned char *reason);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_failed_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_search_store_info_failed_post[hIndex].func;
+ postHookFunc(sd, &reason);
+ }
+ }
+ return;
+}
+void HP_clif_open_search_store_info(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_open_search_store_info_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_search_store_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_open_search_store_info_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.open_search_store_info(sd);
+ }
+ if( HPMHooks.count.HP_clif_open_search_store_info_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_search_store_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_open_search_store_info_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_search_store_info_click_ack(struct map_session_data *sd, short x, short y) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_search_store_info_click_ack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *x, short *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_click_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_search_store_info_click_ack_pre[hIndex].func;
+ preHookFunc(sd, &x, &y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.search_store_info_click_ack(sd, x, y);
+ }
+ if( HPMHooks.count.HP_clif_search_store_info_click_ack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *x, short *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_click_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_search_store_info_click_ack_post[hIndex].func;
+ postHookFunc(sd, &x, &y);
+ }
+ }
+ return;
+}
+void HP_clif_elemental_info(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_elemental_info_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_elemental_info_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.elemental_info(sd);
+ }
+ if( HPMHooks.count.HP_clif_elemental_info_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_elemental_info_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_elemental_updatestatus(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_elemental_updatestatus_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_updatestatus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_elemental_updatestatus_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.elemental_updatestatus(sd, type);
+ }
+ if( HPMHooks.count.HP_clif_elemental_updatestatus_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_updatestatus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_elemental_updatestatus_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_bgqueue_ack(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK response, unsigned char arena_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_bgqueue_ack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK *response, unsigned char *arena_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_bgqueue_ack_pre[hIndex].func;
+ preHookFunc(sd, &response, &arena_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.bgqueue_ack(sd, response, arena_id);
+ }
+ if( HPMHooks.count.HP_clif_bgqueue_ack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK *response, unsigned char *arena_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_bgqueue_ack_post[hIndex].func;
+ postHookFunc(sd, &response, &arena_id);
+ }
+ }
+ return;
+}
+void HP_clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED response, char *name) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_bgqueue_notice_delete_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED *response, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_notice_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_bgqueue_notice_delete_pre[hIndex].func;
+ preHookFunc(sd, &response, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.bgqueue_notice_delete(sd, response, name);
+ }
+ if( HPMHooks.count.HP_clif_bgqueue_notice_delete_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED *response, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_notice_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_bgqueue_notice_delete_post[hIndex].func;
+ postHookFunc(sd, &response, name);
+ }
+ }
+ return;
+}
+void HP_clif_bgqueue_update_info(struct map_session_data *sd, unsigned char arena_id, int position) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_bgqueue_update_info_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned char *arena_id, int *position);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_update_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_bgqueue_update_info_pre[hIndex].func;
+ preHookFunc(sd, &arena_id, &position);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.bgqueue_update_info(sd, arena_id, position);
+ }
+ if( HPMHooks.count.HP_clif_bgqueue_update_info_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned char *arena_id, int *position);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_update_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_bgqueue_update_info_post[hIndex].func;
+ postHookFunc(sd, &arena_id, &position);
+ }
+ }
+ return;
+}
+void HP_clif_bgqueue_joined(struct map_session_data *sd, int pos) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_bgqueue_joined_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_joined_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_bgqueue_joined_pre[hIndex].func;
+ preHookFunc(sd, &pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.bgqueue_joined(sd, pos);
+ }
+ if( HPMHooks.count.HP_clif_bgqueue_joined_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_joined_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_bgqueue_joined_post[hIndex].func;
+ postHookFunc(sd, &pos);
+ }
+ }
+ return;
+}
+void HP_clif_bgqueue_pcleft(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_bgqueue_pcleft_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_pcleft_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_bgqueue_pcleft_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.bgqueue_pcleft(sd);
+ }
+ if( HPMHooks.count.HP_clif_bgqueue_pcleft_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_pcleft_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_bgqueue_pcleft_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_bgqueue_battlebegins(struct map_session_data *sd, unsigned char arena_id, enum send_target target) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_bgqueue_battlebegins_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned char *arena_id, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_battlebegins_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_bgqueue_battlebegins_pre[hIndex].func;
+ preHookFunc(sd, &arena_id, &target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.bgqueue_battlebegins(sd, arena_id, target);
+ }
+ if( HPMHooks.count.HP_clif_bgqueue_battlebegins_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned char *arena_id, enum send_target *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_battlebegins_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_bgqueue_battlebegins_post[hIndex].func;
+ postHookFunc(sd, &arena_id, &target);
+ }
+ }
+ return;
+}
+void HP_clif_adopt_reply(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_adopt_reply_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_reply_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_adopt_reply_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.adopt_reply(sd, type);
+ }
+ if( HPMHooks.count.HP_clif_adopt_reply_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_reply_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_adopt_reply_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+void HP_clif_adopt_request(struct map_session_data *sd, struct map_session_data *src, int p_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_adopt_request_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *src, int *p_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_request_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_adopt_request_pre[hIndex].func;
+ preHookFunc(sd, src, &p_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.adopt_request(sd, src, p_id);
+ }
+ if( HPMHooks.count.HP_clif_adopt_request_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *src, int *p_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_request_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_adopt_request_post[hIndex].func;
+ postHookFunc(sd, src, &p_id);
+ }
+ }
+ return;
+}
+void HP_clif_readbook(int fd, int book_id, int page) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_readbook_pre ) {
+ void (*preHookFunc) (int *fd, int *book_id, int *page);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_readbook_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_readbook_pre[hIndex].func;
+ preHookFunc(&fd, &book_id, &page);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.readbook(fd, book_id, page);
+ }
+ if( HPMHooks.count.HP_clif_readbook_post ) {
+ void (*postHookFunc) (int *fd, int *book_id, int *page);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_readbook_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_readbook_post[hIndex].func;
+ postHookFunc(&fd, &book_id, &page);
+ }
+ }
+ return;
+}
+void HP_clif_notify_time(struct map_session_data *sd, unsigned long time) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_notify_time_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned long *time);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_time_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_notify_time_pre[hIndex].func;
+ preHookFunc(sd, &time);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.notify_time(sd, time);
+ }
+ if( HPMHooks.count.HP_clif_notify_time_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned long *time);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_time_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_notify_time_post[hIndex].func;
+ postHookFunc(sd, &time);
+ }
+ }
+ return;
+}
+void HP_clif_user_count(struct map_session_data *sd, int count) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_user_count_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_user_count_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_user_count_pre[hIndex].func;
+ preHookFunc(sd, &count);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.user_count(sd, count);
+ }
+ if( HPMHooks.count.HP_clif_user_count_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_user_count_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_user_count_post[hIndex].func;
+ postHookFunc(sd, &count);
+ }
+ }
+ return;
+}
+void HP_clif_noask_sub(struct map_session_data *src, struct map_session_data *target, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_noask_sub_pre ) {
+ void (*preHookFunc) (struct map_session_data *src, struct map_session_data *target, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_noask_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_noask_sub_pre[hIndex].func;
+ preHookFunc(src, target, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.noask_sub(src, target, type);
+ }
+ if( HPMHooks.count.HP_clif_noask_sub_post ) {
+ void (*postHookFunc) (struct map_session_data *src, struct map_session_data *target, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_noask_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_noask_sub_post[hIndex].func;
+ postHookFunc(src, target, &type);
+ }
+ }
+ return;
+}
+void HP_clif_bc_ready(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_bc_ready_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bc_ready_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_bc_ready_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.bc_ready();
+ }
+ if( HPMHooks.count.HP_clif_bc_ready_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bc_ready_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_bc_ready_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_clif_undisguise_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_clif_undisguise_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_undisguise_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.clif.undisguise_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_clif_undisguise_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_undisguise_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_clif_chsys_create(struct hChSysCh *channel, char *name, char *pass, unsigned char color) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_chsys_create_pre ) {
+ void (*preHookFunc) (struct hChSysCh *channel, char *name, char *pass, unsigned char *color);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_chsys_create_pre[hIndex].func;
+ preHookFunc(channel, name, pass, &color);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chsys_create(channel, name, pass, color);
+ }
+ if( HPMHooks.count.HP_clif_chsys_create_post ) {
+ void (*postHookFunc) (struct hChSysCh *channel, char *name, char *pass, unsigned char *color);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_chsys_create_post[hIndex].func;
+ postHookFunc(channel, name, pass, &color);
+ }
+ }
+ return;
+}
+void HP_clif_chsys_msg(struct hChSysCh *channel, struct map_session_data *sd, char *msg) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_chsys_msg_pre ) {
+ void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_msg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_chsys_msg_pre[hIndex].func;
+ preHookFunc(channel, sd, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chsys_msg(channel, sd, msg);
+ }
+ if( HPMHooks.count.HP_clif_chsys_msg_post ) {
+ void (*postHookFunc) (struct hChSysCh *channel, struct map_session_data *sd, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_msg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_chsys_msg_post[hIndex].func;
+ postHookFunc(channel, sd, msg);
+ }
+ }
+ return;
+}
+void HP_clif_chsys_msg2(struct hChSysCh *channel, char *msg) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_chsys_msg2_pre ) {
+ void (*preHookFunc) (struct hChSysCh *channel, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_msg2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_chsys_msg2_pre[hIndex].func;
+ preHookFunc(channel, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chsys_msg2(channel, msg);
+ }
+ if( HPMHooks.count.HP_clif_chsys_msg2_post ) {
+ void (*postHookFunc) (struct hChSysCh *channel, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_msg2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_chsys_msg2_post[hIndex].func;
+ postHookFunc(channel, msg);
+ }
+ }
+ return;
+}
+void HP_clif_chsys_send(struct hChSysCh *channel, struct map_session_data *sd, const char *msg) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_chsys_send_pre ) {
+ void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd, const char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_send_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_chsys_send_pre[hIndex].func;
+ preHookFunc(channel, sd, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chsys_send(channel, sd, msg);
+ }
+ if( HPMHooks.count.HP_clif_chsys_send_post ) {
+ void (*postHookFunc) (struct hChSysCh *channel, struct map_session_data *sd, const char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_send_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_chsys_send_post[hIndex].func;
+ postHookFunc(channel, sd, msg);
+ }
+ }
+ return;
+}
+void HP_clif_chsys_join(struct hChSysCh *channel, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_chsys_join_pre ) {
+ void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_join_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_chsys_join_pre[hIndex].func;
+ preHookFunc(channel, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chsys_join(channel, sd);
+ }
+ if( HPMHooks.count.HP_clif_chsys_join_post ) {
+ void (*postHookFunc) (struct hChSysCh *channel, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_join_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_chsys_join_post[hIndex].func;
+ postHookFunc(channel, sd);
+ }
+ }
+ return;
+}
+void HP_clif_chsys_left(struct hChSysCh *channel, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_chsys_left_pre ) {
+ void (*preHookFunc) (struct hChSysCh *channel, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_left_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_chsys_left_pre[hIndex].func;
+ preHookFunc(channel, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chsys_left(channel, sd);
+ }
+ if( HPMHooks.count.HP_clif_chsys_left_post ) {
+ void (*postHookFunc) (struct hChSysCh *channel, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_left_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_chsys_left_post[hIndex].func;
+ postHookFunc(channel, sd);
+ }
+ }
+ return;
+}
+void HP_clif_chsys_delete(struct hChSysCh *channel) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_chsys_delete_pre ) {
+ void (*preHookFunc) (struct hChSysCh *channel);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_chsys_delete_pre[hIndex].func;
+ preHookFunc(channel);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chsys_delete(channel);
+ }
+ if( HPMHooks.count.HP_clif_chsys_delete_post ) {
+ void (*postHookFunc) (struct hChSysCh *channel);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_chsys_delete_post[hIndex].func;
+ postHookFunc(channel);
+ }
+ }
+ return;
+}
+void HP_clif_chsys_mjoin(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_chsys_mjoin_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_mjoin_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_chsys_mjoin_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chsys_mjoin(sd);
+ }
+ if( HPMHooks.count.HP_clif_chsys_mjoin_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_mjoin_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_chsys_mjoin_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_chsys_quit(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_chsys_quit_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_quit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_chsys_quit_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chsys_quit(sd);
+ }
+ if( HPMHooks.count.HP_clif_chsys_quit_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_quit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_chsys_quit_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_chsys_quitg(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_chsys_quitg_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_quitg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_chsys_quitg_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chsys_quitg(sd);
+ }
+ if( HPMHooks.count.HP_clif_chsys_quitg_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_quitg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_chsys_quitg_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_clif_chsys_gjoin(struct guild *g1, struct guild *g2) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_chsys_gjoin_pre ) {
+ void (*preHookFunc) (struct guild *g1, struct guild *g2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_gjoin_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_chsys_gjoin_pre[hIndex].func;
+ preHookFunc(g1, g2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chsys_gjoin(g1, g2);
+ }
+ if( HPMHooks.count.HP_clif_chsys_gjoin_post ) {
+ void (*postHookFunc) (struct guild *g1, struct guild *g2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_gjoin_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_chsys_gjoin_post[hIndex].func;
+ postHookFunc(g1, g2);
+ }
+ }
+ return;
+}
+void HP_clif_chsys_gleave(struct guild *g1, struct guild *g2) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_chsys_gleave_pre ) {
+ void (*preHookFunc) (struct guild *g1, struct guild *g2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_gleave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_chsys_gleave_pre[hIndex].func;
+ preHookFunc(g1, g2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chsys_gleave(g1, g2);
+ }
+ if( HPMHooks.count.HP_clif_chsys_gleave_post ) {
+ void (*postHookFunc) (struct guild *g1, struct guild *g2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chsys_gleave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_chsys_gleave_post[hIndex].func;
+ postHookFunc(g1, g2);
+ }
+ }
+ return;
+}
+void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pWantToConnection_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWantToConnection_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pWantToConnection_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pWantToConnection(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pWantToConnection_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWantToConnection_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pWantToConnection_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pLoadEndAck(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pLoadEndAck_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLoadEndAck_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pLoadEndAck_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pLoadEndAck(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pLoadEndAck_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLoadEndAck_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pLoadEndAck_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pTickSend(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pTickSend_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTickSend_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pTickSend_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pTickSend(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pTickSend_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTickSend_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pTickSend_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pHotkey(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pHotkey_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pHotkey_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pHotkey(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pHotkey_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pHotkey_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pProgressbar(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pProgressbar_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProgressbar_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pProgressbar_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pProgressbar(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pProgressbar_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProgressbar_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pProgressbar_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pWalkToXY(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pWalkToXY_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWalkToXY_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pWalkToXY_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pWalkToXY(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pWalkToXY_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWalkToXY_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pWalkToXY_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pQuitGame(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pQuitGame_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pQuitGame_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pQuitGame_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pQuitGame(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pQuitGame_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pQuitGame_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pQuitGame_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGetCharNameRequest(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGetCharNameRequest_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetCharNameRequest_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGetCharNameRequest_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGetCharNameRequest(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGetCharNameRequest_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetCharNameRequest_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGetCharNameRequest_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGlobalMessage(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGlobalMessage_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGlobalMessage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGlobalMessage_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGlobalMessage(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGlobalMessage_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGlobalMessage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGlobalMessage_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pMapMove(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pMapMove_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMapMove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pMapMove_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pMapMove(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pMapMove_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMapMove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pMapMove_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pChangeDir(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pChangeDir_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDir_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pChangeDir_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pChangeDir(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pChangeDir_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDir_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pChangeDir_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pEmotion(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pEmotion_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEmotion_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pEmotion_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pEmotion(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pEmotion_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEmotion_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pEmotion_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pHowManyConnections(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pHowManyConnections_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHowManyConnections_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pHowManyConnections_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pHowManyConnections(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pHowManyConnections_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHowManyConnections_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pHowManyConnections_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pActionRequest(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pActionRequest_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pActionRequest_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pActionRequest(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pActionRequest_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pActionRequest_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, unsigned int tick) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pActionRequest_sub_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *action_type, int *target_id, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pActionRequest_sub_pre[hIndex].func;
+ preHookFunc(sd, &action_type, &target_id, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pActionRequest_sub(sd, action_type, target_id, tick);
+ }
+ if( HPMHooks.count.HP_clif_pActionRequest_sub_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *action_type, int *target_id, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pActionRequest_sub_post[hIndex].func;
+ postHookFunc(sd, &action_type, &target_id, &tick);
+ }
+ }
+ return;
+}
+void HP_clif_pRestart(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pRestart_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRestart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pRestart_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pRestart(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pRestart_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRestart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pRestart_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pWisMessage(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pWisMessage_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWisMessage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pWisMessage_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pWisMessage(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pWisMessage_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWisMessage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pWisMessage_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pBroadcast(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pBroadcast_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBroadcast_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pBroadcast_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pBroadcast(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pBroadcast_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBroadcast_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pBroadcast_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pTakeItem(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pTakeItem_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTakeItem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pTakeItem_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pTakeItem(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pTakeItem_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTakeItem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pTakeItem_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pDropItem(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pDropItem_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDropItem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pDropItem_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pDropItem(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pDropItem_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDropItem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pDropItem_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pUseItem(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pUseItem_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseItem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pUseItem_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pUseItem(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pUseItem_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseItem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pUseItem_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pEquipItem(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pEquipItem_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipItem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pEquipItem_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pEquipItem(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pEquipItem_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipItem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pEquipItem_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pUnequipItem(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pUnequipItem_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUnequipItem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pUnequipItem_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pUnequipItem(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pUnequipItem_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUnequipItem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pUnequipItem_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pNpcClicked(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pNpcClicked_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcClicked_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pNpcClicked_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pNpcClicked(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pNpcClicked_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcClicked_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pNpcClicked_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pNpcBuySellSelected(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pNpcBuySellSelected_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuySellSelected_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pNpcBuySellSelected_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pNpcBuySellSelected(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pNpcBuySellSelected_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuySellSelected_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pNpcBuySellSelected_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pNpcBuyListSend(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pNpcBuyListSend_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuyListSend_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pNpcBuyListSend_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pNpcBuyListSend(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pNpcBuyListSend_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuyListSend_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pNpcBuyListSend_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pNpcSellListSend(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pNpcSellListSend_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSellListSend_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pNpcSellListSend_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pNpcSellListSend(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pNpcSellListSend_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSellListSend_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pNpcSellListSend_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCreateChatRoom(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCreateChatRoom_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateChatRoom_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCreateChatRoom_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCreateChatRoom(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCreateChatRoom_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateChatRoom_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCreateChatRoom_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pChatAddMember(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pChatAddMember_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatAddMember_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pChatAddMember_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pChatAddMember(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pChatAddMember_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatAddMember_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pChatAddMember_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pChatRoomStatusChange(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pChatRoomStatusChange_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatRoomStatusChange_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pChatRoomStatusChange_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pChatRoomStatusChange(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pChatRoomStatusChange_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatRoomStatusChange_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pChatRoomStatusChange_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pChangeChatOwner(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pChangeChatOwner_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeChatOwner_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pChangeChatOwner_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pChangeChatOwner(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pChangeChatOwner_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeChatOwner_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pChangeChatOwner_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pKickFromChat(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pKickFromChat_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pKickFromChat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pKickFromChat_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pKickFromChat(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pKickFromChat_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pKickFromChat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pKickFromChat_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pChatLeave(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pChatLeave_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatLeave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pChatLeave_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pChatLeave(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pChatLeave_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatLeave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pChatLeave_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pTradeRequest(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pTradeRequest_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeRequest_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pTradeRequest_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pTradeRequest(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pTradeRequest_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeRequest_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pTradeRequest_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_chann_config_read(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_chann_config_read_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chann_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_chann_config_read_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.chann_config_read();
+ }
+ if( HPMHooks.count.HP_clif_chann_config_read_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_chann_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_chann_config_read_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_clif_pTradeAck(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pTradeAck_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAck_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pTradeAck_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pTradeAck(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pTradeAck_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAck_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pTradeAck_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pTradeAddItem(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pTradeAddItem_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAddItem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pTradeAddItem_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pTradeAddItem(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pTradeAddItem_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAddItem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pTradeAddItem_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pTradeOk(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pTradeOk_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeOk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pTradeOk_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pTradeOk(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pTradeOk_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeOk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pTradeOk_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pTradeCancel(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pTradeCancel_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCancel_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pTradeCancel_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pTradeCancel(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pTradeCancel_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCancel_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pTradeCancel_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pTradeCommit(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pTradeCommit_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCommit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pTradeCommit_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pTradeCommit(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pTradeCommit_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCommit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pTradeCommit_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pStopAttack(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pStopAttack_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopAttack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pStopAttack_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pStopAttack(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pStopAttack_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopAttack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pStopAttack_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPutItemToCart(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPutItemToCart_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPutItemToCart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPutItemToCart_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPutItemToCart(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPutItemToCart_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPutItemToCart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPutItemToCart_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGetItemFromCart(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGetItemFromCart_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetItemFromCart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGetItemFromCart_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGetItemFromCart(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGetItemFromCart_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetItemFromCart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGetItemFromCart_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pRemoveOption(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pRemoveOption_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemoveOption_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pRemoveOption_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pRemoveOption(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pRemoveOption_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemoveOption_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pRemoveOption_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pChangeCart(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pChangeCart_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeCart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pChangeCart_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pChangeCart(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pChangeCart_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeCart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pChangeCart_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pStatusUp(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pStatusUp_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStatusUp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pStatusUp_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pStatusUp(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pStatusUp_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStatusUp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pStatusUp_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pSkillUp(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pSkillUp_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillUp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pSkillUp_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pSkillUp(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pSkillUp_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillUp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pSkillUp_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pUseSkillToId(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pUseSkillToId_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pUseSkillToId(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pUseSkillToId_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pUseSkillToId_homun(struct homun_data *hd, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, int target_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pUseSkillToId_homun_pre ) {
+ void (*preHookFunc) (struct homun_data *hd, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_homun_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_homun_pre[hIndex].func;
+ preHookFunc(hd, sd, &tick, &skill_id, &skill_lv, &target_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pUseSkillToId_homun(hd, sd, tick, skill_id, skill_lv, target_id);
+ }
+ if( HPMHooks.count.HP_clif_pUseSkillToId_homun_post ) {
+ void (*postHookFunc) (struct homun_data *hd, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_homun_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_homun_post[hIndex].func;
+ postHookFunc(hd, sd, &tick, &skill_id, &skill_lv, &target_id);
+ }
+ }
+ return;
+}
+void HP_clif_pUseSkillToId_mercenary(struct mercenary_data *md, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, int target_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pUseSkillToId_mercenary_pre ) {
+ void (*preHookFunc) (struct mercenary_data *md, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_mercenary_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_mercenary_pre[hIndex].func;
+ preHookFunc(md, sd, &tick, &skill_id, &skill_lv, &target_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pUseSkillToId_mercenary(md, sd, tick, skill_id, skill_lv, target_id);
+ }
+ if( HPMHooks.count.HP_clif_pUseSkillToId_mercenary_post ) {
+ void (*postHookFunc) (struct mercenary_data *md, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_mercenary_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_mercenary_post[hIndex].func;
+ postHookFunc(md, sd, &tick, &skill_id, &skill_lv, &target_id);
+ }
+ }
+ return;
+}
+void HP_clif_pUseSkillToPos(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pUseSkillToPos_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pUseSkillToPos(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pUseSkillToPos_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pUseSkillToPosSub(int fd, struct map_session_data *sd, uint16 skill_lv, uint16 skill_id, short x, short y, int skillmoreinfo) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pUseSkillToPosSub_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd, uint16 *skill_lv, uint16 *skill_id, short *x, short *y, int *skillmoreinfo);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosSub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPosSub_pre[hIndex].func;
+ preHookFunc(&fd, sd, &skill_lv, &skill_id, &x, &y, &skillmoreinfo);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pUseSkillToPosSub(fd, sd, skill_lv, skill_id, x, y, skillmoreinfo);
+ }
+ if( HPMHooks.count.HP_clif_pUseSkillToPosSub_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd, uint16 *skill_lv, uint16 *skill_id, short *x, short *y, int *skillmoreinfo);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosSub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pUseSkillToPosSub_post[hIndex].func;
+ postHookFunc(&fd, sd, &skill_lv, &skill_id, &x, &y, &skillmoreinfo);
+ }
+ }
+ return;
+}
+void HP_clif_pUseSkillToPos_homun(struct homun_data *hd, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pUseSkillToPos_homun_pre ) {
+ void (*preHookFunc) (struct homun_data *hd, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_homun_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_homun_pre[hIndex].func;
+ preHookFunc(hd, sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pUseSkillToPos_homun(hd, sd, tick, skill_id, skill_lv, x, y, skillmoreinfo);
+ }
+ if( HPMHooks.count.HP_clif_pUseSkillToPos_homun_post ) {
+ void (*postHookFunc) (struct homun_data *hd, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_homun_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_homun_post[hIndex].func;
+ postHookFunc(hd, sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo);
+ }
+ }
+ return;
+}
+void HP_clif_pUseSkillToPos_mercenary(struct mercenary_data *md, struct map_session_data *sd, unsigned int tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_pre ) {
+ void (*preHookFunc) (struct mercenary_data *md, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_mercenary_pre[hIndex].func;
+ preHookFunc(md, sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pUseSkillToPos_mercenary(md, sd, tick, skill_id, skill_lv, x, y, skillmoreinfo);
+ }
+ if( HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_post ) {
+ void (*postHookFunc) (struct mercenary_data *md, struct map_session_data *sd, unsigned int *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_mercenary_post[hIndex].func;
+ postHookFunc(md, sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo);
+ }
+ }
+ return;
+}
+void HP_clif_pUseSkillToPosMoreInfo(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPosMoreInfo_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pUseSkillToPosMoreInfo(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pUseSkillToPosMoreInfo_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pUseSkillMap(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pUseSkillMap_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillMap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pUseSkillMap_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pUseSkillMap(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pUseSkillMap_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillMap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pUseSkillMap_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pRequestMemo(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pRequestMemo_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRequestMemo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pRequestMemo_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pRequestMemo(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pRequestMemo_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRequestMemo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pRequestMemo_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pProduceMix(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pProduceMix_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProduceMix_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pProduceMix_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pProduceMix(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pProduceMix_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProduceMix_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pProduceMix_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCooking(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCooking_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCooking_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCooking_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCooking(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCooking_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCooking_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCooking_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pRepairItem(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pRepairItem_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRepairItem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pRepairItem_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pRepairItem(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pRepairItem_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRepairItem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pRepairItem_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pWeaponRefine(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pWeaponRefine_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWeaponRefine_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pWeaponRefine_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pWeaponRefine(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pWeaponRefine_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWeaponRefine_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pWeaponRefine_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pNpcSelectMenu(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pNpcSelectMenu_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSelectMenu_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pNpcSelectMenu_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pNpcSelectMenu(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pNpcSelectMenu_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSelectMenu_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pNpcSelectMenu_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pNpcNextClicked(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pNpcNextClicked_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcNextClicked_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pNpcNextClicked_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pNpcNextClicked(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pNpcNextClicked_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcNextClicked_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pNpcNextClicked_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pNpcAmountInput(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pNpcAmountInput_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcAmountInput_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pNpcAmountInput_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pNpcAmountInput(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pNpcAmountInput_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcAmountInput_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pNpcAmountInput_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pNpcStringInput(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pNpcStringInput_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcStringInput_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pNpcStringInput_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pNpcStringInput(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pNpcStringInput_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcStringInput_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pNpcStringInput_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pNpcCloseClicked(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pNpcCloseClicked_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcCloseClicked_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pNpcCloseClicked_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pNpcCloseClicked(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pNpcCloseClicked_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcCloseClicked_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pNpcCloseClicked_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pItemIdentify(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pItemIdentify_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemIdentify_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pItemIdentify_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pItemIdentify(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pItemIdentify_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemIdentify_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pItemIdentify_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pSelectArrow(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pSelectArrow_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectArrow_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pSelectArrow_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pSelectArrow(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pSelectArrow_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectArrow_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pSelectArrow_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAutoSpell(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pAutoSpell_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoSpell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pAutoSpell_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAutoSpell(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pAutoSpell_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoSpell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pAutoSpell_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pUseCard(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pUseCard_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseCard_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pUseCard_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pUseCard(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pUseCard_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseCard_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pUseCard_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pInsertCard(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pInsertCard_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInsertCard_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pInsertCard_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pInsertCard(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pInsertCard_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInsertCard_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pInsertCard_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pSolveCharName(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pSolveCharName_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSolveCharName_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pSolveCharName_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pSolveCharName(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pSolveCharName_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSolveCharName_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pSolveCharName_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pResetChar(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pResetChar_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetChar_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pResetChar_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pResetChar(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pResetChar_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetChar_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pResetChar_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pLocalBroadcast(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pLocalBroadcast_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLocalBroadcast_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pLocalBroadcast_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pLocalBroadcast(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pLocalBroadcast_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLocalBroadcast_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pLocalBroadcast_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pMoveToKafra(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pMoveToKafra_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafra_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pMoveToKafra_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pMoveToKafra(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pMoveToKafra_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafra_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pMoveToKafra_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pMoveFromKafra(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pMoveFromKafra_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafra_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pMoveFromKafra_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pMoveFromKafra(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pMoveFromKafra_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafra_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pMoveFromKafra_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pMoveToKafraFromCart(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pMoveToKafraFromCart_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafraFromCart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pMoveToKafraFromCart_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pMoveToKafraFromCart(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pMoveToKafraFromCart_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafraFromCart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pMoveToKafraFromCart_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pMoveFromKafraToCart(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pMoveFromKafraToCart_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafraToCart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pMoveFromKafraToCart_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pMoveFromKafraToCart(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pMoveFromKafraToCart_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafraToCart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pMoveFromKafraToCart_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCloseKafra(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCloseKafra_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseKafra_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCloseKafra_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCloseKafra(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCloseKafra_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseKafra_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCloseKafra_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pStoragePassword(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pStoragePassword_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStoragePassword_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pStoragePassword_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pStoragePassword(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pStoragePassword_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStoragePassword_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pStoragePassword_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCreateParty(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCreateParty_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCreateParty_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCreateParty(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCreateParty_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCreateParty_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCreateParty2(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCreateParty2_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCreateParty2_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCreateParty2(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCreateParty2_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCreateParty2_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyInvite(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyInvite_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyInvite_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyInvite(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyInvite_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyInvite_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyInvite2(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyInvite2_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyInvite2_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyInvite2(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyInvite2_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyInvite2_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pReplyPartyInvite(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pReplyPartyInvite_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pReplyPartyInvite_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pReplyPartyInvite(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pReplyPartyInvite_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pReplyPartyInvite_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pReplyPartyInvite2(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pReplyPartyInvite2_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pReplyPartyInvite2_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pReplyPartyInvite2(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pReplyPartyInvite2_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pReplyPartyInvite2_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pLeaveParty(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pLeaveParty_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLeaveParty_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pLeaveParty_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pLeaveParty(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pLeaveParty_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLeaveParty_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pLeaveParty_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pRemovePartyMember(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pRemovePartyMember_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemovePartyMember_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pRemovePartyMember_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pRemovePartyMember(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pRemovePartyMember_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemovePartyMember_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pRemovePartyMember_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyChangeOption(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyChangeOption_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeOption_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyChangeOption_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyChangeOption(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyChangeOption_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeOption_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyChangeOption_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyMessage(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyMessage_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyMessage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyMessage_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyMessage(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyMessage_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyMessage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyMessage_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyChangeLeader(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyChangeLeader_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeLeader_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyChangeLeader_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyChangeLeader(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyChangeLeader_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeLeader_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyChangeLeader_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyBookingRegisterReq(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyBookingRegisterReq_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRegisterReq_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyBookingRegisterReq_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyBookingRegisterReq(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyBookingRegisterReq_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRegisterReq_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyBookingRegisterReq_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyBookingSearchReq(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyBookingSearchReq_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSearchReq_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyBookingSearchReq_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyBookingSearchReq(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyBookingSearchReq_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSearchReq_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyBookingSearchReq_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyBookingDeleteReq(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyBookingDeleteReq_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingDeleteReq_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyBookingDeleteReq_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyBookingDeleteReq(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyBookingDeleteReq_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingDeleteReq_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyBookingDeleteReq_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyBookingUpdateReq(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyBookingUpdateReq_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingUpdateReq_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyBookingUpdateReq_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyBookingUpdateReq(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyBookingUpdateReq_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingUpdateReq_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyBookingUpdateReq_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyRecruitRegisterReq(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyRecruitRegisterReq_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyRecruitRegisterReq(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyRecruitRegisterReq_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyRecruitSearchReq(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyRecruitSearchReq_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitSearchReq_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyRecruitSearchReq_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyRecruitSearchReq(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyRecruitSearchReq_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitSearchReq_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyRecruitSearchReq_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyRecruitDeleteReq(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyRecruitDeleteReq_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyRecruitDeleteReq(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyRecruitDeleteReq_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyRecruitUpdateReq(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyRecruitUpdateReq_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyRecruitUpdateReq(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyRecruitUpdateReq_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCloseVending(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCloseVending_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseVending_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCloseVending_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCloseVending(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCloseVending_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseVending_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCloseVending_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pVendingListReq(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pVendingListReq_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pVendingListReq_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pVendingListReq_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pVendingListReq(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pVendingListReq_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pVendingListReq_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pVendingListReq_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPurchaseReq(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPurchaseReq_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPurchaseReq_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPurchaseReq(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPurchaseReq_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPurchaseReq_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPurchaseReq2(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPurchaseReq2_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPurchaseReq2_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPurchaseReq2(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPurchaseReq2_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPurchaseReq2_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pOpenVending(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pOpenVending_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOpenVending_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pOpenVending_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pOpenVending(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pOpenVending_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOpenVending_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pOpenVending_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCreateGuild(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCreateGuild_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateGuild_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCreateGuild_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCreateGuild(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCreateGuild_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateGuild_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCreateGuild_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildCheckMaster(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildCheckMaster_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCheckMaster_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildCheckMaster_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildCheckMaster(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildCheckMaster_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCheckMaster_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildCheckMaster_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildRequestInfo(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildRequestInfo_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestInfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildRequestInfo_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildRequestInfo(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildRequestInfo_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestInfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildRequestInfo_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildChangePositionInfo(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildChangePositionInfo_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangePositionInfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildChangePositionInfo_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildChangePositionInfo(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildChangePositionInfo_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangePositionInfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildChangePositionInfo_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildChangeMemberPosition(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildChangeMemberPosition_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeMemberPosition_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildChangeMemberPosition_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildChangeMemberPosition(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildChangeMemberPosition_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeMemberPosition_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildChangeMemberPosition_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildRequestEmblem(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildRequestEmblem_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestEmblem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildRequestEmblem_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildRequestEmblem(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildRequestEmblem_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestEmblem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildRequestEmblem_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildChangeEmblem(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildChangeEmblem_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeEmblem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildChangeEmblem_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildChangeEmblem(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildChangeEmblem_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeEmblem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildChangeEmblem_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildChangeNotice(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildChangeNotice_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeNotice_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildChangeNotice_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildChangeNotice(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildChangeNotice_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeNotice_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildChangeNotice_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildInvite(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildInvite_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildInvite_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildInvite(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildInvite_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildInvite_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildReplyInvite(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildReplyInvite_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyInvite_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildReplyInvite_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildReplyInvite(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildReplyInvite_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyInvite_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildReplyInvite_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildLeave(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildLeave_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildLeave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildLeave_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildLeave(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildLeave_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildLeave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildLeave_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildExpulsion(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildExpulsion_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildExpulsion_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildExpulsion_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildExpulsion(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildExpulsion_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildExpulsion_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildExpulsion_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildMessage(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildMessage_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildMessage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildMessage_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildMessage(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildMessage_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildMessage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildMessage_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildRequestAlliance(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildRequestAlliance_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestAlliance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildRequestAlliance_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildRequestAlliance(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildRequestAlliance_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestAlliance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildRequestAlliance_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildReplyAlliance(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildReplyAlliance_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyAlliance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildReplyAlliance_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildReplyAlliance(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildReplyAlliance_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyAlliance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildReplyAlliance_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildDelAlliance(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildDelAlliance_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildDelAlliance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildDelAlliance_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildDelAlliance(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildDelAlliance_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildDelAlliance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildDelAlliance_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildOpposition(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildOpposition_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildOpposition_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildOpposition_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildOpposition(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildOpposition_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildOpposition_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildOpposition_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildBreak(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildBreak_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildBreak_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildBreak_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildBreak(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildBreak_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildBreak_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildBreak_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPetMenu(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPetMenu_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetMenu_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPetMenu_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPetMenu(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPetMenu_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetMenu_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPetMenu_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCatchPet(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCatchPet_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCatchPet_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCatchPet_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCatchPet(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCatchPet_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCatchPet_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCatchPet_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pSelectEgg(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pSelectEgg_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectEgg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pSelectEgg_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pSelectEgg(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pSelectEgg_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectEgg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pSelectEgg_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pSendEmotion(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pSendEmotion_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSendEmotion_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pSendEmotion_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pSendEmotion(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pSendEmotion_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSendEmotion_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pSendEmotion_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pChangePetName(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pChangePetName_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangePetName_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pChangePetName_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pChangePetName(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pChangePetName_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangePetName_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pChangePetName_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGMKick(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGMKick_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGMKick_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGMKick(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGMKick_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGMKick_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGMKickAll(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGMKickAll_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKickAll_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGMKickAll_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGMKickAll(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGMKickAll_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKickAll_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGMKickAll_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGMShift(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGMShift_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMShift_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGMShift_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGMShift(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGMShift_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMShift_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGMShift_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGMRemove2(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGMRemove2_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRemove2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGMRemove2_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGMRemove2(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGMRemove2_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRemove2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGMRemove2_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGMRecall(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGMRecall_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGMRecall_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGMRecall(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGMRecall_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGMRecall_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGMRecall2(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGMRecall2_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGMRecall2_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGMRecall2(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGMRecall2_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGMRecall2_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGM_Monster_Item(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGM_Monster_Item_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGM_Monster_Item_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGM_Monster_Item_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGM_Monster_Item(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGM_Monster_Item_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGM_Monster_Item_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGM_Monster_Item_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGMHide(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGMHide_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMHide_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGMHide_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGMHide(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGMHide_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMHide_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGMHide_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGMReqNoChat(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGMReqNoChat_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqNoChat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGMReqNoChat_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGMReqNoChat(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGMReqNoChat_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqNoChat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGMReqNoChat_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGMRc(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGMRc_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGMRc_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGMRc(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGMRc_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGMRc_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGMReqAccountName(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGMReqAccountName_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqAccountName_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGMReqAccountName_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGMReqAccountName(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGMReqAccountName_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqAccountName_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGMReqAccountName_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGMChangeMapType(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGMChangeMapType_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMChangeMapType_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGMChangeMapType_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGMChangeMapType(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGMChangeMapType_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMChangeMapType_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGMChangeMapType_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPMIgnore(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPMIgnore_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnore_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPMIgnore_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPMIgnore(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPMIgnore_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnore_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPMIgnore_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPMIgnoreAll(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPMIgnoreAll_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreAll_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPMIgnoreAll_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPMIgnoreAll(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPMIgnoreAll_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreAll_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPMIgnoreAll_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPMIgnoreList(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPMIgnoreList_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreList_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPMIgnoreList_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPMIgnoreList(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPMIgnoreList_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreList_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPMIgnoreList_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pNoviceDoriDori(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pNoviceDoriDori_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceDoriDori_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pNoviceDoriDori_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pNoviceDoriDori(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pNoviceDoriDori_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceDoriDori_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pNoviceDoriDori_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pNoviceExplosionSpirits(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pNoviceExplosionSpirits_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceExplosionSpirits_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pNoviceExplosionSpirits_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pNoviceExplosionSpirits(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pNoviceExplosionSpirits_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceExplosionSpirits_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pNoviceExplosionSpirits_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pFriendsListAdd(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pFriendsListAdd_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListAdd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pFriendsListAdd_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pFriendsListAdd(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pFriendsListAdd_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListAdd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pFriendsListAdd_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pFriendsListReply(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pFriendsListReply_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListReply_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pFriendsListReply_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pFriendsListReply(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pFriendsListReply_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListReply_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pFriendsListReply_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pFriendsListRemove(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pFriendsListRemove_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListRemove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pFriendsListRemove_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pFriendsListRemove(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pFriendsListRemove_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListRemove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pFriendsListRemove_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPVPInfo(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPVPInfo_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPVPInfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPVPInfo_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPVPInfo(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPVPInfo_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPVPInfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPVPInfo_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pBlacksmith(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pBlacksmith_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBlacksmith_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pBlacksmith_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pBlacksmith(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pBlacksmith_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBlacksmith_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pBlacksmith_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAlchemist(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pAlchemist_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAlchemist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pAlchemist_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAlchemist(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pAlchemist_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAlchemist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pAlchemist_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pTaekwon(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pTaekwon_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTaekwon_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pTaekwon_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pTaekwon(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pTaekwon_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTaekwon_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pTaekwon_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pRankingPk(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pRankingPk_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRankingPk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pRankingPk_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pRankingPk(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pRankingPk_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRankingPk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pRankingPk_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pFeelSaveOk(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pFeelSaveOk_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFeelSaveOk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pFeelSaveOk_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pFeelSaveOk(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pFeelSaveOk_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFeelSaveOk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pFeelSaveOk_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pChangeHomunculusName(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pChangeHomunculusName_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeHomunculusName_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pChangeHomunculusName_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pChangeHomunculusName(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pChangeHomunculusName_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeHomunculusName_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pChangeHomunculusName_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pHomMoveToMaster(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pHomMoveToMaster_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveToMaster_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pHomMoveToMaster_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pHomMoveToMaster(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pHomMoveToMaster_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveToMaster_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pHomMoveToMaster_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pHomMoveTo(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pHomMoveTo_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveTo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pHomMoveTo_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pHomMoveTo(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pHomMoveTo_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveTo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pHomMoveTo_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pHomAttack(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pHomAttack_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomAttack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pHomAttack_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pHomAttack(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pHomAttack_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomAttack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pHomAttack_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pHomMenu(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pHomMenu_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMenu_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pHomMenu_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pHomMenu(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pHomMenu_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMenu_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pHomMenu_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAutoRevive(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pAutoRevive_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoRevive_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pAutoRevive_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAutoRevive(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pAutoRevive_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoRevive_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pAutoRevive_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCheck(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCheck_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCheck_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCheck_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCheck(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCheck_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCheck_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCheck_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pMail_refreshinbox(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pMail_refreshinbox_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_refreshinbox_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pMail_refreshinbox_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pMail_refreshinbox(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pMail_refreshinbox_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_refreshinbox_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pMail_refreshinbox_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pMail_read(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pMail_read_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pMail_read_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pMail_read(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pMail_read_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pMail_read_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pMail_getattach(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pMail_getattach_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_getattach_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pMail_getattach_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pMail_getattach(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pMail_getattach_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_getattach_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pMail_getattach_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pMail_delete(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pMail_delete_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pMail_delete_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pMail_delete(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pMail_delete_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pMail_delete_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pMail_return(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pMail_return_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_return_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pMail_return_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pMail_return(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pMail_return_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_return_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pMail_return_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pMail_setattach(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pMail_setattach_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_setattach_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pMail_setattach_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pMail_setattach(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pMail_setattach_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_setattach_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pMail_setattach_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pMail_winopen(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pMail_winopen_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_winopen_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pMail_winopen_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pMail_winopen(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pMail_winopen_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_winopen_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pMail_winopen_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pMail_send(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pMail_send_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_send_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pMail_send_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pMail_send(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pMail_send_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_send_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pMail_send_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAuction_cancelreg(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pAuction_cancelreg_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancelreg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pAuction_cancelreg_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAuction_cancelreg(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pAuction_cancelreg_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancelreg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pAuction_cancelreg_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAuction_setitem(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pAuction_setitem_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_setitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pAuction_setitem_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAuction_setitem(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pAuction_setitem_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_setitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pAuction_setitem_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAuction_register(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pAuction_register_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_register_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pAuction_register_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAuction_register(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pAuction_register_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_register_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pAuction_register_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAuction_cancel(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pAuction_cancel_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancel_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pAuction_cancel_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAuction_cancel(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pAuction_cancel_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancel_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pAuction_cancel_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAuction_close(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pAuction_close_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_close_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pAuction_close_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAuction_close(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pAuction_close_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_close_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pAuction_close_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAuction_bid(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pAuction_bid_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_bid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pAuction_bid_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAuction_bid(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pAuction_bid_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_bid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pAuction_bid_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAuction_search(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pAuction_search_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pAuction_search_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAuction_search(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pAuction_search_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pAuction_search_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAuction_buysell(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pAuction_buysell_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_buysell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pAuction_buysell_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAuction_buysell(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pAuction_buysell_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_buysell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pAuction_buysell_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pcashshop_buy(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pcashshop_buy_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcashshop_buy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pcashshop_buy_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pcashshop_buy(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pcashshop_buy_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcashshop_buy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pcashshop_buy_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAdopt_request(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pAdopt_request_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_request_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pAdopt_request_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAdopt_request(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pAdopt_request_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_request_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pAdopt_request_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pAdopt_reply(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pAdopt_reply_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_reply_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pAdopt_reply_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pAdopt_reply(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pAdopt_reply_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_reply_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pAdopt_reply_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pViewPlayerEquip(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pViewPlayerEquip_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pViewPlayerEquip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pViewPlayerEquip_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pViewPlayerEquip(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pViewPlayerEquip_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pViewPlayerEquip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pViewPlayerEquip_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pEquipTick(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pEquipTick_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipTick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pEquipTick_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pEquipTick(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pEquipTick_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipTick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pEquipTick_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pquestStateAck(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pquestStateAck_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pquestStateAck_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pquestStateAck_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pquestStateAck(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pquestStateAck_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pquestStateAck_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pquestStateAck_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pmercenary_action(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pmercenary_action_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pmercenary_action_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pmercenary_action_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pmercenary_action(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pmercenary_action_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pmercenary_action_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pmercenary_action_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pBattleChat(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pBattleChat_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBattleChat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pBattleChat_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pBattleChat(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pBattleChat_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBattleChat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pBattleChat_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pLessEffect(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pLessEffect_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLessEffect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pLessEffect_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pLessEffect(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pLessEffect_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLessEffect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pLessEffect_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pItemListWindowSelected(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pItemListWindowSelected_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemListWindowSelected_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pItemListWindowSelected_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pItemListWindowSelected(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pItemListWindowSelected_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemListWindowSelected_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pItemListWindowSelected_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pReqOpenBuyingStore(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pReqOpenBuyingStore_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqOpenBuyingStore_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pReqOpenBuyingStore_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pReqOpenBuyingStore(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pReqOpenBuyingStore_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqOpenBuyingStore_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pReqOpenBuyingStore_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pReqCloseBuyingStore(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pReqCloseBuyingStore_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqCloseBuyingStore_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pReqCloseBuyingStore_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pReqCloseBuyingStore(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pReqCloseBuyingStore_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqCloseBuyingStore_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pReqCloseBuyingStore_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pReqClickBuyingStore(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pReqClickBuyingStore_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqClickBuyingStore_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pReqClickBuyingStore_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pReqClickBuyingStore(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pReqClickBuyingStore_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqClickBuyingStore_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pReqClickBuyingStore_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pReqTradeBuyingStore(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pReqTradeBuyingStore_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqTradeBuyingStore_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pReqTradeBuyingStore_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pReqTradeBuyingStore(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pReqTradeBuyingStore_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqTradeBuyingStore_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pReqTradeBuyingStore_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pSearchStoreInfo(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pSearchStoreInfo_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfo_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pSearchStoreInfo(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pSearchStoreInfo_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfo_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pSearchStoreInfoNextPage(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfoNextPage_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pSearchStoreInfoNextPage(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfoNextPage_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCloseSearchStoreInfo(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCloseSearchStoreInfo_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseSearchStoreInfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCloseSearchStoreInfo_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCloseSearchStoreInfo(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCloseSearchStoreInfo_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseSearchStoreInfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCloseSearchStoreInfo_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pSearchStoreInfoListItemClick(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfoListItemClick_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pSearchStoreInfoListItemClick(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfoListItemClick_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pDebug(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pDebug_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDebug_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pDebug_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pDebug(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pDebug_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDebug_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pDebug_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pSkillSelectMenu(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pSkillSelectMenu_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillSelectMenu_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pSkillSelectMenu_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pSkillSelectMenu(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pSkillSelectMenu_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillSelectMenu_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pSkillSelectMenu_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pMoveItem(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pMoveItem_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveItem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pMoveItem_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pMoveItem(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pMoveItem_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveItem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pMoveItem_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pDull(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pDull_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDull_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pDull_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pDull(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pDull_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDull_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pDull_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pBGQueueRegister(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pBGQueueRegister_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRegister_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pBGQueueRegister_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pBGQueueRegister(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pBGQueueRegister_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRegister_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pBGQueueRegister_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pBGQueueCheckState(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pBGQueueCheckState_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueCheckState_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pBGQueueCheckState_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pBGQueueCheckState(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pBGQueueCheckState_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueCheckState_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pBGQueueCheckState_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pBGQueueRevokeReq(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pBGQueueRevokeReq_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRevokeReq_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pBGQueueRevokeReq_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pBGQueueRevokeReq(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pBGQueueRevokeReq_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRevokeReq_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pBGQueueRevokeReq_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pBGQueueBattleBeginAck(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pBGQueueBattleBeginAck_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pBGQueueBattleBeginAck(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pBGQueueBattleBeginAck_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCashShopOpen(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCashShopOpen_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCashShopOpen_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCashShopOpen(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCashShopOpen_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCashShopOpen_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCashShopClose(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCashShopClose_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopClose_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCashShopClose_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCashShopClose(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCashShopClose_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopClose_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCashShopClose_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCashShopReqTab(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCashShopReqTab_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopReqTab_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCashShopReqTab_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCashShopReqTab(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCashShopReqTab_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopReqTab_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCashShopReqTab_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCashShopSchedule(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCashShopSchedule_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopSchedule_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCashShopSchedule_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCashShopSchedule(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCashShopSchedule_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopSchedule_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCashShopSchedule_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pCashShopBuy(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pCashShopBuy_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopBuy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pCashShopBuy_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pCashShopBuy(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pCashShopBuy_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopBuy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pCashShopBuy_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyTick(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyTick_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyTick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyTick_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyTick(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyTick_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyTick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyTick_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pGuildInvite2(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGuildInvite2_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGuildInvite2_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGuildInvite2(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGuildInvite2_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGuildInvite2_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyBookingAddFilter(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyBookingAddFilter_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyBookingAddFilter(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyBookingAddFilter_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingAddFilter_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyBookingAddFilter_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyBookingSubFilter(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyBookingSubFilter_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSubFilter_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyBookingSubFilter_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyBookingSubFilter(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyBookingSubFilter_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSubFilter_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyBookingSubFilter_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyBookingReqVolunteer(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyBookingReqVolunteer_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyBookingReqVolunteer(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyBookingReqVolunteer_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyBookingRefuseVolunteer(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyBookingRefuseVolunteer_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyBookingRefuseVolunteer(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyBookingRefuseVolunteer_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+void HP_clif_pPartyBookingCancelVolunteer(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pPartyBookingCancelVolunteer_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pPartyBookingCancelVolunteer(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pPartyBookingCancelVolunteer_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
+/* duel */
+int HP_duel_create(struct map_session_data *sd, const unsigned int maxpl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_duel_create_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const unsigned int *maxpl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_duel_create_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &maxpl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.duel.create(sd, maxpl);
+ }
+ if( HPMHooks.count.HP_duel_create_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const unsigned int *maxpl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_duel_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &maxpl);
+ }
+ }
+ return retVal___;
+}
+void HP_duel_invite(const unsigned int did, struct map_session_data *sd, struct map_session_data *target_sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_duel_invite_pre ) {
+ void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd, struct map_session_data *target_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_invite_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_duel_invite_pre[hIndex].func;
+ preHookFunc(&did, sd, target_sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.duel.invite(did, sd, target_sd);
+ }
+ if( HPMHooks.count.HP_duel_invite_post ) {
+ void (*postHookFunc) (const unsigned int *did, struct map_session_data *sd, struct map_session_data *target_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_invite_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_duel_invite_post[hIndex].func;
+ postHookFunc(&did, sd, target_sd);
+ }
+ }
+ return;
+}
+void HP_duel_accept(const unsigned int did, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_duel_accept_pre ) {
+ void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_accept_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_duel_accept_pre[hIndex].func;
+ preHookFunc(&did, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.duel.accept(did, sd);
+ }
+ if( HPMHooks.count.HP_duel_accept_post ) {
+ void (*postHookFunc) (const unsigned int *did, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_accept_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_duel_accept_post[hIndex].func;
+ postHookFunc(&did, sd);
+ }
+ }
+ return;
+}
+void HP_duel_reject(const unsigned int did, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_duel_reject_pre ) {
+ void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_reject_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_duel_reject_pre[hIndex].func;
+ preHookFunc(&did, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.duel.reject(did, sd);
+ }
+ if( HPMHooks.count.HP_duel_reject_post ) {
+ void (*postHookFunc) (const unsigned int *did, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_reject_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_duel_reject_post[hIndex].func;
+ postHookFunc(&did, sd);
+ }
+ }
+ return;
+}
+void HP_duel_leave(const unsigned int did, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_duel_leave_pre ) {
+ void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_leave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_duel_leave_pre[hIndex].func;
+ preHookFunc(&did, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.duel.leave(did, sd);
+ }
+ if( HPMHooks.count.HP_duel_leave_post ) {
+ void (*postHookFunc) (const unsigned int *did, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_leave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_duel_leave_post[hIndex].func;
+ postHookFunc(&did, sd);
+ }
+ }
+ return;
+}
+void HP_duel_showinfo(const unsigned int did, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_duel_showinfo_pre ) {
+ void (*preHookFunc) (const unsigned int *did, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_showinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_duel_showinfo_pre[hIndex].func;
+ preHookFunc(&did, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.duel.showinfo(did, sd);
+ }
+ if( HPMHooks.count.HP_duel_showinfo_post ) {
+ void (*postHookFunc) (const unsigned int *did, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_showinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_duel_showinfo_post[hIndex].func;
+ postHookFunc(&did, sd);
+ }
+ }
+ return;
+}
+int HP_duel_checktime(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_duel_checktime_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_checktime_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_duel_checktime_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.duel.checktime(sd);
+ }
+ if( HPMHooks.count.HP_duel_checktime_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_checktime_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_duel_checktime_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+void HP_duel_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_duel_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_duel_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.duel.init();
+ }
+ if( HPMHooks.count.HP_duel_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_duel_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_duel_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_duel_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_duel_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.duel.final();
+ }
+ if( HPMHooks.count.HP_duel_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_duel_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* elemental */
+int HP_elemental_init(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_init_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_init_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.init();
+ }
+ if( HPMHooks.count.HP_elemental_init_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_elemental_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_elemental_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.elemental.final();
+ }
+ if( HPMHooks.count.HP_elemental_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_elemental_class(int class_) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_elemental_class_pre ) {
+ bool (*preHookFunc) (int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_class_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_class_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.class(class_);
+ }
+ if( HPMHooks.count.HP_elemental_class_post ) {
+ bool (*postHookFunc) (bool retVal___, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_class_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_class_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_);
+ }
+ }
+ return retVal___;
+}
+struct view_data* HP_elemental_get_viewdata(int class_) {
+ int hIndex = 0;
+ struct view_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_elemental_get_viewdata_pre ) {
+ struct view_data* (*preHookFunc) (int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_viewdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_get_viewdata_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.get_viewdata(class_);
+ }
+ if( HPMHooks.count.HP_elemental_get_viewdata_post ) {
+ struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_viewdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_get_viewdata_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_create(struct map_session_data *sd, int class_, unsigned int lifetime) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_create_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *class_, unsigned int *lifetime);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_create_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &class_, &lifetime);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.create(sd, class_, lifetime);
+ }
+ if( HPMHooks.count.HP_elemental_create_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *class_, unsigned int *lifetime);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &class_, &lifetime);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_data_received(struct s_elemental *ele, bool flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_data_received_pre ) {
+ int (*preHookFunc) (struct s_elemental *ele, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_data_received_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_data_received_pre[hIndex].func;
+ retVal___ = preHookFunc(ele, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.data_received(ele, flag);
+ }
+ if( HPMHooks.count.HP_elemental_data_received_post ) {
+ int (*postHookFunc) (int retVal___, struct s_elemental *ele, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_data_received_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_data_received_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ele, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_save(struct elemental_data *ed) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_save_pre ) {
+ int (*preHookFunc) (struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_save_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_save_pre[hIndex].func;
+ retVal___ = preHookFunc(ed);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.save(ed);
+ }
+ if( HPMHooks.count.HP_elemental_save_post ) {
+ int (*postHookFunc) (int retVal___, struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_save_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_save_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ed);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_change_mode_ack(struct elemental_data *ed, int mode) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_change_mode_ack_pre ) {
+ int (*preHookFunc) (struct elemental_data *ed, int *mode);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_change_mode_ack_pre[hIndex].func;
+ retVal___ = preHookFunc(ed, &mode);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.change_mode_ack(ed, mode);
+ }
+ if( HPMHooks.count.HP_elemental_change_mode_ack_post ) {
+ int (*postHookFunc) (int retVal___, struct elemental_data *ed, int *mode);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_change_mode_ack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ed, &mode);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_change_mode(struct elemental_data *ed, int mode) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_change_mode_pre ) {
+ int (*preHookFunc) (struct elemental_data *ed, int *mode);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_change_mode_pre[hIndex].func;
+ retVal___ = preHookFunc(ed, &mode);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.change_mode(ed, mode);
+ }
+ if( HPMHooks.count.HP_elemental_change_mode_post ) {
+ int (*postHookFunc) (int retVal___, struct elemental_data *ed, int *mode);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_change_mode_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ed, &mode);
+ }
+ }
+ return retVal___;
+}
+void HP_elemental_heal(struct elemental_data *ed, int hp, int sp) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_elemental_heal_pre ) {
+ void (*preHookFunc) (struct elemental_data *ed, int *hp, int *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_heal_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_heal_pre[hIndex].func;
+ preHookFunc(ed, &hp, &sp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.elemental.heal(ed, hp, sp);
+ }
+ if( HPMHooks.count.HP_elemental_heal_post ) {
+ void (*postHookFunc) (struct elemental_data *ed, int *hp, int *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_heal_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_heal_post[hIndex].func;
+ postHookFunc(ed, &hp, &sp);
+ }
+ }
+ return;
+}
+int HP_elemental_dead(struct elemental_data *ed) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_dead_pre ) {
+ int (*preHookFunc) (struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_dead_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_dead_pre[hIndex].func;
+ retVal___ = preHookFunc(ed);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.dead(ed);
+ }
+ if( HPMHooks.count.HP_elemental_dead_post ) {
+ int (*postHookFunc) (int retVal___, struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_dead_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_dead_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ed);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_delete(struct elemental_data *ed, int reply) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_delete_pre ) {
+ int (*preHookFunc) (struct elemental_data *ed, int *reply);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(ed, &reply);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.delete(ed, reply);
+ }
+ if( HPMHooks.count.HP_elemental_delete_post ) {
+ int (*postHookFunc) (int retVal___, struct elemental_data *ed, int *reply);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ed, &reply);
+ }
+ }
+ return retVal___;
+}
+void HP_elemental_summon_stop(struct elemental_data *ed) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_elemental_summon_stop_pre ) {
+ void (*preHookFunc) (struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_stop_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_summon_stop_pre[hIndex].func;
+ preHookFunc(ed);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.elemental.summon_stop(ed);
+ }
+ if( HPMHooks.count.HP_elemental_summon_stop_post ) {
+ void (*postHookFunc) (struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_stop_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_summon_stop_post[hIndex].func;
+ postHookFunc(ed);
+ }
+ }
+ return;
+}
+int HP_elemental_get_lifetime(struct elemental_data *ed) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_get_lifetime_pre ) {
+ int (*preHookFunc) (struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_lifetime_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_get_lifetime_pre[hIndex].func;
+ retVal___ = preHookFunc(ed);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.get_lifetime(ed);
+ }
+ if( HPMHooks.count.HP_elemental_get_lifetime_post ) {
+ int (*postHookFunc) (int retVal___, struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_lifetime_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_get_lifetime_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ed);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_unlocktarget(struct elemental_data *ed) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_unlocktarget_pre ) {
+ int (*preHookFunc) (struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_unlocktarget_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_unlocktarget_pre[hIndex].func;
+ retVal___ = preHookFunc(ed);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.unlocktarget(ed);
+ }
+ if( HPMHooks.count.HP_elemental_unlocktarget_post ) {
+ int (*postHookFunc) (int retVal___, struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_unlocktarget_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_unlocktarget_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ed);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_skillnotok(uint16 skill_id, struct elemental_data *ed) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_skillnotok_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skillnotok_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_skillnotok_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, ed);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.skillnotok(skill_id, ed);
+ }
+ if( HPMHooks.count.HP_elemental_skillnotok_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skillnotok_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_skillnotok_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, ed);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_set_target(struct map_session_data *sd, struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_set_target_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_set_target_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_set_target_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.set_target(sd, bl);
+ }
+ if( HPMHooks.count.HP_elemental_set_target_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_set_target_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_set_target_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_clean_single_effect(struct elemental_data *ed, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_clean_single_effect_pre ) {
+ int (*preHookFunc) (struct elemental_data *ed, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_single_effect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_clean_single_effect_pre[hIndex].func;
+ retVal___ = preHookFunc(ed, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.clean_single_effect(ed, skill_id);
+ }
+ if( HPMHooks.count.HP_elemental_clean_single_effect_post ) {
+ int (*postHookFunc) (int retVal___, struct elemental_data *ed, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_single_effect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_clean_single_effect_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ed, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_clean_effect(struct elemental_data *ed) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_clean_effect_pre ) {
+ int (*preHookFunc) (struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_effect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_clean_effect_pre[hIndex].func;
+ retVal___ = preHookFunc(ed);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.clean_effect(ed);
+ }
+ if( HPMHooks.count.HP_elemental_clean_effect_post ) {
+ int (*postHookFunc) (int retVal___, struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_effect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_clean_effect_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ed);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_action(struct elemental_data *ed, struct block_list *bl, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_action_pre ) {
+ int (*preHookFunc) (struct elemental_data *ed, struct block_list *bl, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_action_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_action_pre[hIndex].func;
+ retVal___ = preHookFunc(ed, bl, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.action(ed, bl, tick);
+ }
+ if( HPMHooks.count.HP_elemental_action_post ) {
+ int (*postHookFunc) (int retVal___, struct elemental_data *ed, struct block_list *bl, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_action_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_action_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ed, bl, &tick);
+ }
+ }
+ return retVal___;
+}
+struct skill_condition HP_elemental_skill_get_requirements(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ struct skill_condition retVal___;
+ memset(&retVal___, '\0', sizeof(struct skill_condition));
+ if( HPMHooks.count.HP_elemental_skill_get_requirements_pre ) {
+ struct skill_condition (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skill_get_requirements_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_skill_get_requirements_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.skill_get_requirements(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_elemental_skill_get_requirements_post ) {
+ struct skill_condition (*postHookFunc) (struct skill_condition retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skill_get_requirements_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_skill_get_requirements_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_read_skilldb(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_read_skilldb_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_skilldb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_read_skilldb_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.read_skilldb();
+ }
+ if( HPMHooks.count.HP_elemental_read_skilldb_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_skilldb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_read_skilldb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_elemental_reload_db(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_elemental_reload_db_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_db_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_reload_db_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.elemental.reload_db();
+ }
+ if( HPMHooks.count.HP_elemental_reload_db_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_db_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_reload_db_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_elemental_reload_skilldb(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_elemental_reload_skilldb_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_skilldb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_reload_skilldb_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.elemental.reload_skilldb();
+ }
+ if( HPMHooks.count.HP_elemental_reload_skilldb_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_skilldb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_reload_skilldb_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_elemental_search_index(int class_) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_search_index_pre ) {
+ int (*preHookFunc) (int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_search_index_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_search_index_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.search_index(class_);
+ }
+ if( HPMHooks.count.HP_elemental_search_index_post ) {
+ int (*postHookFunc) (int retVal___, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_search_index_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_search_index_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_);
+ }
+ }
+ return retVal___;
+}
+void HP_elemental_summon_init(struct elemental_data *ed) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_elemental_summon_init_pre ) {
+ void (*preHookFunc) (struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_summon_init_pre[hIndex].func;
+ preHookFunc(ed);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.elemental.summon_init(ed);
+ }
+ if( HPMHooks.count.HP_elemental_summon_init_post ) {
+ void (*postHookFunc) (struct elemental_data *ed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_summon_init_post[hIndex].func;
+ postHookFunc(ed);
+ }
+ }
+ return;
+}
+int HP_elemental_summon_end_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_summon_end_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_end_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_summon_end_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.summon_end_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_elemental_summon_end_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_end_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_summon_end_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_elemental_ai_sub_timer_activesearch_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.elemental.ai_sub_timer_activesearch(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_elemental_ai_sub_timer_activesearch_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *sd, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_ai_sub_timer_pre ) {
+ int (*preHookFunc) (struct elemental_data *ed, struct map_session_data *sd, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_ai_sub_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(ed, sd, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.ai_sub_timer(ed, sd, tick);
+ }
+ if( HPMHooks.count.HP_elemental_ai_sub_timer_post ) {
+ int (*postHookFunc) (int retVal___, struct elemental_data *ed, struct map_session_data *sd, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_ai_sub_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ed, sd, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_ai_sub_foreachclient_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_foreachclient_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_elemental_ai_sub_foreachclient_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.elemental.ai_sub_foreachclient(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_elemental_ai_sub_foreachclient_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_foreachclient_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_elemental_ai_sub_foreachclient_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_ai_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_ai_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_ai_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.ai_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_elemental_ai_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_ai_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_elemental_read_db(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_elemental_read_db_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_db_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_elemental_read_db_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.elemental.read_db();
+ }
+ if( HPMHooks.count.HP_elemental_read_db_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_db_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_elemental_read_db_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+/* guild */
+void HP_guild_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.init();
+ }
+ if( HPMHooks.count.HP_guild_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_guild_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.final();
+ }
+ if( HPMHooks.count.HP_guild_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_guild_skill_get_max(int id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_skill_get_max_pre ) {
+ int (*preHookFunc) (int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skill_get_max_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_skill_get_max_pre[hIndex].func;
+ retVal___ = preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.skill_get_max(id);
+ }
+ if( HPMHooks.count.HP_guild_skill_get_max_post ) {
+ int (*postHookFunc) (int retVal___, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skill_get_max_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_skill_get_max_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_checkskill(struct guild *g, int id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_checkskill_pre ) {
+ int (*preHookFunc) (struct guild *g, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_checkskill_pre[hIndex].func;
+ retVal___ = preHookFunc(g, &id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.checkskill(g, id);
+ }
+ if( HPMHooks.count.HP_guild_checkskill_post ) {
+ int (*postHookFunc) (int retVal___, struct guild *g, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_checkskill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, g, &id);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_check_skill_require(struct guild *g, int id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_check_skill_require_pre ) {
+ int (*preHookFunc) (struct guild *g, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_skill_require_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_check_skill_require_pre[hIndex].func;
+ retVal___ = preHookFunc(g, &id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.check_skill_require(g, id);
+ }
+ if( HPMHooks.count.HP_guild_check_skill_require_post ) {
+ int (*postHookFunc) (int retVal___, struct guild *g, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_skill_require_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_check_skill_require_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, g, &id);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_checkcastles(struct guild *g) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_checkcastles_pre ) {
+ int (*preHookFunc) (struct guild *g);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkcastles_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_checkcastles_pre[hIndex].func;
+ retVal___ = preHookFunc(g);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.checkcastles(g);
+ }
+ if( HPMHooks.count.HP_guild_checkcastles_post ) {
+ int (*postHookFunc) (int retVal___, struct guild *g);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkcastles_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_checkcastles_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, g);
+ }
+ }
+ return retVal___;
+}
+bool HP_guild_isallied(int guild_id, int guild_id2) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_guild_isallied_pre ) {
+ bool (*preHookFunc) (int *guild_id, int *guild_id2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_isallied_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_isallied_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &guild_id2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.isallied(guild_id, guild_id2);
+ }
+ if( HPMHooks.count.HP_guild_isallied_post ) {
+ bool (*postHookFunc) (bool retVal___, int *guild_id, int *guild_id2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_isallied_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_isallied_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &guild_id2);
+ }
+ }
+ return retVal___;
+}
+struct guild* HP_guild_search(int guild_id) {
+ int hIndex = 0;
+ struct guild* retVal___ = NULL;
+ if( HPMHooks.count.HP_guild_search_pre ) {
+ struct guild* (*preHookFunc) (int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_search_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.search(guild_id);
+ }
+ if( HPMHooks.count.HP_guild_search_post ) {
+ struct guild* (*postHookFunc) (struct guild* retVal___, int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_search_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id);
+ }
+ }
+ return retVal___;
+}
+struct guild* HP_guild_searchname(char *str) {
+ int hIndex = 0;
+ struct guild* retVal___ = NULL;
+ if( HPMHooks.count.HP_guild_searchname_pre ) {
+ struct guild* (*preHookFunc) (char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_searchname_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_searchname_pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.searchname(str);
+ }
+ if( HPMHooks.count.HP_guild_searchname_post ) {
+ struct guild* (*postHookFunc) (struct guild* retVal___, char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_searchname_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_searchname_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
+struct guild_castle* HP_guild_castle_search(int gcid) {
+ int hIndex = 0;
+ struct guild_castle* retVal___ = NULL;
+ if( HPMHooks.count.HP_guild_castle_search_pre ) {
+ struct guild_castle* (*preHookFunc) (int *gcid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_castle_search_pre[hIndex].func;
+ retVal___ = preHookFunc(&gcid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.castle_search(gcid);
+ }
+ if( HPMHooks.count.HP_guild_castle_search_post ) {
+ struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, int *gcid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_castle_search_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &gcid);
+ }
+ }
+ return retVal___;
+}
+struct guild_castle* HP_guild_mapname2gc(const char *mapname) {
+ int hIndex = 0;
+ struct guild_castle* retVal___ = NULL;
+ if( HPMHooks.count.HP_guild_mapname2gc_pre ) {
+ struct guild_castle* (*preHookFunc) (const char *mapname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapname2gc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_mapname2gc_pre[hIndex].func;
+ retVal___ = preHookFunc(mapname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.mapname2gc(mapname);
+ }
+ if( HPMHooks.count.HP_guild_mapname2gc_post ) {
+ struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, const char *mapname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapname2gc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_mapname2gc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, mapname);
+ }
+ }
+ return retVal___;
+}
+struct guild_castle* HP_guild_mapindex2gc(short mapindex) {
+ int hIndex = 0;
+ struct guild_castle* retVal___ = NULL;
+ if( HPMHooks.count.HP_guild_mapindex2gc_pre ) {
+ struct guild_castle* (*preHookFunc) (short *mapindex);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_mapindex2gc_pre[hIndex].func;
+ retVal___ = preHookFunc(&mapindex);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.mapindex2gc(mapindex);
+ }
+ if( HPMHooks.count.HP_guild_mapindex2gc_post ) {
+ struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, short *mapindex);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_mapindex2gc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &mapindex);
+ }
+ }
+ return retVal___;
+}
+struct map_session_data* HP_guild_getavailablesd(struct guild *g) {
+ int hIndex = 0;
+ struct map_session_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_guild_getavailablesd_pre ) {
+ struct map_session_data* (*preHookFunc) (struct guild *g);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getavailablesd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_getavailablesd_pre[hIndex].func;
+ retVal___ = preHookFunc(g);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.getavailablesd(g);
+ }
+ if( HPMHooks.count.HP_guild_getavailablesd_post ) {
+ struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct guild *g);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getavailablesd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_getavailablesd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, g);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_getindex(struct guild *g, int account_id, int char_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_getindex_pre ) {
+ int (*preHookFunc) (struct guild *g, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getindex_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_getindex_pre[hIndex].func;
+ retVal___ = preHookFunc(g, &account_id, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.getindex(g, account_id, char_id);
+ }
+ if( HPMHooks.count.HP_guild_getindex_post ) {
+ int (*postHookFunc) (int retVal___, struct guild *g, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getindex_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_getindex_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, g, &account_id, &char_id);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_getposition(struct guild *g, struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_getposition_pre ) {
+ int (*preHookFunc) (struct guild *g, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getposition_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_getposition_pre[hIndex].func;
+ retVal___ = preHookFunc(g, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.getposition(g, sd);
+ }
+ if( HPMHooks.count.HP_guild_getposition_post ) {
+ int (*postHookFunc) (int retVal___, struct guild *g, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getposition_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_getposition_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, g, sd);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_guild_payexp(struct map_session_data *sd, unsigned int exp) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_guild_payexp_pre ) {
+ unsigned int (*preHookFunc) (struct map_session_data *sd, unsigned int *exp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_payexp_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &exp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.payexp(sd, exp);
+ }
+ if( HPMHooks.count.HP_guild_payexp_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, unsigned int *exp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_payexp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &exp);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_getexp(struct map_session_data *sd, int exp) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_getexp_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *exp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getexp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_getexp_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &exp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.getexp(sd, exp);
+ }
+ if( HPMHooks.count.HP_guild_getexp_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *exp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getexp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_getexp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &exp);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_create(struct map_session_data *sd, const char *name) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_create_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_create_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.create(sd, name);
+ }
+ if( HPMHooks.count.HP_guild_create_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, name);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_created(int account_id, int guild_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_created_pre ) {
+ int (*preHookFunc) (int *account_id, int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_created_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_created_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, &guild_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.created(account_id, guild_id);
+ }
+ if( HPMHooks.count.HP_guild_created_post ) {
+ int (*postHookFunc) (int retVal___, int *account_id, int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_created_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_created_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, &guild_id);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_request_info(int guild_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_request_info_pre ) {
+ int (*preHookFunc) (int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_request_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_request_info_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.request_info(guild_id);
+ }
+ if( HPMHooks.count.HP_guild_request_info_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_request_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_request_info_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_recv_noinfo(int guild_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_recv_noinfo_pre ) {
+ int (*preHookFunc) (int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_noinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_recv_noinfo_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.recv_noinfo(guild_id);
+ }
+ if( HPMHooks.count.HP_guild_recv_noinfo_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_noinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_recv_noinfo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_recv_info(struct guild *sg) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_recv_info_pre ) {
+ int (*preHookFunc) (struct guild *sg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_recv_info_pre[hIndex].func;
+ retVal___ = preHookFunc(sg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.recv_info(sg);
+ }
+ if( HPMHooks.count.HP_guild_recv_info_post ) {
+ int (*postHookFunc) (int retVal___, struct guild *sg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_recv_info_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sg);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_npc_request_info(int guild_id, const char *ev) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_npc_request_info_pre ) {
+ int (*preHookFunc) (int *guild_id, const char *ev);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_npc_request_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_npc_request_info_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, ev);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.npc_request_info(guild_id, ev);
+ }
+ if( HPMHooks.count.HP_guild_npc_request_info_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, const char *ev);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_npc_request_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_npc_request_info_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, ev);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_invite(struct map_session_data *sd, struct map_session_data *tsd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_invite_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_invite_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_invite_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, tsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.invite(sd, tsd);
+ }
+ if( HPMHooks.count.HP_guild_invite_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_invite_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_invite_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, tsd);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_reply_invite(struct map_session_data *sd, int guild_id, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_reply_invite_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reply_invite_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_reply_invite_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &guild_id, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.reply_invite(sd, guild_id, flag);
+ }
+ if( HPMHooks.count.HP_guild_reply_invite_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *guild_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reply_invite_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_reply_invite_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &guild_id, &flag);
+ }
+ }
+ return retVal___;
+}
+void HP_guild_member_joined(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_member_joined_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_joined_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_member_joined_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.member_joined(sd);
+ }
+ if( HPMHooks.count.HP_guild_member_joined_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_joined_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_member_joined_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_guild_member_added(int guild_id, int account_id, int char_id, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_member_added_pre ) {
+ int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_added_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_member_added_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.member_added(guild_id, account_id, char_id, flag);
+ }
+ if( HPMHooks.count.HP_guild_member_added_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_added_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_member_added_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_leave(struct map_session_data *sd, int guild_id, int account_id, int char_id, const char *mes) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_leave_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *account_id, int *char_id, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_leave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_leave_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &guild_id, &account_id, &char_id, mes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.leave(sd, guild_id, account_id, char_id, mes);
+ }
+ if( HPMHooks.count.HP_guild_leave_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *guild_id, int *account_id, int *char_id, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_leave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_leave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &guild_id, &account_id, &char_id, mes);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, const char *name, const char *mes) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_member_withdraw_pre ) {
+ int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char *name, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_withdraw_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_member_withdraw_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag, name, mes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.member_withdraw(guild_id, account_id, char_id, flag, name, mes);
+ }
+ if( HPMHooks.count.HP_guild_member_withdraw_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *flag, const char *name, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_withdraw_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_member_withdraw_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &flag, name, mes);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_expulsion(struct map_session_data *sd, int guild_id, int account_id, int char_id, const char *mes) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_expulsion_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *account_id, int *char_id, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expulsion_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_expulsion_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &guild_id, &account_id, &char_id, mes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.expulsion(sd, guild_id, account_id, char_id, mes);
+ }
+ if( HPMHooks.count.HP_guild_expulsion_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *guild_id, int *account_id, int *char_id, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expulsion_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_expulsion_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &guild_id, &account_id, &char_id, mes);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_skillup(struct map_session_data *sd, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_skillup_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_skillup_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.skillup(sd, skill_id);
+ }
+ if( HPMHooks.count.HP_guild_skillup_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_skillup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id);
+ }
+ }
+ return retVal___;
+}
+void HP_guild_block_skill(struct map_session_data *sd, int time) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_block_skill_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *time);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_block_skill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_block_skill_pre[hIndex].func;
+ preHookFunc(sd, &time);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.block_skill(sd, time);
+ }
+ if( HPMHooks.count.HP_guild_block_skill_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *time);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_block_skill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_block_skill_post[hIndex].func;
+ postHookFunc(sd, &time);
+ }
+ }
+ return;
+}
+int HP_guild_reqalliance(struct map_session_data *sd, struct map_session_data *tsd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_reqalliance_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reqalliance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_reqalliance_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, tsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.reqalliance(sd, tsd);
+ }
+ if( HPMHooks.count.HP_guild_reqalliance_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reqalliance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_reqalliance_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, tsd);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_reply_reqalliance(struct map_session_data *sd, int account_id, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_reply_reqalliance_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *account_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reply_reqalliance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_reply_reqalliance_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &account_id, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.reply_reqalliance(sd, account_id, flag);
+ }
+ if( HPMHooks.count.HP_guild_reply_reqalliance_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *account_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reply_reqalliance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_reply_reqalliance_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &account_id, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_allianceack(int guild_id1, int guild_id2, int account_id1, int account_id2, int flag, const char *name1, const char *name2) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_allianceack_pre ) {
+ int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char *name1, const char *name2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_allianceack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_allianceack_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id1, &guild_id2, &account_id1, &account_id2, &flag, name1, name2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.allianceack(guild_id1, guild_id2, account_id1, account_id2, flag, name1, name2);
+ }
+ if( HPMHooks.count.HP_guild_allianceack_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char *name1, const char *name2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_allianceack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_allianceack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id1, &guild_id2, &account_id1, &account_id2, &flag, name1, name2);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_delalliance(struct map_session_data *sd, int guild_id, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_delalliance_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_delalliance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_delalliance_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &guild_id, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.delalliance(sd, guild_id, flag);
+ }
+ if( HPMHooks.count.HP_guild_delalliance_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *guild_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_delalliance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_delalliance_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &guild_id, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_opposition(struct map_session_data *sd, struct map_session_data *tsd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_opposition_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_opposition_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_opposition_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, tsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.opposition(sd, tsd);
+ }
+ if( HPMHooks.count.HP_guild_opposition_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_opposition_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_opposition_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, tsd);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_check_alliance(int guild_id1, int guild_id2, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_check_alliance_pre ) {
+ int (*preHookFunc) (int *guild_id1, int *guild_id2, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_alliance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_check_alliance_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id1, &guild_id2, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.check_alliance(guild_id1, guild_id2, flag);
+ }
+ if( HPMHooks.count.HP_guild_check_alliance_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id1, int *guild_id2, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_alliance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_check_alliance_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id1, &guild_id2, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_send_memberinfoshort(struct map_session_data *sd, int online) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_send_memberinfoshort_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *online);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_memberinfoshort_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_send_memberinfoshort_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &online);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.send_memberinfoshort(sd, online);
+ }
+ if( HPMHooks.count.HP_guild_send_memberinfoshort_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *online);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_memberinfoshort_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_send_memberinfoshort_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &online);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class_) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_recv_memberinfoshort_pre ) {
+ int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.recv_memberinfoshort(guild_id, account_id, char_id, online, lv, class_);
+ }
+ if( HPMHooks.count.HP_guild_recv_memberinfoshort_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &online, &lv, &class_);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_change_memberposition(int guild_id, int account_id, int char_id, short idx) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_change_memberposition_pre ) {
+ int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, short *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_memberposition_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_change_memberposition_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.change_memberposition(guild_id, account_id, char_id, idx);
+ }
+ if( HPMHooks.count.HP_guild_change_memberposition_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, short *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_memberposition_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_change_memberposition_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &idx);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_memberposition_changed(struct guild *g, int idx, int pos) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_memberposition_changed_pre ) {
+ int (*preHookFunc) (struct guild *g, int *idx, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_memberposition_changed_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_memberposition_changed_pre[hIndex].func;
+ retVal___ = preHookFunc(g, &idx, &pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.memberposition_changed(g, idx, pos);
+ }
+ if( HPMHooks.count.HP_guild_memberposition_changed_post ) {
+ int (*postHookFunc) (int retVal___, struct guild *g, int *idx, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_memberposition_changed_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_memberposition_changed_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, g, &idx, &pos);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_change_position(int guild_id, int idx, int mode, int exp_mode, const char *name) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_change_position_pre ) {
+ int (*preHookFunc) (int *guild_id, int *idx, int *mode, int *exp_mode, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_position_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_change_position_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &idx, &mode, &exp_mode, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.change_position(guild_id, idx, mode, exp_mode, name);
+ }
+ if( HPMHooks.count.HP_guild_change_position_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *idx, int *mode, int *exp_mode, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_position_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_change_position_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &idx, &mode, &exp_mode, name);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_position_changed(int guild_id, int idx, struct guild_position *p) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_position_changed_pre ) {
+ int (*preHookFunc) (int *guild_id, int *idx, struct guild_position *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_position_changed_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_position_changed_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &idx, p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.position_changed(guild_id, idx, p);
+ }
+ if( HPMHooks.count.HP_guild_position_changed_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *idx, struct guild_position *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_position_changed_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_position_changed_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &idx, p);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_change_notice(struct map_session_data *sd, int guild_id, const char *mes1, const char *mes2) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_change_notice_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *guild_id, const char *mes1, const char *mes2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_notice_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_change_notice_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &guild_id, mes1, mes2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.change_notice(sd, guild_id, mes1, mes2);
+ }
+ if( HPMHooks.count.HP_guild_change_notice_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *guild_id, const char *mes1, const char *mes2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_notice_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_change_notice_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &guild_id, mes1, mes2);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_notice_changed(int guild_id, const char *mes1, const char *mes2) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_notice_changed_pre ) {
+ int (*preHookFunc) (int *guild_id, const char *mes1, const char *mes2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_notice_changed_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_notice_changed_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, mes1, mes2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.notice_changed(guild_id, mes1, mes2);
+ }
+ if( HPMHooks.count.HP_guild_notice_changed_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, const char *mes1, const char *mes2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_notice_changed_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_notice_changed_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, mes1, mes2);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_change_emblem(struct map_session_data *sd, int len, const char *data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_change_emblem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *len, const char *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_emblem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_change_emblem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &len, data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.change_emblem(sd, len, data);
+ }
+ if( HPMHooks.count.HP_guild_change_emblem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *len, const char *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_emblem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_change_emblem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &len, data);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_emblem_changed(int len, int guild_id, int emblem_id, const char *data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_emblem_changed_pre ) {
+ int (*preHookFunc) (int *len, int *guild_id, int *emblem_id, const char *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_emblem_changed_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_emblem_changed_pre[hIndex].func;
+ retVal___ = preHookFunc(&len, &guild_id, &emblem_id, data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.emblem_changed(len, guild_id, emblem_id, data);
+ }
+ if( HPMHooks.count.HP_guild_emblem_changed_post ) {
+ int (*postHookFunc) (int retVal___, int *len, int *guild_id, int *emblem_id, const char *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_emblem_changed_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_emblem_changed_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &len, &guild_id, &emblem_id, data);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_send_message(struct map_session_data *sd, const char *mes, int len) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_send_message_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_send_message_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, mes, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.send_message(sd, mes, len);
+ }
+ if( HPMHooks.count.HP_guild_send_message_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_send_message_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, mes, &len);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_recv_message(int guild_id, int account_id, const char *mes, int len) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_recv_message_pre ) {
+ int (*preHookFunc) (int *guild_id, int *account_id, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_recv_message_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &account_id, mes, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.recv_message(guild_id, account_id, mes, len);
+ }
+ if( HPMHooks.count.HP_guild_recv_message_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_recv_message_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &account_id, mes, &len);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_send_dot_remove(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_send_dot_remove_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_dot_remove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_send_dot_remove_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.send_dot_remove(sd);
+ }
+ if( HPMHooks.count.HP_guild_send_dot_remove_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_dot_remove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_send_dot_remove_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_skillupack(int guild_id, uint16 skill_id, int account_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_skillupack_pre ) {
+ int (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillupack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_skillupack_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &skill_id, &account_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.skillupack(guild_id, skill_id, account_id);
+ }
+ if( HPMHooks.count.HP_guild_skillupack_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, uint16 *skill_id, int *account_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillupack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_skillupack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &skill_id, &account_id);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_dobreak(struct map_session_data *sd, char *name) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_dobreak_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_dobreak_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_dobreak_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.dobreak(sd, name);
+ }
+ if( HPMHooks.count.HP_guild_dobreak_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_dobreak_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_dobreak_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, name);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_broken(int guild_id, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_broken_pre ) {
+ int (*preHookFunc) (int *guild_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_broken_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.broken(guild_id, flag);
+ }
+ if( HPMHooks.count.HP_guild_broken_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_broken_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_gm_change(int guild_id, struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_gm_change_pre ) {
+ int (*preHookFunc) (int *guild_id, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_change_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_gm_change_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.gm_change(guild_id, sd);
+ }
+ if( HPMHooks.count.HP_guild_gm_change_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_change_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_gm_change_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_gm_changed(int guild_id, int account_id, int char_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_gm_changed_pre ) {
+ int (*preHookFunc) (int *guild_id, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_changed_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_gm_changed_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &account_id, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.gm_changed(guild_id, account_id, char_id);
+ }
+ if( HPMHooks.count.HP_guild_gm_changed_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_changed_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_gm_changed_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id);
+ }
+ }
+ return retVal___;
+}
+void HP_guild_castle_map_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_castle_map_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_map_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_castle_map_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.castle_map_init();
+ }
+ if( HPMHooks.count.HP_guild_castle_map_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_map_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_castle_map_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_guild_castledatasave(int castle_id, int index, int value) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_castledatasave_pre ) {
+ int (*preHookFunc) (int *castle_id, int *index, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledatasave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_castledatasave_pre[hIndex].func;
+ retVal___ = preHookFunc(&castle_id, &index, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.castledatasave(castle_id, index, value);
+ }
+ if( HPMHooks.count.HP_guild_castledatasave_post ) {
+ int (*postHookFunc) (int retVal___, int *castle_id, int *index, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledatasave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_castledatasave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &castle_id, &index, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_castledataloadack(int len, struct guild_castle *gc) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_castledataloadack_pre ) {
+ int (*preHookFunc) (int *len, struct guild_castle *gc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledataloadack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_castledataloadack_pre[hIndex].func;
+ retVal___ = preHookFunc(&len, gc);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.castledataloadack(len, gc);
+ }
+ if( HPMHooks.count.HP_guild_castledataloadack_post ) {
+ int (*postHookFunc) (int retVal___, int *len, struct guild_castle *gc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledataloadack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_castledataloadack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &len, gc);
+ }
+ }
+ return retVal___;
+}
+void HP_guild_castle_reconnect(int castle_id, int index, int value) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_castle_reconnect_pre ) {
+ void (*preHookFunc) (int *castle_id, int *index, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_castle_reconnect_pre[hIndex].func;
+ preHookFunc(&castle_id, &index, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.castle_reconnect(castle_id, index, value);
+ }
+ if( HPMHooks.count.HP_guild_castle_reconnect_post ) {
+ void (*postHookFunc) (int *castle_id, int *index, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_castle_reconnect_post[hIndex].func;
+ postHookFunc(&castle_id, &index, &value);
+ }
+ }
+ return;
+}
+void HP_guild_agit_start(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_agit_start_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_start_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_agit_start_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.agit_start();
+ }
+ if( HPMHooks.count.HP_guild_agit_start_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_start_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_agit_start_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_guild_agit_end(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_agit_end_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_end_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_agit_end_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.agit_end();
+ }
+ if( HPMHooks.count.HP_guild_agit_end_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_end_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_agit_end_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_guild_agit2_start(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_agit2_start_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_start_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_agit2_start_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.agit2_start();
+ }
+ if( HPMHooks.count.HP_guild_agit2_start_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_start_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_agit2_start_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_guild_agit2_end(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_agit2_end_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_end_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_agit2_end_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.agit2_end();
+ }
+ if( HPMHooks.count.HP_guild_agit2_end_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_end_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_agit2_end_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_guild_flag_add(struct npc_data *nd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_flag_add_pre ) {
+ void (*preHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_flag_add_pre[hIndex].func;
+ preHookFunc(nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.flag_add(nd);
+ }
+ if( HPMHooks.count.HP_guild_flag_add_post ) {
+ void (*postHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_flag_add_post[hIndex].func;
+ postHookFunc(nd);
+ }
+ }
+ return;
+}
+void HP_guild_flag_remove(struct npc_data *nd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_flag_remove_pre ) {
+ void (*preHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_remove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_flag_remove_pre[hIndex].func;
+ preHookFunc(nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.flag_remove(nd);
+ }
+ if( HPMHooks.count.HP_guild_flag_remove_post ) {
+ void (*postHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_remove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_flag_remove_post[hIndex].func;
+ postHookFunc(nd);
+ }
+ }
+ return;
+}
+void HP_guild_flags_clear(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_flags_clear_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flags_clear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_flags_clear_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.flags_clear();
+ }
+ if( HPMHooks.count.HP_guild_flags_clear_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flags_clear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_flags_clear_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_guild_aura_refresh(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_aura_refresh_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_aura_refresh_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_aura_refresh_pre[hIndex].func;
+ preHookFunc(sd, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.aura_refresh(sd, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_guild_aura_refresh_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_aura_refresh_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_aura_refresh_post[hIndex].func;
+ postHookFunc(sd, &skill_id, &skill_lv);
+ }
+ }
+ return;
+}
+int HP_guild_payexp_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_payexp_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_payexp_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.payexp_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_guild_payexp_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_payexp_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+TBL_PC* HP_guild_sd_check(int guild_id, int account_id, int char_id) {
+ int hIndex = 0;
+ TBL_PC* retVal___ = NULL;
+ if( HPMHooks.count.HP_guild_sd_check_pre ) {
+ TBL_PC* (*preHookFunc) (int *guild_id, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_sd_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_sd_check_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &account_id, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.sd_check(guild_id, account_id, char_id);
+ }
+ if( HPMHooks.count.HP_guild_sd_check_post ) {
+ TBL_PC* (*postHookFunc) (TBL_PC* retVal___, int *guild_id, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_sd_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_sd_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id);
+ }
+ }
+ return retVal___;
+}
+bool HP_guild_read_guildskill_tree_db(char *split[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_guild_read_guildskill_tree_db_pre ) {
+ bool (*preHookFunc) (char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_guildskill_tree_db_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_read_guildskill_tree_db_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.read_guildskill_tree_db(split, columns, current);
+ }
+ if( HPMHooks.count.HP_guild_read_guildskill_tree_db_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_guildskill_tree_db_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_read_guildskill_tree_db_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_guild_read_castledb(char *str[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_guild_read_castledb_pre ) {
+ bool (*preHookFunc) (char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_read_castledb_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.read_castledb(str, columns, current);
+ }
+ if( HPMHooks.count.HP_guild_read_castledb_post ) {
+ bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_read_castledb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_payexp_timer_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_guild_payexp_timer_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.guild.payexp_timer_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_guild_payexp_timer_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_guild_payexp_timer_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_send_xy_timer_sub(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_send_xy_timer_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_guild_send_xy_timer_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.guild.send_xy_timer_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_guild_send_xy_timer_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_guild_send_xy_timer_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_send_xy_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_send_xy_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.send_xy_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_guild_send_xy_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_send_xy_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+DBData HP_guild_create_expcache(DBKey key, va_list args) {
+ int hIndex = 0;
+ DBData retVal___;
+ memset(&retVal___, '\0', sizeof(DBData));
+ if( HPMHooks.count.HP_guild_create_expcache_pre ) {
+ DBData (*preHookFunc) (DBKey *key, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_expcache_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_guild_create_expcache_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.guild.create_expcache(key, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_guild_create_expcache_post ) {
+ DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_expcache_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_guild_create_expcache_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_eventlist_db_final(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_eventlist_db_final_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_eventlist_db_final_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_guild_eventlist_db_final_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.guild.eventlist_db_final(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_guild_eventlist_db_final_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_eventlist_db_final_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_guild_eventlist_db_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_expcache_db_final(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_expcache_db_final_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expcache_db_final_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_guild_expcache_db_final_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.guild.expcache_db_final(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_guild_expcache_db_final_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expcache_db_final_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_guild_expcache_db_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_castle_db_final(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_castle_db_final_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_db_final_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_guild_castle_db_final_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.guild.castle_db_final(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_guild_castle_db_final_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_db_final_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_guild_castle_db_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_broken_sub(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_broken_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_guild_broken_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.guild.broken_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_guild_broken_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_guild_broken_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_castle_broken_sub(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_castle_broken_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_broken_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_guild_castle_broken_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.guild.castle_broken_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_guild_castle_broken_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_broken_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_guild_castle_broken_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_guild_makemember(struct guild_member *m, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_makemember_pre ) {
+ void (*preHookFunc) (struct guild_member *m, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_makemember_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_makemember_pre[hIndex].func;
+ preHookFunc(m, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.guild.makemember(m, sd);
+ }
+ if( HPMHooks.count.HP_guild_makemember_post ) {
+ void (*postHookFunc) (struct guild_member *m, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_makemember_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_makemember_post[hIndex].func;
+ postHookFunc(m, sd);
+ }
+ }
+ return;
+}
+int HP_guild_check_member(struct guild *g) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_check_member_pre ) {
+ int (*preHookFunc) (struct guild *g);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_member_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_check_member_pre[hIndex].func;
+ retVal___ = preHookFunc(g);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.check_member(g);
+ }
+ if( HPMHooks.count.HP_guild_check_member_post ) {
+ int (*postHookFunc) (int retVal___, struct guild *g);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_member_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_check_member_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, g);
+ }
+ }
+ return retVal___;
+}
+int HP_guild_get_alliance_count(struct guild *g, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_guild_get_alliance_count_pre ) {
+ int (*preHookFunc) (struct guild *g, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_get_alliance_count_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_guild_get_alliance_count_pre[hIndex].func;
+ retVal___ = preHookFunc(g, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.guild.get_alliance_count(g, flag);
+ }
+ if( HPMHooks.count.HP_guild_get_alliance_count_post ) {
+ int (*postHookFunc) (int retVal___, struct guild *g, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_get_alliance_count_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_guild_get_alliance_count_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, g, &flag);
+ }
+ }
+ return retVal___;
+}
+void HP_guild_castle_reconnect_sub(void *key, void *data, va_list ap) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_guild_castle_reconnect_sub_pre ) {
+ void (*preHookFunc) (void *key, void *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_guild_castle_reconnect_sub_pre[hIndex].func;
+ preHookFunc(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ HPMHooks.source.guild.castle_reconnect_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_guild_castle_reconnect_sub_post ) {
+ void (*postHookFunc) (void *key, void *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_guild_castle_reconnect_sub_post[hIndex].func;
+ postHookFunc(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return;
+}
+/* gstorage */
+struct guild_storage* HP_gstorage_id2storage(int guild_id) {
+ int hIndex = 0;
+ struct guild_storage* retVal___ = NULL;
+ if( HPMHooks.count.HP_gstorage_id2storage_pre ) {
+ struct guild_storage* (*preHookFunc) (int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_id2storage_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.gstorage.id2storage(guild_id);
+ }
+ if( HPMHooks.count.HP_gstorage_id2storage_post ) {
+ struct guild_storage* (*postHookFunc) (struct guild_storage* retVal___, int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_id2storage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id);
+ }
+ }
+ return retVal___;
+}
+struct guild_storage* HP_gstorage_id2storage2(int guild_id) {
+ int hIndex = 0;
+ struct guild_storage* retVal___ = NULL;
+ if( HPMHooks.count.HP_gstorage_id2storage2_pre ) {
+ struct guild_storage* (*preHookFunc) (int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_id2storage2_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.gstorage.id2storage2(guild_id);
+ }
+ if( HPMHooks.count.HP_gstorage_id2storage2_post ) {
+ struct guild_storage* (*postHookFunc) (struct guild_storage* retVal___, int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_id2storage2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_id2storage2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id);
+ }
+ }
+ return retVal___;
+}
+void HP_gstorage_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_gstorage_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.gstorage.init();
+ }
+ if( HPMHooks.count.HP_gstorage_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_gstorage_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_gstorage_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.gstorage.final();
+ }
+ if( HPMHooks.count.HP_gstorage_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_gstorage_delete(int guild_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_gstorage_delete_pre ) {
+ int (*preHookFunc) (int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.gstorage.delete(guild_id);
+ }
+ if( HPMHooks.count.HP_gstorage_delete_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id);
+ }
+ }
+ return retVal___;
+}
+int HP_gstorage_open(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_gstorage_open_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_open_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_open_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.gstorage.open(sd);
+ }
+ if( HPMHooks.count.HP_gstorage_open_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_open_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_open_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_gstorage_additem(struct map_session_data *sd, struct guild_storage *stor, struct item *item_data, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_gstorage_additem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct guild_storage *stor, struct item *item_data, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_additem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_additem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, stor, item_data, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.gstorage.additem(sd, stor, item_data, amount);
+ }
+ if( HPMHooks.count.HP_gstorage_additem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct guild_storage *stor, struct item *item_data, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_additem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_additem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, stor, item_data, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_gstorage_delitem(struct map_session_data *sd, struct guild_storage *stor, int n, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_gstorage_delitem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct guild_storage *stor, int *n, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_delitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, stor, &n, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.gstorage.delitem(sd, stor, n, amount);
+ }
+ if( HPMHooks.count.HP_gstorage_delitem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct guild_storage *stor, int *n, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_delitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, stor, &n, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_gstorage_add(struct map_session_data *sd, int index, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_gstorage_add_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_add_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &index, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.gstorage.add(sd, index, amount);
+ }
+ if( HPMHooks.count.HP_gstorage_add_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_add_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &index, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_gstorage_get(struct map_session_data *sd, int index, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_gstorage_get_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_get_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_get_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &index, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.gstorage.get(sd, index, amount);
+ }
+ if( HPMHooks.count.HP_gstorage_get_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_get_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_get_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &index, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_gstorage_addfromcart(struct map_session_data *sd, int index, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_gstorage_addfromcart_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_addfromcart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_addfromcart_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &index, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.gstorage.addfromcart(sd, index, amount);
+ }
+ if( HPMHooks.count.HP_gstorage_addfromcart_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_addfromcart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_addfromcart_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &index, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_gstorage_gettocart(struct map_session_data *sd, int index, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_gstorage_gettocart_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_gettocart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_gettocart_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &index, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.gstorage.gettocart(sd, index, amount);
+ }
+ if( HPMHooks.count.HP_gstorage_gettocart_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_gettocart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_gettocart_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &index, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_gstorage_close(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_gstorage_close_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_close_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_close_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.gstorage.close(sd);
+ }
+ if( HPMHooks.count.HP_gstorage_close_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_close_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_close_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_gstorage_pc_quit(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_gstorage_pc_quit_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_pc_quit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_pc_quit_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.gstorage.pc_quit(sd, flag);
+ }
+ if( HPMHooks.count.HP_gstorage_pc_quit_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_pc_quit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_pc_quit_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_gstorage_save(int account_id, int guild_id, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_gstorage_save_pre ) {
+ int (*preHookFunc) (int *account_id, int *guild_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_save_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_save_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, &guild_id, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.gstorage.save(account_id, guild_id, flag);
+ }
+ if( HPMHooks.count.HP_gstorage_save_post ) {
+ int (*postHookFunc) (int retVal___, int *account_id, int *guild_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_save_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_save_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, &guild_id, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_gstorage_saved(int guild_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_gstorage_saved_pre ) {
+ int (*preHookFunc) (int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_saved_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_gstorage_saved_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.gstorage.saved(guild_id);
+ }
+ if( HPMHooks.count.HP_gstorage_saved_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_saved_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_gstorage_saved_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id);
+ }
+ }
+ return retVal___;
+}
+DBData HP_gstorage_create(DBKey key, va_list args) {
+ int hIndex = 0;
+ DBData retVal___;
+ memset(&retVal___, '\0', sizeof(DBData));
+ if( HPMHooks.count.HP_gstorage_create_pre ) {
+ DBData (*preHookFunc) (DBKey *key, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_create_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_gstorage_create_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.gstorage.create(key, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_gstorage_create_post ) {
+ DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_create_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_gstorage_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+/* homun */
+void HP_homun_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.init();
+ }
+ if( HPMHooks.count.HP_homun_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_homun_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.final();
+ }
+ if( HPMHooks.count.HP_homun_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_homun_reload(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_reload_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_reload_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.reload();
+ }
+ if( HPMHooks.count.HP_homun_reload_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_reload_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_homun_reload_skill(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_reload_skill_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_skill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_reload_skill_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.reload_skill();
+ }
+ if( HPMHooks.count.HP_homun_reload_skill_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_skill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_reload_skill_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+struct view_data* HP_homun_get_viewdata(int class_) {
+ int hIndex = 0;
+ struct view_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_homun_get_viewdata_pre ) {
+ struct view_data* (*preHookFunc) (int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_viewdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_get_viewdata_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.get_viewdata(class_);
+ }
+ if( HPMHooks.count.HP_homun_get_viewdata_post ) {
+ struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_viewdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_get_viewdata_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_);
+ }
+ }
+ return retVal___;
+}
+enum homun_type HP_homun_class2type(int class_) {
+ int hIndex = 0;
+ enum homun_type retVal___;
+ memset(&retVal___, '\0', sizeof(enum homun_type));
+ if( HPMHooks.count.HP_homun_class2type_pre ) {
+ enum homun_type (*preHookFunc) (int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_class2type_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_class2type_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.class2type(class_);
+ }
+ if( HPMHooks.count.HP_homun_class2type_post ) {
+ enum homun_type (*postHookFunc) (enum homun_type retVal___, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_class2type_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_class2type_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_);
+ }
+ }
+ return retVal___;
+}
+void HP_homun_damaged(struct homun_data *hd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_damaged_pre ) {
+ void (*preHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_damaged_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_damaged_pre[hIndex].func;
+ preHookFunc(hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.damaged(hd);
+ }
+ if( HPMHooks.count.HP_homun_damaged_post ) {
+ void (*postHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_damaged_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_damaged_post[hIndex].func;
+ postHookFunc(hd);
+ }
+ }
+ return;
+}
+int HP_homun_dead(struct homun_data *hd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_homun_dead_pre ) {
+ int (*preHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_dead_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_dead_pre[hIndex].func;
+ retVal___ = preHookFunc(hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.dead(hd);
+ }
+ if( HPMHooks.count.HP_homun_dead_post ) {
+ int (*postHookFunc) (int retVal___, struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_dead_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_dead_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd);
+ }
+ }
+ return retVal___;
+}
+int HP_homun_vaporize(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_homun_vaporize_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_vaporize_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_vaporize_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.vaporize(sd, flag);
+ }
+ if( HPMHooks.count.HP_homun_vaporize_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_vaporize_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_vaporize_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_homun_delete(struct homun_data *hd, int emote) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_homun_delete_pre ) {
+ int (*preHookFunc) (struct homun_data *hd, int *emote);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(hd, &emote);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.delete(hd, emote);
+ }
+ if( HPMHooks.count.HP_homun_delete_post ) {
+ int (*postHookFunc) (int retVal___, struct homun_data *hd, int *emote);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd, &emote);
+ }
+ }
+ return retVal___;
+}
+int HP_homun_checkskill(struct homun_data *hd, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_homun_checkskill_pre ) {
+ int (*preHookFunc) (struct homun_data *hd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_checkskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_checkskill_pre[hIndex].func;
+ retVal___ = preHookFunc(hd, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.checkskill(hd, skill_id);
+ }
+ if( HPMHooks.count.HP_homun_checkskill_post ) {
+ int (*postHookFunc) (int retVal___, struct homun_data *hd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_checkskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_checkskill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_homun_calc_skilltree(struct homun_data *hd, int flag_evolve) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_homun_calc_skilltree_pre ) {
+ int (*preHookFunc) (struct homun_data *hd, int *flag_evolve);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_calc_skilltree_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_calc_skilltree_pre[hIndex].func;
+ retVal___ = preHookFunc(hd, &flag_evolve);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.calc_skilltree(hd, flag_evolve);
+ }
+ if( HPMHooks.count.HP_homun_calc_skilltree_post ) {
+ int (*postHookFunc) (int retVal___, struct homun_data *hd, int *flag_evolve);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_calc_skilltree_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_calc_skilltree_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd, &flag_evolve);
+ }
+ }
+ return retVal___;
+}
+int HP_homun_skill_tree_get_max(int id, int b_class) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_homun_skill_tree_get_max_pre ) {
+ int (*preHookFunc) (int *id, int *b_class);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_tree_get_max_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_skill_tree_get_max_pre[hIndex].func;
+ retVal___ = preHookFunc(&id, &b_class);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.skill_tree_get_max(id, b_class);
+ }
+ if( HPMHooks.count.HP_homun_skill_tree_get_max_post ) {
+ int (*postHookFunc) (int retVal___, int *id, int *b_class);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_tree_get_max_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_skill_tree_get_max_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id, &b_class);
+ }
+ }
+ return retVal___;
+}
+void HP_homun_skillup(struct homun_data *hd, uint16 skill_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_skillup_pre ) {
+ void (*preHookFunc) (struct homun_data *hd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skillup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_skillup_pre[hIndex].func;
+ preHookFunc(hd, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.skillup(hd, skill_id);
+ }
+ if( HPMHooks.count.HP_homun_skillup_post ) {
+ void (*postHookFunc) (struct homun_data *hd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skillup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_skillup_post[hIndex].func;
+ postHookFunc(hd, &skill_id);
+ }
+ }
+ return;
+}
+bool HP_homun_levelup(struct homun_data *hd) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_homun_levelup_pre ) {
+ bool (*preHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_levelup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_levelup_pre[hIndex].func;
+ retVal___ = preHookFunc(hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.levelup(hd);
+ }
+ if( HPMHooks.count.HP_homun_levelup_post ) {
+ bool (*postHookFunc) (bool retVal___, struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_levelup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_levelup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd);
+ }
+ }
+ return retVal___;
+}
+int HP_homun_change_class(struct homun_data *hd, short class_) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_homun_change_class_pre ) {
+ int (*preHookFunc) (struct homun_data *hd, short *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_change_class_pre[hIndex].func;
+ retVal___ = preHookFunc(hd, &class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.change_class(hd, class_);
+ }
+ if( HPMHooks.count.HP_homun_change_class_post ) {
+ int (*postHookFunc) (int retVal___, struct homun_data *hd, short *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_change_class_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd, &class_);
+ }
+ }
+ return retVal___;
+}
+bool HP_homun_evolve(struct homun_data *hd) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_homun_evolve_pre ) {
+ bool (*preHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_evolve_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_evolve_pre[hIndex].func;
+ retVal___ = preHookFunc(hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.evolve(hd);
+ }
+ if( HPMHooks.count.HP_homun_evolve_post ) {
+ bool (*postHookFunc) (bool retVal___, struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_evolve_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_evolve_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd);
+ }
+ }
+ return retVal___;
+}
+bool HP_homun_mutate(struct homun_data *hd, int homun_id) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_homun_mutate_pre ) {
+ bool (*preHookFunc) (struct homun_data *hd, int *homun_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_mutate_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_mutate_pre[hIndex].func;
+ retVal___ = preHookFunc(hd, &homun_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.mutate(hd, homun_id);
+ }
+ if( HPMHooks.count.HP_homun_mutate_post ) {
+ bool (*postHookFunc) (bool retVal___, struct homun_data *hd, int *homun_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_mutate_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_mutate_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd, &homun_id);
+ }
+ }
+ return retVal___;
+}
+int HP_homun_gainexp(struct homun_data *hd, unsigned int exp) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_homun_gainexp_pre ) {
+ int (*preHookFunc) (struct homun_data *hd, unsigned int *exp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_gainexp_pre[hIndex].func;
+ retVal___ = preHookFunc(hd, &exp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.gainexp(hd, exp);
+ }
+ if( HPMHooks.count.HP_homun_gainexp_post ) {
+ int (*postHookFunc) (int retVal___, struct homun_data *hd, unsigned int *exp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_gainexp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd, &exp);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_homun_add_intimacy(struct homun_data *hd, unsigned int value) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_homun_add_intimacy_pre ) {
+ unsigned int (*preHookFunc) (struct homun_data *hd, unsigned int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_add_intimacy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_add_intimacy_pre[hIndex].func;
+ retVal___ = preHookFunc(hd, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.add_intimacy(hd, value);
+ }
+ if( HPMHooks.count.HP_homun_add_intimacy_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, struct homun_data *hd, unsigned int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_add_intimacy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_add_intimacy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd, &value);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_homun_consume_intimacy(struct homun_data *hd, unsigned int value) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_homun_consume_intimacy_pre ) {
+ unsigned int (*preHookFunc) (struct homun_data *hd, unsigned int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_consume_intimacy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_consume_intimacy_pre[hIndex].func;
+ retVal___ = preHookFunc(hd, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.consume_intimacy(hd, value);
+ }
+ if( HPMHooks.count.HP_homun_consume_intimacy_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, struct homun_data *hd, unsigned int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_consume_intimacy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_consume_intimacy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd, &value);
+ }
+ }
+ return retVal___;
+}
+void HP_homun_healed(struct homun_data *hd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_healed_pre ) {
+ void (*preHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_healed_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_healed_pre[hIndex].func;
+ preHookFunc(hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.healed(hd);
+ }
+ if( HPMHooks.count.HP_homun_healed_post ) {
+ void (*postHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_healed_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_healed_post[hIndex].func;
+ postHookFunc(hd);
+ }
+ }
+ return;
+}
+void HP_homun_save(struct homun_data *hd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_save_pre ) {
+ void (*preHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_save_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_save_pre[hIndex].func;
+ preHookFunc(hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.save(hd);
+ }
+ if( HPMHooks.count.HP_homun_save_post ) {
+ void (*postHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_save_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_save_post[hIndex].func;
+ postHookFunc(hd);
+ }
+ }
+ return;
+}
+unsigned char HP_homun_menu(struct map_session_data *sd, unsigned char menu_num) {
+ int hIndex = 0;
+ unsigned char retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned char));
+ if( HPMHooks.count.HP_homun_menu_pre ) {
+ unsigned char (*preHookFunc) (struct map_session_data *sd, unsigned char *menu_num);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_menu_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_menu_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &menu_num);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.menu(sd, menu_num);
+ }
+ if( HPMHooks.count.HP_homun_menu_post ) {
+ unsigned char (*postHookFunc) (unsigned char retVal___, struct map_session_data *sd, unsigned char *menu_num);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_menu_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_menu_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &menu_num);
+ }
+ }
+ return retVal___;
+}
+bool HP_homun_feed(struct map_session_data *sd, struct homun_data *hd) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_homun_feed_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_feed_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_feed_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.feed(sd, hd);
+ }
+ if( HPMHooks.count.HP_homun_feed_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_feed_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_feed_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, hd);
+ }
+ }
+ return retVal___;
+}
+int HP_homun_hunger_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_homun_hunger_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_hunger_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.hunger_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_homun_hunger_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_hunger_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_homun_hunger_timer_delete(struct homun_data *hd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_hunger_timer_delete_pre ) {
+ void (*preHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_hunger_timer_delete_pre[hIndex].func;
+ preHookFunc(hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.hunger_timer_delete(hd);
+ }
+ if( HPMHooks.count.HP_homun_hunger_timer_delete_post ) {
+ void (*postHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_hunger_timer_delete_post[hIndex].func;
+ postHookFunc(hd);
+ }
+ }
+ return;
+}
+int HP_homun_change_name(struct map_session_data *sd, char *name) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_homun_change_name_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_change_name_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.change_name(sd, name);
+ }
+ if( HPMHooks.count.HP_homun_change_name_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_change_name_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, name);
+ }
+ }
+ return retVal___;
+}
+bool HP_homun_change_name_ack(struct map_session_data *sd, char *name, int flag) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_homun_change_name_ack_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, char *name, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_change_name_ack_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, name, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.change_name_ack(sd, name, flag);
+ }
+ if( HPMHooks.count.HP_homun_change_name_ack_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, char *name, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_change_name_ack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, name, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_homun_db_search(int key, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_homun_db_search_pre ) {
+ int (*preHookFunc) (int *key, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_db_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_db_search_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.db_search(key, type);
+ }
+ if( HPMHooks.count.HP_homun_db_search_post ) {
+ int (*postHookFunc) (int retVal___, int *key, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_db_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_db_search_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, &type);
+ }
+ }
+ return retVal___;
+}
+bool HP_homun_create(struct map_session_data *sd, struct s_homunculus *hom) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_homun_create_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, struct s_homunculus *hom);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_create_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, hom);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.create(sd, hom);
+ }
+ if( HPMHooks.count.HP_homun_create_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct s_homunculus *hom);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, hom);
+ }
+ }
+ return retVal___;
+}
+void HP_homun_init_timers(struct homun_data *hd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_init_timers_pre ) {
+ void (*preHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_timers_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_init_timers_pre[hIndex].func;
+ preHookFunc(hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.init_timers(hd);
+ }
+ if( HPMHooks.count.HP_homun_init_timers_post ) {
+ void (*postHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_timers_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_init_timers_post[hIndex].func;
+ postHookFunc(hd);
+ }
+ }
+ return;
+}
+bool HP_homun_call(struct map_session_data *sd) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_homun_call_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_call_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_call_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.call(sd);
+ }
+ if( HPMHooks.count.HP_homun_call_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_call_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_call_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+bool HP_homun_recv_data(int account_id, struct s_homunculus *sh, int flag) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_homun_recv_data_pre ) {
+ bool (*preHookFunc) (int *account_id, struct s_homunculus *sh, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_recv_data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_recv_data_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, sh, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.recv_data(account_id, sh, flag);
+ }
+ if( HPMHooks.count.HP_homun_recv_data_post ) {
+ bool (*postHookFunc) (bool retVal___, int *account_id, struct s_homunculus *sh, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_recv_data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_recv_data_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, sh, &flag);
+ }
+ }
+ return retVal___;
+}
+bool HP_homun_creation_request(struct map_session_data *sd, int class_) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_homun_creation_request_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_creation_request_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_creation_request_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.creation_request(sd, class_);
+ }
+ if( HPMHooks.count.HP_homun_creation_request_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_creation_request_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_creation_request_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &class_);
+ }
+ }
+ return retVal___;
+}
+bool HP_homun_ressurect(struct map_session_data *sd, unsigned char per, short x, short y) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_homun_ressurect_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, unsigned char *per, short *x, short *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_ressurect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_ressurect_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &per, &x, &y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.ressurect(sd, per, x, y);
+ }
+ if( HPMHooks.count.HP_homun_ressurect_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned char *per, short *x, short *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_ressurect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_ressurect_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &per, &x, &y);
+ }
+ }
+ return retVal___;
+}
+void HP_homun_revive(struct homun_data *hd, unsigned int hp, unsigned int sp) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_revive_pre ) {
+ void (*preHookFunc) (struct homun_data *hd, unsigned int *hp, unsigned int *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_revive_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_revive_pre[hIndex].func;
+ preHookFunc(hd, &hp, &sp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.revive(hd, hp, sp);
+ }
+ if( HPMHooks.count.HP_homun_revive_post ) {
+ void (*postHookFunc) (struct homun_data *hd, unsigned int *hp, unsigned int *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_revive_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_revive_post[hIndex].func;
+ postHookFunc(hd, &hp, &sp);
+ }
+ }
+ return;
+}
+void HP_homun_stat_reset(struct homun_data *hd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_stat_reset_pre ) {
+ void (*preHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_stat_reset_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_stat_reset_pre[hIndex].func;
+ preHookFunc(hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.stat_reset(hd);
+ }
+ if( HPMHooks.count.HP_homun_stat_reset_post ) {
+ void (*postHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_stat_reset_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_stat_reset_post[hIndex].func;
+ postHookFunc(hd);
+ }
+ }
+ return;
+}
+bool HP_homun_shuffle(struct homun_data *hd) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_homun_shuffle_pre ) {
+ bool (*preHookFunc) (struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_shuffle_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_shuffle_pre[hIndex].func;
+ retVal___ = preHookFunc(hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.shuffle(hd);
+ }
+ if( HPMHooks.count.HP_homun_shuffle_post ) {
+ bool (*postHookFunc) (bool retVal___, struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_shuffle_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_shuffle_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd);
+ }
+ }
+ return retVal___;
+}
+bool HP_homun_read_db_sub(char *str[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_homun_read_db_sub_pre ) {
+ bool (*preHookFunc) (char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_read_db_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.read_db_sub(str, columns, current);
+ }
+ if( HPMHooks.count.HP_homun_read_db_sub_post ) {
+ bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_read_db_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+void HP_homun_read_db(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_read_db_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_read_db_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.read_db();
+ }
+ if( HPMHooks.count.HP_homun_read_db_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_read_db_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_homun_read_skill_db_sub(char *split[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_homun_read_skill_db_sub_pre ) {
+ bool (*preHookFunc) (char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_skill_db_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_read_skill_db_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.read_skill_db_sub(split, columns, current);
+ }
+ if( HPMHooks.count.HP_homun_read_skill_db_sub_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_skill_db_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_read_skill_db_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+void HP_homun_skill_db_read(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_skill_db_read_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_db_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_skill_db_read_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.skill_db_read();
+ }
+ if( HPMHooks.count.HP_homun_skill_db_read_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_db_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_skill_db_read_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_homun_exp_db_read(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_exp_db_read_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_exp_db_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_exp_db_read_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.exp_db_read();
+ }
+ if( HPMHooks.count.HP_homun_exp_db_read_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_exp_db_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_exp_db_read_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_homun_addspiritball(struct homun_data *hd, int max) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_addspiritball_pre ) {
+ void (*preHookFunc) (struct homun_data *hd, int *max);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_addspiritball_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_addspiritball_pre[hIndex].func;
+ preHookFunc(hd, &max);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.addspiritball(hd, max);
+ }
+ if( HPMHooks.count.HP_homun_addspiritball_post ) {
+ void (*postHookFunc) (struct homun_data *hd, int *max);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_addspiritball_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_addspiritball_post[hIndex].func;
+ postHookFunc(hd, &max);
+ }
+ }
+ return;
+}
+void HP_homun_delspiritball(struct homun_data *hd, int count, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_homun_delspiritball_pre ) {
+ void (*preHookFunc) (struct homun_data *hd, int *count, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delspiritball_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_homun_delspiritball_pre[hIndex].func;
+ preHookFunc(hd, &count, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.homun.delspiritball(hd, count, type);
+ }
+ if( HPMHooks.count.HP_homun_delspiritball_post ) {
+ void (*postHookFunc) (struct homun_data *hd, int *count, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delspiritball_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_homun_delspiritball_post[hIndex].func;
+ postHookFunc(hd, &count, &type);
+ }
+ }
+ return;
+}
+/* instance */
+void HP_instance_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_instance_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.instance.init();
+ }
+ if( HPMHooks.count.HP_instance_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_instance_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_instance_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.instance.final();
+ }
+ if( HPMHooks.count.HP_instance_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_instance_create(int party_id, const char *name, enum instance_owner_type type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_instance_create_pre ) {
+ int (*preHookFunc) (int *party_id, const char *name, enum instance_owner_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_create_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, name, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.instance.create(party_id, name, type);
+ }
+ if( HPMHooks.count.HP_instance_create_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id, const char *name, enum instance_owner_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, name, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_instance_add_map(const char *name, int instance_id, bool usebasename, const char *map_name) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_instance_add_map_pre ) {
+ int (*preHookFunc) (const char *name, int *instance_id, bool *usebasename, const char *map_name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_add_map_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_add_map_pre[hIndex].func;
+ retVal___ = preHookFunc(name, &instance_id, &usebasename, map_name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.instance.add_map(name, instance_id, usebasename, map_name);
+ }
+ if( HPMHooks.count.HP_instance_add_map_post ) {
+ int (*postHookFunc) (int retVal___, const char *name, int *instance_id, bool *usebasename, const char *map_name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_add_map_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_add_map_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name, &instance_id, &usebasename, map_name);
+ }
+ }
+ return retVal___;
+}
+void HP_instance_del_map(int16 m) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_instance_del_map_pre ) {
+ void (*preHookFunc) (int16 *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_del_map_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_del_map_pre[hIndex].func;
+ preHookFunc(&m);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.instance.del_map(m);
+ }
+ if( HPMHooks.count.HP_instance_del_map_post ) {
+ void (*postHookFunc) (int16 *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_del_map_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_del_map_post[hIndex].func;
+ postHookFunc(&m);
+ }
+ }
+ return;
+}
+int HP_instance_map2imap(int16 m, int instance_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_instance_map2imap_pre ) {
+ int (*preHookFunc) (int16 *m, int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map2imap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_map2imap_pre[hIndex].func;
+ retVal___ = preHookFunc(&m, &instance_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.instance.map2imap(m, instance_id);
+ }
+ if( HPMHooks.count.HP_instance_map2imap_post ) {
+ int (*postHookFunc) (int retVal___, int16 *m, int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map2imap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_map2imap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &m, &instance_id);
+ }
+ }
+ return retVal___;
+}
+int HP_instance_mapid2imapid(int16 m, int instance_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_instance_mapid2imapid_pre ) {
+ int (*preHookFunc) (int16 *m, int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapid2imapid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_mapid2imapid_pre[hIndex].func;
+ retVal___ = preHookFunc(&m, &instance_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.instance.mapid2imapid(m, instance_id);
+ }
+ if( HPMHooks.count.HP_instance_mapid2imapid_post ) {
+ int (*postHookFunc) (int retVal___, int16 *m, int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapid2imapid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_mapid2imapid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &m, &instance_id);
+ }
+ }
+ return retVal___;
+}
+void HP_instance_destroy(int instance_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_instance_destroy_pre ) {
+ void (*preHookFunc) (int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_destroy_pre[hIndex].func;
+ preHookFunc(&instance_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.instance.destroy(instance_id);
+ }
+ if( HPMHooks.count.HP_instance_destroy_post ) {
+ void (*postHookFunc) (int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_destroy_post[hIndex].func;
+ postHookFunc(&instance_id);
+ }
+ }
+ return;
+}
+void HP_instance_start(int instance_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_instance_start_pre ) {
+ void (*preHookFunc) (int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_start_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_start_pre[hIndex].func;
+ preHookFunc(&instance_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.instance.start(instance_id);
+ }
+ if( HPMHooks.count.HP_instance_start_post ) {
+ void (*postHookFunc) (int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_start_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_start_post[hIndex].func;
+ postHookFunc(&instance_id);
+ }
+ }
+ return;
+}
+void HP_instance_check_idle(int instance_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_instance_check_idle_pre ) {
+ void (*preHookFunc) (int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_idle_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_check_idle_pre[hIndex].func;
+ preHookFunc(&instance_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.instance.check_idle(instance_id);
+ }
+ if( HPMHooks.count.HP_instance_check_idle_post ) {
+ void (*postHookFunc) (int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_idle_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_check_idle_post[hIndex].func;
+ postHookFunc(&instance_id);
+ }
+ }
+ return;
+}
+void HP_instance_check_kick(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_instance_check_kick_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_kick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_check_kick_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.instance.check_kick(sd);
+ }
+ if( HPMHooks.count.HP_instance_check_kick_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_kick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_check_kick_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_instance_set_timeout(int instance_id, unsigned int progress_timeout, unsigned int idle_timeout) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_instance_set_timeout_pre ) {
+ void (*preHookFunc) (int *instance_id, unsigned int *progress_timeout, unsigned int *idle_timeout);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_set_timeout_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_set_timeout_pre[hIndex].func;
+ preHookFunc(&instance_id, &progress_timeout, &idle_timeout);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.instance.set_timeout(instance_id, progress_timeout, idle_timeout);
+ }
+ if( HPMHooks.count.HP_instance_set_timeout_post ) {
+ void (*postHookFunc) (int *instance_id, unsigned int *progress_timeout, unsigned int *idle_timeout);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_set_timeout_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_set_timeout_post[hIndex].func;
+ postHookFunc(&instance_id, &progress_timeout, &idle_timeout);
+ }
+ }
+ return;
+}
+bool HP_instance_valid(int instance_id) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_instance_valid_pre ) {
+ bool (*preHookFunc) (int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_valid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_valid_pre[hIndex].func;
+ retVal___ = preHookFunc(&instance_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.instance.valid(instance_id);
+ }
+ if( HPMHooks.count.HP_instance_valid_post ) {
+ bool (*postHookFunc) (bool retVal___, int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_valid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_valid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &instance_id);
+ }
+ }
+ return retVal___;
+}
+int HP_instance_destroy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_instance_destroy_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_destroy_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.instance.destroy_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_instance_destroy_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_destroy_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+/* intif */
+int HP_intif_parse(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_parse_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_parse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_parse_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.parse(fd);
+ }
+ if( HPMHooks.count.HP_intif_parse_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_parse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_parse_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_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 hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_create_pet_pre ) {
+ int (*preHookFunc) (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);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_create_pet_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, &char_id, &pet_type, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incuvate, pet_name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.create_pet(account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incuvate, pet_name);
+ }
+ if( HPMHooks.count.HP_intif_create_pet_post ) {
+ int (*postHookFunc) (int retVal___, 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);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_create_pet_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, &char_id, &pet_type, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incuvate, pet_name);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_broadcast(const char *mes, int len, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_broadcast_pre ) {
+ int (*preHookFunc) (const char *mes, int *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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ 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);
+ 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);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_broadcast2(const char *mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ 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);
+ 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ 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);
+ 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);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_main_message(struct map_session_data *sd, const char *message) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_main_message_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_main_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_main_message_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, message);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.main_message(sd, message);
+ }
+ if( HPMHooks.count.HP_intif_main_message_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_main_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_main_message_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, message);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int mes_len) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_wis_message_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, char *nick, char *mes, int *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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ 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);
+ 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);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_wis_message_to_gm(char *Wisp_name, int permission, char *mes) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_wis_message_to_gm_pre ) {
+ int (*preHookFunc) (char *Wisp_name, int *permission, char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_to_gm_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_wis_message_to_gm_pre[hIndex].func;
+ retVal___ = preHookFunc(Wisp_name, &permission, mes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.wis_message_to_gm(Wisp_name, permission, mes);
+ }
+ if( HPMHooks.count.HP_intif_wis_message_to_gm_post ) {
+ int (*postHookFunc) (int retVal___, char *Wisp_name, int *permission, char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_to_gm_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_wis_message_to_gm_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, Wisp_name, &permission, mes);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_saveregistry(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_saveregistry_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_saveregistry_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_saveregistry_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.saveregistry(sd, type);
+ }
+ if( HPMHooks.count.HP_intif_saveregistry_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_saveregistry_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_saveregistry_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_request_registry(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_request_registry_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_registry_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_request_registry_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.request_registry(sd, flag);
+ }
+ if( HPMHooks.count.HP_intif_request_registry_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_registry_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_request_registry_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_request_guild_storage(int account_id, int guild_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_request_guild_storage_pre ) {
+ int (*preHookFunc) (int *account_id, int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_guild_storage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_request_guild_storage_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, &guild_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.request_guild_storage(account_id, guild_id);
+ }
+ if( HPMHooks.count.HP_intif_request_guild_storage_post ) {
+ int (*postHookFunc) (int retVal___, int *account_id, int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_guild_storage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_request_guild_storage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, &guild_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_send_guild_storage(int account_id, struct guild_storage *gstor) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_send_guild_storage_pre ) {
+ int (*preHookFunc) (int *account_id, struct guild_storage *gstor);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_guild_storage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_send_guild_storage_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, gstor);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.send_guild_storage(account_id, gstor);
+ }
+ if( HPMHooks.count.HP_intif_send_guild_storage_post ) {
+ int (*postHookFunc) (int retVal___, int *account_id, struct guild_storage *gstor);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_guild_storage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_send_guild_storage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, gstor);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_create_party(struct party_member *member, char *name, int item, int item2) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_create_party_pre ) {
+ int (*preHookFunc) (struct party_member *member, char *name, int *item, int *item2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_party_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_create_party_pre[hIndex].func;
+ retVal___ = preHookFunc(member, name, &item, &item2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.create_party(member, name, item, item2);
+ }
+ if( HPMHooks.count.HP_intif_create_party_post ) {
+ int (*postHookFunc) (int retVal___, struct party_member *member, char *name, int *item, int *item2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_party_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_create_party_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, member, name, &item, &item2);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_request_partyinfo(int party_id, int char_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_request_partyinfo_pre ) {
+ int (*preHookFunc) (int *party_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_partyinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_request_partyinfo_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.request_partyinfo(party_id, char_id);
+ }
+ if( HPMHooks.count.HP_intif_request_partyinfo_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_partyinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_request_partyinfo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, &char_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_party_addmember(int party_id, struct party_member *member) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_party_addmember_pre ) {
+ int (*preHookFunc) (int *party_id, struct party_member *member);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_addmember_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_party_addmember_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, member);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.party_addmember(party_id, member);
+ }
+ if( HPMHooks.count.HP_intif_party_addmember_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id, struct party_member *member);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_addmember_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_party_addmember_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, member);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_party_changeoption(int party_id, int account_id, int exp, int item) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_party_changeoption_pre ) {
+ int (*preHookFunc) (int *party_id, int *account_id, int *exp, int *item);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changeoption_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_party_changeoption_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, &account_id, &exp, &item);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.party_changeoption(party_id, account_id, exp, item);
+ }
+ if( HPMHooks.count.HP_intif_party_changeoption_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *exp, int *item);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changeoption_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_party_changeoption_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, &account_id, &exp, &item);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_party_leave(int party_id, int account_id, int char_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_party_leave_pre ) {
+ int (*preHookFunc) (int *party_id, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_leave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_party_leave_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, &account_id, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.party_leave(party_id, account_id, char_id);
+ }
+ if( HPMHooks.count.HP_intif_party_leave_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_leave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_party_leave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_party_changemap(struct map_session_data *sd, int online) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_party_changemap_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *online);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changemap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_party_changemap_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &online);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.party_changemap(sd, online);
+ }
+ if( HPMHooks.count.HP_intif_party_changemap_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *online);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changemap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_party_changemap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &online);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_break_party(int party_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_break_party_pre ) {
+ int (*preHookFunc) (int *party_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_break_party_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_break_party_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.break_party(party_id);
+ }
+ if( HPMHooks.count.HP_intif_break_party_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_break_party_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_break_party_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_party_message(int party_id, int account_id, const char *mes, int len) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_party_message_pre ) {
+ int (*preHookFunc) (int *party_id, int *account_id, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_party_message_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, &account_id, mes, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.party_message(party_id, account_id, mes, len);
+ }
+ if( HPMHooks.count.HP_intif_party_message_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id, int *account_id, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_party_message_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, &account_id, mes, &len);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_party_leaderchange(int party_id, int account_id, int char_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_party_leaderchange_pre ) {
+ int (*preHookFunc) (int *party_id, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_leaderchange_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_party_leaderchange_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, &account_id, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.party_leaderchange(party_id, account_id, char_id);
+ }
+ if( HPMHooks.count.HP_intif_party_leaderchange_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_leaderchange_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_party_leaderchange_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_create(const char *name, const struct guild_member *master) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_create_pre ) {
+ int (*preHookFunc) (const char *name, const struct guild_member *master);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_create_pre[hIndex].func;
+ retVal___ = preHookFunc(name, master);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_create(name, master);
+ }
+ if( HPMHooks.count.HP_intif_guild_create_post ) {
+ int (*postHookFunc) (int retVal___, const char *name, const struct guild_member *master);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name, master);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_request_info(int guild_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_request_info_pre ) {
+ int (*preHookFunc) (int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_request_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_request_info_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_request_info(guild_id);
+ }
+ if( HPMHooks.count.HP_intif_guild_request_info_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_request_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_request_info_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_addmember(int guild_id, struct guild_member *m) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_addmember_pre ) {
+ int (*preHookFunc) (int *guild_id, struct guild_member *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_addmember_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_addmember_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, m);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_addmember(guild_id, m);
+ }
+ if( HPMHooks.count.HP_intif_guild_addmember_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, struct guild_member *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_addmember_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_addmember_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, m);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_leave(int guild_id, int account_id, int char_id, int flag, const char *mes) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_leave_pre ) {
+ int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_leave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_leave_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag, mes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_leave(guild_id, account_id, char_id, flag, mes);
+ }
+ if( HPMHooks.count.HP_intif_guild_leave_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *flag, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_leave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_leave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &flag, mes);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class_) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_memberinfoshort_pre ) {
+ int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_memberinfoshort(guild_id, account_id, char_id, online, lv, class_);
+ }
+ if( HPMHooks.count.HP_intif_guild_memberinfoshort_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &online, &lv, &class_);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_break(int guild_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_break_pre ) {
+ int (*preHookFunc) (int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_break_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_break_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_break(guild_id);
+ }
+ if( HPMHooks.count.HP_intif_guild_break_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_break_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_break_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_message(int guild_id, int account_id, const char *mes, int len) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_message_pre ) {
+ int (*preHookFunc) (int *guild_id, int *account_id, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_message_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &account_id, mes, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_message(guild_id, account_id, mes, len);
+ }
+ if( HPMHooks.count.HP_intif_guild_message_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_message_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &account_id, mes, &len);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_change_gm(int guild_id, const char *name, int len) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_change_gm_pre ) {
+ int (*preHookFunc) (int *guild_id, const char *name, int *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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ 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);
+ 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);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_change_basicinfo(int guild_id, int type, const void *data, int len) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_change_basicinfo_pre ) {
+ int (*preHookFunc) (int *guild_id, int *type, const void *data, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_basicinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_change_basicinfo_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &type, data, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_change_basicinfo(guild_id, type, data, len);
+ }
+ if( HPMHooks.count.HP_intif_guild_change_basicinfo_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *type, const void *data, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_basicinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_change_basicinfo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &type, data, &len);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_change_memberinfo(int guild_id, int account_id, int char_id, int type, const void *data, int len) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_change_memberinfo_pre ) {
+ int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *type, const void *data, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_memberinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_change_memberinfo_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &type, data, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_change_memberinfo(guild_id, account_id, char_id, type, data, len);
+ }
+ if( HPMHooks.count.HP_intif_guild_change_memberinfo_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, int *type, const void *data, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_memberinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_change_memberinfo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &type, data, &len);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_position(int guild_id, int idx, struct guild_position *p) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_position_pre ) {
+ int (*preHookFunc) (int *guild_id, int *idx, struct guild_position *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_position_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_position_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &idx, p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_position(guild_id, idx, p);
+ }
+ if( HPMHooks.count.HP_intif_guild_position_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *idx, struct guild_position *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_position_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_position_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &idx, p);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_skillup(int guild_id, uint16 skill_id, int account_id, int max) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_skillup_pre ) {
+ int (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id, int *max);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_skillup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_skillup_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &skill_id, &account_id, &max);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_skillup(guild_id, skill_id, account_id, max);
+ }
+ if( HPMHooks.count.HP_intif_guild_skillup_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, uint16 *skill_id, int *account_id, int *max);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_skillup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_skillup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &skill_id, &account_id, &max);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int account_id2, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_alliance_pre ) {
+ int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_alliance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_alliance_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id1, &guild_id2, &account_id1, &account_id2, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_alliance(guild_id1, guild_id2, account_id1, account_id2, flag);
+ }
+ if( HPMHooks.count.HP_intif_guild_alliance_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_alliance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_alliance_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id1, &guild_id2, &account_id1, &account_id2, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_notice(int guild_id, const char *mes1, const char *mes2) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_notice_pre ) {
+ int (*preHookFunc) (int *guild_id, const char *mes1, const char *mes2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_notice_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_notice_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, mes1, mes2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_notice(guild_id, mes1, mes2);
+ }
+ if( HPMHooks.count.HP_intif_guild_notice_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, const char *mes1, const char *mes2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_notice_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_notice_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, mes1, mes2);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_emblem(int guild_id, int len, const char *data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_emblem_pre ) {
+ int (*preHookFunc) (int *guild_id, int *len, const char *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_emblem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_emblem_pre[hIndex].func;
+ retVal___ = preHookFunc(&guild_id, &len, data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_emblem(guild_id, len, data);
+ }
+ if( HPMHooks.count.HP_intif_guild_emblem_post ) {
+ int (*postHookFunc) (int retVal___, int *guild_id, int *len, const char *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_emblem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_emblem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &guild_id, &len, data);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_castle_dataload(int num, int *castle_ids) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_castle_dataload_pre ) {
+ int (*preHookFunc) (int *num, int *castle_ids);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_dataload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_castle_dataload_pre[hIndex].func;
+ retVal___ = preHookFunc(&num, castle_ids);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_castle_dataload(num, castle_ids);
+ }
+ if( HPMHooks.count.HP_intif_guild_castle_dataload_post ) {
+ int (*postHookFunc) (int retVal___, int *num, int *castle_ids);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_dataload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_castle_dataload_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &num, castle_ids);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_guild_castle_datasave(int castle_id, int index, int value) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_guild_castle_datasave_pre ) {
+ int (*preHookFunc) (int *castle_id, int *index, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_datasave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_guild_castle_datasave_pre[hIndex].func;
+ retVal___ = preHookFunc(&castle_id, &index, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.guild_castle_datasave(castle_id, index, value);
+ }
+ if( HPMHooks.count.HP_intif_guild_castle_datasave_post ) {
+ int (*postHookFunc) (int retVal___, int *castle_id, int *index, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_datasave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_guild_castle_datasave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &castle_id, &index, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_request_petdata(int account_id, int char_id, int pet_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_request_petdata_pre ) {
+ int (*preHookFunc) (int *account_id, int *char_id, int *pet_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_petdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_request_petdata_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, &char_id, &pet_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.request_petdata(account_id, char_id, pet_id);
+ }
+ if( HPMHooks.count.HP_intif_request_petdata_post ) {
+ int (*postHookFunc) (int retVal___, int *account_id, int *char_id, int *pet_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_petdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_request_petdata_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, &char_id, &pet_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_save_petdata(int account_id, struct s_pet *p) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_save_petdata_pre ) {
+ int (*preHookFunc) (int *account_id, struct s_pet *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_save_petdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_save_petdata_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.save_petdata(account_id, p);
+ }
+ if( HPMHooks.count.HP_intif_save_petdata_post ) {
+ int (*postHookFunc) (int retVal___, int *account_id, struct s_pet *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_save_petdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_save_petdata_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, p);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_delete_petdata(int pet_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_delete_petdata_pre ) {
+ int (*preHookFunc) (int *pet_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_delete_petdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_delete_petdata_pre[hIndex].func;
+ retVal___ = preHookFunc(&pet_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.delete_petdata(pet_id);
+ }
+ if( HPMHooks.count.HP_intif_delete_petdata_post ) {
+ int (*postHookFunc) (int retVal___, int *pet_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_delete_petdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_delete_petdata_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &pet_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_rename(struct map_session_data *sd, int type, char *name) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_rename_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_rename_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_rename_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.rename(sd, type, name);
+ }
+ if( HPMHooks.count.HP_intif_rename_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_rename_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_rename_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type, name);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_homunculus_create(int account_id, struct s_homunculus *sh) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_homunculus_create_pre ) {
+ int (*preHookFunc) (int *account_id, struct s_homunculus *sh);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_homunculus_create_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, sh);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.homunculus_create(account_id, sh);
+ }
+ if( HPMHooks.count.HP_intif_homunculus_create_post ) {
+ int (*postHookFunc) (int retVal___, int *account_id, struct s_homunculus *sh);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_homunculus_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, sh);
+ }
+ }
+ return retVal___;
+}
+bool HP_intif_homunculus_requestload(int account_id, int homun_id) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_intif_homunculus_requestload_pre ) {
+ bool (*preHookFunc) (int *account_id, int *homun_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_homunculus_requestload_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, &homun_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.homunculus_requestload(account_id, homun_id);
+ }
+ if( HPMHooks.count.HP_intif_homunculus_requestload_post ) {
+ bool (*postHookFunc) (bool retVal___, int *account_id, int *homun_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_homunculus_requestload_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, &homun_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_homunculus_requestsave(int account_id, struct s_homunculus *sh) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_homunculus_requestsave_pre ) {
+ int (*preHookFunc) (int *account_id, struct s_homunculus *sh);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestsave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_homunculus_requestsave_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, sh);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.homunculus_requestsave(account_id, sh);
+ }
+ if( HPMHooks.count.HP_intif_homunculus_requestsave_post ) {
+ int (*postHookFunc) (int retVal___, int *account_id, struct s_homunculus *sh);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestsave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_homunculus_requestsave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, sh);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_homunculus_requestdelete(int homun_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_homunculus_requestdelete_pre ) {
+ int (*preHookFunc) (int *homun_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestdelete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_homunculus_requestdelete_pre[hIndex].func;
+ retVal___ = preHookFunc(&homun_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.homunculus_requestdelete(homun_id);
+ }
+ if( HPMHooks.count.HP_intif_homunculus_requestdelete_post ) {
+ int (*postHookFunc) (int retVal___, int *homun_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestdelete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_homunculus_requestdelete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &homun_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_request_questlog(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_request_questlog_pre ) {
+ int (*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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.request_questlog(sd);
+ }
+ if( HPMHooks.count.HP_intif_request_questlog_post ) {
+ int (*postHookFunc) (int retVal___, 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);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_quest_save(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_quest_save_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_quest_save_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_quest_save_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.quest_save(sd);
+ }
+ if( HPMHooks.count.HP_intif_quest_save_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_quest_save_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_quest_save_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_mercenary_create(struct s_mercenary *merc) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_mercenary_create_pre ) {
+ int (*preHookFunc) (struct s_mercenary *merc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_mercenary_create_pre[hIndex].func;
+ retVal___ = preHookFunc(merc);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.mercenary_create(merc);
+ }
+ if( HPMHooks.count.HP_intif_mercenary_create_post ) {
+ int (*postHookFunc) (int retVal___, struct s_mercenary *merc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_mercenary_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, merc);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_mercenary_request(int merc_id, int char_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_mercenary_request_pre ) {
+ int (*preHookFunc) (int *merc_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_request_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_mercenary_request_pre[hIndex].func;
+ retVal___ = preHookFunc(&merc_id, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.mercenary_request(merc_id, char_id);
+ }
+ if( HPMHooks.count.HP_intif_mercenary_request_post ) {
+ int (*postHookFunc) (int retVal___, int *merc_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_request_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_mercenary_request_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &merc_id, &char_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_mercenary_delete(int merc_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_mercenary_delete_pre ) {
+ int (*preHookFunc) (int *merc_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_mercenary_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(&merc_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.mercenary_delete(merc_id);
+ }
+ if( HPMHooks.count.HP_intif_mercenary_delete_post ) {
+ int (*postHookFunc) (int retVal___, int *merc_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_mercenary_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &merc_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_mercenary_save(struct s_mercenary *merc) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_mercenary_save_pre ) {
+ int (*preHookFunc) (struct s_mercenary *merc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_save_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_mercenary_save_pre[hIndex].func;
+ retVal___ = preHookFunc(merc);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.mercenary_save(merc);
+ }
+ if( HPMHooks.count.HP_intif_mercenary_save_post ) {
+ int (*postHookFunc) (int retVal___, struct s_mercenary *merc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_save_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_mercenary_save_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, merc);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_Mail_requestinbox(int char_id, unsigned char flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_Mail_requestinbox_pre ) {
+ int (*preHookFunc) (int *char_id, unsigned char *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_requestinbox_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_Mail_requestinbox_pre[hIndex].func;
+ retVal___ = preHookFunc(&char_id, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.Mail_requestinbox(char_id, flag);
+ }
+ if( HPMHooks.count.HP_intif_Mail_requestinbox_post ) {
+ int (*postHookFunc) (int retVal___, int *char_id, unsigned char *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_requestinbox_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_Mail_requestinbox_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &char_id, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_Mail_read(int mail_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_Mail_read_pre ) {
+ int (*preHookFunc) (int *mail_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_Mail_read_pre[hIndex].func;
+ retVal___ = preHookFunc(&mail_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.Mail_read(mail_id);
+ }
+ if( HPMHooks.count.HP_intif_Mail_read_post ) {
+ int (*postHookFunc) (int retVal___, int *mail_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_Mail_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &mail_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_Mail_getattach(int char_id, int mail_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_Mail_getattach_pre ) {
+ int (*preHookFunc) (int *char_id, int *mail_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_getattach_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_Mail_getattach_pre[hIndex].func;
+ retVal___ = preHookFunc(&char_id, &mail_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.Mail_getattach(char_id, mail_id);
+ }
+ if( HPMHooks.count.HP_intif_Mail_getattach_post ) {
+ int (*postHookFunc) (int retVal___, int *char_id, int *mail_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_getattach_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_Mail_getattach_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &char_id, &mail_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_Mail_delete(int char_id, int mail_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_Mail_delete_pre ) {
+ int (*preHookFunc) (int *char_id, int *mail_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_Mail_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(&char_id, &mail_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.Mail_delete(char_id, mail_id);
+ }
+ if( HPMHooks.count.HP_intif_Mail_delete_post ) {
+ int (*postHookFunc) (int retVal___, int *char_id, int *mail_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_Mail_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &char_id, &mail_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_Mail_return(int char_id, int mail_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_Mail_return_pre ) {
+ int (*preHookFunc) (int *char_id, int *mail_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_return_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_Mail_return_pre[hIndex].func;
+ retVal___ = preHookFunc(&char_id, &mail_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.Mail_return(char_id, mail_id);
+ }
+ if( HPMHooks.count.HP_intif_Mail_return_post ) {
+ int (*postHookFunc) (int retVal___, int *char_id, int *mail_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_return_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_Mail_return_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &char_id, &mail_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_Mail_send(int account_id, struct mail_message *msg) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_Mail_send_pre ) {
+ int (*preHookFunc) (int *account_id, struct mail_message *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_send_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_Mail_send_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.Mail_send(account_id, msg);
+ }
+ if( HPMHooks.count.HP_intif_Mail_send_post ) {
+ int (*postHookFunc) (int retVal___, int *account_id, struct mail_message *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_send_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_Mail_send_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, msg);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_Auction_requestlist(int char_id, short type, int price, const char *searchtext, short page) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_Auction_requestlist_pre ) {
+ int (*preHookFunc) (int *char_id, short *type, int *price, const char *searchtext, short *page);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_requestlist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_Auction_requestlist_pre[hIndex].func;
+ retVal___ = preHookFunc(&char_id, &type, &price, searchtext, &page);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.Auction_requestlist(char_id, type, price, searchtext, page);
+ }
+ if( HPMHooks.count.HP_intif_Auction_requestlist_post ) {
+ int (*postHookFunc) (int retVal___, int *char_id, short *type, int *price, const char *searchtext, short *page);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_requestlist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_Auction_requestlist_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &char_id, &type, &price, searchtext, &page);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_Auction_register(struct auction_data *auction) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_Auction_register_pre ) {
+ int (*preHookFunc) (struct auction_data *auction);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_register_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_Auction_register_pre[hIndex].func;
+ retVal___ = preHookFunc(auction);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.Auction_register(auction);
+ }
+ if( HPMHooks.count.HP_intif_Auction_register_post ) {
+ int (*postHookFunc) (int retVal___, struct auction_data *auction);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_register_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_Auction_register_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, auction);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_Auction_cancel(int char_id, unsigned int auction_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_Auction_cancel_pre ) {
+ int (*preHookFunc) (int *char_id, unsigned int *auction_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_cancel_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_Auction_cancel_pre[hIndex].func;
+ retVal___ = preHookFunc(&char_id, &auction_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.Auction_cancel(char_id, auction_id);
+ }
+ if( HPMHooks.count.HP_intif_Auction_cancel_post ) {
+ int (*postHookFunc) (int retVal___, int *char_id, unsigned int *auction_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_cancel_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_Auction_cancel_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &char_id, &auction_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_Auction_close(int char_id, unsigned int auction_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_Auction_close_pre ) {
+ int (*preHookFunc) (int *char_id, unsigned int *auction_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_close_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_Auction_close_pre[hIndex].func;
+ retVal___ = preHookFunc(&char_id, &auction_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.Auction_close(char_id, auction_id);
+ }
+ if( HPMHooks.count.HP_intif_Auction_close_post ) {
+ int (*postHookFunc) (int retVal___, int *char_id, unsigned int *auction_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_close_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_Auction_close_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &char_id, &auction_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_Auction_bid(int char_id, const char *name, unsigned int auction_id, int bid) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_Auction_bid_pre ) {
+ int (*preHookFunc) (int *char_id, const char *name, unsigned int *auction_id, int *bid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_bid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_Auction_bid_pre[hIndex].func;
+ retVal___ = preHookFunc(&char_id, name, &auction_id, &bid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.Auction_bid(char_id, name, auction_id, bid);
+ }
+ if( HPMHooks.count.HP_intif_Auction_bid_post ) {
+ int (*postHookFunc) (int retVal___, int *char_id, const char *name, unsigned int *auction_id, int *bid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_bid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_Auction_bid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &char_id, name, &auction_id, &bid);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_elemental_create(struct s_elemental *ele) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_elemental_create_pre ) {
+ int (*preHookFunc) (struct s_elemental *ele);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_elemental_create_pre[hIndex].func;
+ retVal___ = preHookFunc(ele);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.elemental_create(ele);
+ }
+ if( HPMHooks.count.HP_intif_elemental_create_post ) {
+ int (*postHookFunc) (int retVal___, struct s_elemental *ele);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_elemental_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ele);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_elemental_request(int ele_id, int char_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_elemental_request_pre ) {
+ int (*preHookFunc) (int *ele_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_request_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_elemental_request_pre[hIndex].func;
+ retVal___ = preHookFunc(&ele_id, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.elemental_request(ele_id, char_id);
+ }
+ if( HPMHooks.count.HP_intif_elemental_request_post ) {
+ int (*postHookFunc) (int retVal___, int *ele_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_request_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_elemental_request_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ele_id, &char_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_elemental_delete(int ele_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_elemental_delete_pre ) {
+ int (*preHookFunc) (int *ele_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_elemental_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(&ele_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.elemental_delete(ele_id);
+ }
+ if( HPMHooks.count.HP_intif_elemental_delete_post ) {
+ int (*postHookFunc) (int retVal___, int *ele_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_elemental_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ele_id);
+ }
+ }
+ return retVal___;
+}
+int HP_intif_elemental_save(struct s_elemental *ele) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_elemental_save_pre ) {
+ int (*preHookFunc) (struct s_elemental *ele);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_save_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_elemental_save_pre[hIndex].func;
+ retVal___ = preHookFunc(ele);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.elemental_save(ele);
+ }
+ if( HPMHooks.count.HP_intif_elemental_save_post ) {
+ int (*postHookFunc) (int retVal___, struct s_elemental *ele);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_save_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_elemental_save_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ele);
+ }
+ }
+ return retVal___;
+}
+void HP_intif_request_accinfo(int u_fd, int aid, int group_lv, char *query) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_request_accinfo_pre ) {
+ void (*preHookFunc) (int *u_fd, int *aid, int *group_lv, char *query);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_accinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_request_accinfo_pre[hIndex].func;
+ preHookFunc(&u_fd, &aid, &group_lv, query);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.request_accinfo(u_fd, aid, group_lv, query);
+ }
+ if( HPMHooks.count.HP_intif_request_accinfo_post ) {
+ void (*postHookFunc) (int *u_fd, int *aid, int *group_lv, char *query);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_accinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_request_accinfo_post[hIndex].func;
+ postHookFunc(&u_fd, &aid, &group_lv, query);
+ }
+ }
+ return;
+}
+int HP_intif_CheckForCharServer(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_CheckForCharServer_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_CheckForCharServer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_CheckForCharServer_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.intif.CheckForCharServer();
+ }
+ if( HPMHooks.count.HP_intif_CheckForCharServer_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_CheckForCharServer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_CheckForCharServer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_intif_pWisMessage(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pWisMessage_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisMessage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pWisMessage_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pWisMessage(fd);
+ }
+ if( HPMHooks.count.HP_intif_pWisMessage_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisMessage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pWisMessage_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pWisEnd(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pWisEnd_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisEnd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pWisEnd_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pWisEnd(fd);
+ }
+ if( HPMHooks.count.HP_intif_pWisEnd_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisEnd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pWisEnd_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+int HP_intif_pWisToGM_sub(struct map_session_data *sd, va_list va) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_intif_pWisToGM_sub_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, va_list va);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_sub_pre; hIndex++ ) {
+ va_list va___copy; va_copy(va___copy, va);
+ preHookFunc = HPMHooks.list.HP_intif_pWisToGM_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, va___copy);
+ va_end(va___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list va___copy; va_copy(va___copy, va);
+ retVal___ = HPMHooks.source.intif.pWisToGM_sub(sd, va___copy);
+ va_end(va___copy);
+ }
+ if( HPMHooks.count.HP_intif_pWisToGM_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list va);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_sub_post; hIndex++ ) {
+ va_list va___copy; va_copy(va___copy, va);
+ postHookFunc = HPMHooks.list.HP_intif_pWisToGM_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, va___copy);
+ va_end(va___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_intif_pWisToGM(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pWisToGM_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pWisToGM_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pWisToGM(fd);
+ }
+ if( HPMHooks.count.HP_intif_pWisToGM_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pWisToGM_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pRegisters(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pRegisters_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRegisters_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pRegisters_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pRegisters(fd);
+ }
+ if( HPMHooks.count.HP_intif_pRegisters_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRegisters_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pRegisters_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pChangeNameOk(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pChangeNameOk_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pChangeNameOk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pChangeNameOk_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pChangeNameOk(fd);
+ }
+ if( HPMHooks.count.HP_intif_pChangeNameOk_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pChangeNameOk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pChangeNameOk_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pMessageToFD(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pMessageToFD_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMessageToFD_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pMessageToFD_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pMessageToFD(fd);
+ }
+ if( HPMHooks.count.HP_intif_pMessageToFD_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMessageToFD_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pMessageToFD_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pLoadGuildStorage(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pLoadGuildStorage_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pLoadGuildStorage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pLoadGuildStorage_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pLoadGuildStorage(fd);
+ }
+ if( HPMHooks.count.HP_intif_pLoadGuildStorage_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pLoadGuildStorage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pLoadGuildStorage_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pSaveGuildStorage(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pSaveGuildStorage_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveGuildStorage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pSaveGuildStorage_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pSaveGuildStorage(fd);
+ }
+ if( HPMHooks.count.HP_intif_pSaveGuildStorage_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveGuildStorage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pSaveGuildStorage_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pPartyCreated(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pPartyCreated_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyCreated_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pPartyCreated_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pPartyCreated(fd);
+ }
+ if( HPMHooks.count.HP_intif_pPartyCreated_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyCreated_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pPartyCreated_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pPartyInfo(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pPartyInfo_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyInfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pPartyInfo_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pPartyInfo(fd);
+ }
+ if( HPMHooks.count.HP_intif_pPartyInfo_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyInfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pPartyInfo_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pPartyMemberAdded(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pPartyMemberAdded_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberAdded_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pPartyMemberAdded_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pPartyMemberAdded(fd);
+ }
+ if( HPMHooks.count.HP_intif_pPartyMemberAdded_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberAdded_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pPartyMemberAdded_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pPartyOptionChanged(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pPartyOptionChanged_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyOptionChanged_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pPartyOptionChanged_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pPartyOptionChanged(fd);
+ }
+ if( HPMHooks.count.HP_intif_pPartyOptionChanged_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyOptionChanged_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pPartyOptionChanged_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pPartyMemberWithdraw(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pPartyMemberWithdraw_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberWithdraw_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pPartyMemberWithdraw_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pPartyMemberWithdraw(fd);
+ }
+ if( HPMHooks.count.HP_intif_pPartyMemberWithdraw_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberWithdraw_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pPartyMemberWithdraw_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pPartyMove(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pPartyMove_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pPartyMove_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pPartyMove(fd);
+ }
+ if( HPMHooks.count.HP_intif_pPartyMove_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pPartyMove_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pPartyBroken(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pPartyBroken_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyBroken_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pPartyBroken_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pPartyBroken(fd);
+ }
+ if( HPMHooks.count.HP_intif_pPartyBroken_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyBroken_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pPartyBroken_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pPartyMessage(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pPartyMessage_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMessage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pPartyMessage_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pPartyMessage(fd);
+ }
+ if( HPMHooks.count.HP_intif_pPartyMessage_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMessage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pPartyMessage_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildCreated(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildCreated_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCreated_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildCreated_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildCreated(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildCreated_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCreated_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildCreated_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildInfo(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildInfo_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildInfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildInfo_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildInfo(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildInfo_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildInfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildInfo_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildMemberAdded(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildMemberAdded_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberAdded_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildMemberAdded_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildMemberAdded(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildMemberAdded_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberAdded_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildMemberAdded_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildMemberWithdraw(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildMemberWithdraw_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberWithdraw_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildMemberWithdraw_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildMemberWithdraw(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildMemberWithdraw_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberWithdraw_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildMemberWithdraw_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildMemberInfoShort(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildMemberInfoShort_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoShort_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildMemberInfoShort_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildMemberInfoShort(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildMemberInfoShort_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoShort_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildMemberInfoShort_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildBroken(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildBroken_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBroken_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildBroken_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildBroken(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildBroken_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBroken_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildBroken_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildMessage(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildMessage_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMessage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildMessage_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildMessage(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildMessage_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMessage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildMessage_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildBasicInfoChanged(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildBasicInfoChanged_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBasicInfoChanged_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildBasicInfoChanged_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildBasicInfoChanged(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildBasicInfoChanged_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBasicInfoChanged_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildBasicInfoChanged_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildMemberInfoChanged(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildMemberInfoChanged_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoChanged_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildMemberInfoChanged_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildMemberInfoChanged(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildMemberInfoChanged_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoChanged_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildMemberInfoChanged_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildPosition(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildPosition_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildPosition_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildPosition_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildPosition(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildPosition_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildPosition_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildPosition_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildSkillUp(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildSkillUp_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildSkillUp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildSkillUp_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildSkillUp(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildSkillUp_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildSkillUp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildSkillUp_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildAlliance(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildAlliance_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildAlliance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildAlliance_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildAlliance(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildAlliance_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildAlliance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildAlliance_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildNotice(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildNotice_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildNotice_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildNotice_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildNotice(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildNotice_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildNotice_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildNotice_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildEmblem(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildEmblem_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildEmblem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildEmblem_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildEmblem(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildEmblem_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildEmblem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildEmblem_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildCastleDataLoad(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildCastleDataLoad_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCastleDataLoad_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildCastleDataLoad_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildCastleDataLoad(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildCastleDataLoad_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCastleDataLoad_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildCastleDataLoad_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pGuildMasterChanged(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pGuildMasterChanged_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMasterChanged_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pGuildMasterChanged_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pGuildMasterChanged(fd);
+ }
+ if( HPMHooks.count.HP_intif_pGuildMasterChanged_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMasterChanged_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pGuildMasterChanged_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pQuestLog(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pQuestLog_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestLog_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pQuestLog_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pQuestLog(fd);
+ }
+ if( HPMHooks.count.HP_intif_pQuestLog_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestLog_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pQuestLog_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pQuestSave(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pQuestSave_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestSave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pQuestSave_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pQuestSave(fd);
+ }
+ if( HPMHooks.count.HP_intif_pQuestSave_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestSave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pQuestSave_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pMailInboxReceived(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pMailInboxReceived_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailInboxReceived_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pMailInboxReceived_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pMailInboxReceived(fd);
+ }
+ if( HPMHooks.count.HP_intif_pMailInboxReceived_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailInboxReceived_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pMailInboxReceived_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pMailNew(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pMailNew_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailNew_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pMailNew_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pMailNew(fd);
+ }
+ if( HPMHooks.count.HP_intif_pMailNew_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailNew_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pMailNew_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pMailGetAttach(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pMailGetAttach_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailGetAttach_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pMailGetAttach_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pMailGetAttach(fd);
+ }
+ if( HPMHooks.count.HP_intif_pMailGetAttach_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailGetAttach_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pMailGetAttach_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pMailDelete(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pMailDelete_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailDelete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pMailDelete_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pMailDelete(fd);
+ }
+ if( HPMHooks.count.HP_intif_pMailDelete_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailDelete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pMailDelete_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pMailReturn(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pMailReturn_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailReturn_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pMailReturn_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pMailReturn(fd);
+ }
+ if( HPMHooks.count.HP_intif_pMailReturn_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailReturn_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pMailReturn_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pMailSend(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pMailSend_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailSend_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pMailSend_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pMailSend(fd);
+ }
+ if( HPMHooks.count.HP_intif_pMailSend_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailSend_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pMailSend_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pAuctionResults(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pAuctionResults_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionResults_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pAuctionResults_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pAuctionResults(fd);
+ }
+ if( HPMHooks.count.HP_intif_pAuctionResults_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionResults_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pAuctionResults_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pAuctionRegister(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pAuctionRegister_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionRegister_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pAuctionRegister_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pAuctionRegister(fd);
+ }
+ if( HPMHooks.count.HP_intif_pAuctionRegister_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionRegister_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pAuctionRegister_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pAuctionCancel(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pAuctionCancel_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionCancel_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pAuctionCancel_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pAuctionCancel(fd);
+ }
+ if( HPMHooks.count.HP_intif_pAuctionCancel_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionCancel_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pAuctionCancel_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pAuctionClose(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pAuctionClose_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionClose_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pAuctionClose_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pAuctionClose(fd);
+ }
+ if( HPMHooks.count.HP_intif_pAuctionClose_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionClose_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pAuctionClose_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pAuctionMessage(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pAuctionMessage_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionMessage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pAuctionMessage_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pAuctionMessage(fd);
+ }
+ if( HPMHooks.count.HP_intif_pAuctionMessage_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionMessage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pAuctionMessage_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pAuctionBid(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pAuctionBid_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionBid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pAuctionBid_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pAuctionBid(fd);
+ }
+ if( HPMHooks.count.HP_intif_pAuctionBid_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionBid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pAuctionBid_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pMercenaryReceived(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pMercenaryReceived_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryReceived_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pMercenaryReceived_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pMercenaryReceived(fd);
+ }
+ if( HPMHooks.count.HP_intif_pMercenaryReceived_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryReceived_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pMercenaryReceived_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pMercenaryDeleted(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pMercenaryDeleted_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryDeleted_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pMercenaryDeleted_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pMercenaryDeleted(fd);
+ }
+ if( HPMHooks.count.HP_intif_pMercenaryDeleted_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryDeleted_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pMercenaryDeleted_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pMercenarySaved(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pMercenarySaved_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenarySaved_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pMercenarySaved_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pMercenarySaved(fd);
+ }
+ if( HPMHooks.count.HP_intif_pMercenarySaved_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenarySaved_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pMercenarySaved_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pElementalReceived(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pElementalReceived_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalReceived_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pElementalReceived_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pElementalReceived(fd);
+ }
+ if( HPMHooks.count.HP_intif_pElementalReceived_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalReceived_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pElementalReceived_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pElementalDeleted(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pElementalDeleted_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalDeleted_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pElementalDeleted_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pElementalDeleted(fd);
+ }
+ if( HPMHooks.count.HP_intif_pElementalDeleted_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalDeleted_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pElementalDeleted_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pElementalSaved(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pElementalSaved_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalSaved_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pElementalSaved_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pElementalSaved(fd);
+ }
+ if( HPMHooks.count.HP_intif_pElementalSaved_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalSaved_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pElementalSaved_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pCreatePet(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pCreatePet_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreatePet_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pCreatePet_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pCreatePet(fd);
+ }
+ if( HPMHooks.count.HP_intif_pCreatePet_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreatePet_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pCreatePet_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pRecvPetData(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pRecvPetData_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvPetData_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pRecvPetData_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pRecvPetData(fd);
+ }
+ if( HPMHooks.count.HP_intif_pRecvPetData_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvPetData_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pRecvPetData_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pSavePetOk(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pSavePetOk_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSavePetOk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pSavePetOk_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pSavePetOk(fd);
+ }
+ if( HPMHooks.count.HP_intif_pSavePetOk_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSavePetOk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pSavePetOk_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pDeletePetOk(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pDeletePetOk_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeletePetOk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pDeletePetOk_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pDeletePetOk(fd);
+ }
+ if( HPMHooks.count.HP_intif_pDeletePetOk_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeletePetOk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pDeletePetOk_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pCreateHomunculus(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pCreateHomunculus_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreateHomunculus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pCreateHomunculus_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pCreateHomunculus(fd);
+ }
+ if( HPMHooks.count.HP_intif_pCreateHomunculus_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreateHomunculus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pCreateHomunculus_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pRecvHomunculusData(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pRecvHomunculusData_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvHomunculusData_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pRecvHomunculusData_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pRecvHomunculusData(fd);
+ }
+ if( HPMHooks.count.HP_intif_pRecvHomunculusData_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvHomunculusData_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pRecvHomunculusData_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pSaveHomunculusOk(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pSaveHomunculusOk_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveHomunculusOk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pSaveHomunculusOk_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pSaveHomunculusOk(fd);
+ }
+ if( HPMHooks.count.HP_intif_pSaveHomunculusOk_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveHomunculusOk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pSaveHomunculusOk_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_intif_pDeleteHomunculusOk(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_intif_pDeleteHomunculusOk_pre ) {
+ void (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeleteHomunculusOk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_intif_pDeleteHomunculusOk_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.intif.pDeleteHomunculusOk(fd);
+ }
+ if( HPMHooks.count.HP_intif_pDeleteHomunculusOk_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeleteHomunculusOk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_intif_pDeleteHomunculusOk_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+/* ircbot */
+void HP_ircbot_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_ircbot_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ircbot.init();
+ }
+ if( HPMHooks.count.HP_ircbot_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_ircbot_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_ircbot_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ircbot.final();
+ }
+ if( HPMHooks.count.HP_ircbot_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_ircbot_parse(int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_ircbot_parse_pre ) {
+ int (*preHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_parse_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.ircbot.parse(fd);
+ }
+ if( HPMHooks.count.HP_ircbot_parse_post ) {
+ int (*postHookFunc) (int retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_parse_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+void HP_ircbot_parse_sub(int fd, char *str) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_ircbot_parse_sub_pre ) {
+ void (*preHookFunc) (int *fd, char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_parse_sub_pre[hIndex].func;
+ preHookFunc(&fd, str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ircbot.parse_sub(fd, str);
+ }
+ if( HPMHooks.count.HP_ircbot_parse_sub_post ) {
+ void (*postHookFunc) (int *fd, char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_parse_sub_post[hIndex].func;
+ postHookFunc(&fd, str);
+ }
+ }
+ return;
+}
+void HP_ircbot_parse_source(char *source, char *nick, char *ident, char *host) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_ircbot_parse_source_pre ) {
+ void (*preHookFunc) (char *source, char *nick, char *ident, char *host);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_source_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_parse_source_pre[hIndex].func;
+ preHookFunc(source, nick, ident, host);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ircbot.parse_source(source, nick, ident, host);
+ }
+ if( HPMHooks.count.HP_ircbot_parse_source_post ) {
+ void (*postHookFunc) (char *source, char *nick, char *ident, char *host);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_source_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_parse_source_post[hIndex].func;
+ postHookFunc(source, nick, ident, host);
+ }
+ }
+ return;
+}
+struct irc_func* HP_ircbot_func_search(char *function_name) {
+ int hIndex = 0;
+ struct irc_func* retVal___ = NULL;
+ if( HPMHooks.count.HP_ircbot_func_search_pre ) {
+ struct irc_func* (*preHookFunc) (char *function_name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_func_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_func_search_pre[hIndex].func;
+ retVal___ = preHookFunc(function_name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.ircbot.func_search(function_name);
+ }
+ if( HPMHooks.count.HP_ircbot_func_search_post ) {
+ struct irc_func* (*postHookFunc) (struct irc_func* retVal___, char *function_name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_func_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_func_search_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, function_name);
+ }
+ }
+ return retVal___;
+}
+int HP_ircbot_connect_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_ircbot_connect_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_connect_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_connect_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.ircbot.connect_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_ircbot_connect_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_connect_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_connect_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_ircbot_identify_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_ircbot_identify_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_identify_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_identify_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.ircbot.identify_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_ircbot_identify_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_identify_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_identify_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_ircbot_join_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_ircbot_join_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_join_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_join_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.ircbot.join_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_ircbot_join_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_join_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_join_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_ircbot_send(char *str) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_ircbot_send_pre ) {
+ void (*preHookFunc) (char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_send_pre[hIndex].func;
+ preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ircbot.send(str);
+ }
+ if( HPMHooks.count.HP_ircbot_send_post ) {
+ void (*postHookFunc) (char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_send_post[hIndex].func;
+ postHookFunc(str);
+ }
+ }
+ return;
+}
+void HP_ircbot_relay(char *name, const char *msg) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_ircbot_relay_pre ) {
+ void (*preHookFunc) (char *name, const char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_relay_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_relay_pre[hIndex].func;
+ preHookFunc(name, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ircbot.relay(name, msg);
+ }
+ if( HPMHooks.count.HP_ircbot_relay_post ) {
+ void (*postHookFunc) (char *name, const char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_relay_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_relay_post[hIndex].func;
+ postHookFunc(name, msg);
+ }
+ }
+ return;
+}
+void HP_ircbot_pong(int fd, char *cmd, char *source, char *target, char *msg) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_ircbot_pong_pre ) {
+ void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_pong_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_pong_pre[hIndex].func;
+ preHookFunc(&fd, cmd, source, target, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ircbot.pong(fd, cmd, source, target, msg);
+ }
+ if( HPMHooks.count.HP_ircbot_pong_post ) {
+ void (*postHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_pong_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_pong_post[hIndex].func;
+ postHookFunc(&fd, cmd, source, target, msg);
+ }
+ }
+ return;
+}
+void HP_ircbot_privmsg(int fd, char *cmd, char *source, char *target, char *msg) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_ircbot_privmsg_pre ) {
+ void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_privmsg_pre[hIndex].func;
+ preHookFunc(&fd, cmd, source, target, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ircbot.privmsg(fd, cmd, source, target, msg);
+ }
+ if( HPMHooks.count.HP_ircbot_privmsg_post ) {
+ void (*postHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_privmsg_post[hIndex].func;
+ postHookFunc(&fd, cmd, source, target, msg);
+ }
+ }
+ return;
+}
+void HP_ircbot_userjoin(int fd, char *cmd, char *source, char *target, char *msg) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_ircbot_userjoin_pre ) {
+ void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userjoin_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_userjoin_pre[hIndex].func;
+ preHookFunc(&fd, cmd, source, target, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ircbot.userjoin(fd, cmd, source, target, msg);
+ }
+ if( HPMHooks.count.HP_ircbot_userjoin_post ) {
+ void (*postHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userjoin_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_userjoin_post[hIndex].func;
+ postHookFunc(&fd, cmd, source, target, msg);
+ }
+ }
+ return;
+}
+void HP_ircbot_userleave(int fd, char *cmd, char *source, char *target, char *msg) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_ircbot_userleave_pre ) {
+ void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userleave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_userleave_pre[hIndex].func;
+ preHookFunc(&fd, cmd, source, target, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ircbot.userleave(fd, cmd, source, target, msg);
+ }
+ if( HPMHooks.count.HP_ircbot_userleave_post ) {
+ void (*postHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userleave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_userleave_post[hIndex].func;
+ postHookFunc(&fd, cmd, source, target, msg);
+ }
+ }
+ return;
+}
+void HP_ircbot_usernick(int fd, char *cmd, char *source, char *target, char *msg) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_ircbot_usernick_pre ) {
+ void (*preHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_usernick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_ircbot_usernick_pre[hIndex].func;
+ preHookFunc(&fd, cmd, source, target, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ircbot.usernick(fd, cmd, source, target, msg);
+ }
+ if( HPMHooks.count.HP_ircbot_usernick_post ) {
+ void (*postHookFunc) (int *fd, char *cmd, char *source, char *target, char *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_usernick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_ircbot_usernick_post[hIndex].func;
+ postHookFunc(&fd, cmd, source, target, msg);
+ }
+ }
+ return;
+}
+/* itemdb */
+void HP_itemdb_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.init();
+ }
+ if( HPMHooks.count.HP_itemdb_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_itemdb_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.final();
+ }
+ if( HPMHooks.count.HP_itemdb_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_itemdb_reload(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_reload_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_reload_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.reload();
+ }
+ if( HPMHooks.count.HP_itemdb_reload_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_reload_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_itemdb_name_constants(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_name_constants_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name_constants_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_name_constants_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.name_constants();
+ }
+ if( HPMHooks.count.HP_itemdb_name_constants_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name_constants_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_name_constants_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_itemdb_force_name_constants(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_force_name_constants_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_force_name_constants_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_force_name_constants_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.force_name_constants();
+ }
+ if( HPMHooks.count.HP_itemdb_force_name_constants_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_force_name_constants_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_force_name_constants_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_itemdb_read_groups(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_read_groups_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_groups_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_read_groups_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.read_groups();
+ }
+ if( HPMHooks.count.HP_itemdb_read_groups_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_groups_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_read_groups_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_itemdb_read_chains(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_read_chains_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_chains_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_read_chains_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.read_chains();
+ }
+ if( HPMHooks.count.HP_itemdb_read_chains_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_chains_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_read_chains_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_itemdb_read_packages(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_read_packages_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_packages_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_read_packages_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.read_packages();
+ }
+ if( HPMHooks.count.HP_itemdb_read_packages_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_packages_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_read_packages_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_itemdb_write_cached_packages(const char *config_filename) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_write_cached_packages_pre ) {
+ void (*preHookFunc) (const char *config_filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_write_cached_packages_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_write_cached_packages_pre[hIndex].func;
+ preHookFunc(config_filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.write_cached_packages(config_filename);
+ }
+ if( HPMHooks.count.HP_itemdb_write_cached_packages_post ) {
+ void (*postHookFunc) (const char *config_filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_write_cached_packages_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_write_cached_packages_post[hIndex].func;
+ postHookFunc(config_filename);
+ }
+ }
+ return;
+}
+bool HP_itemdb_read_cached_packages(const char *config_filename) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_itemdb_read_cached_packages_pre ) {
+ bool (*preHookFunc) (const char *config_filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_cached_packages_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_read_cached_packages_pre[hIndex].func;
+ retVal___ = preHookFunc(config_filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.read_cached_packages(config_filename);
+ }
+ if( HPMHooks.count.HP_itemdb_read_cached_packages_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *config_filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_cached_packages_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_read_cached_packages_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config_filename);
+ }
+ }
+ return retVal___;
+}
+struct item_data* HP_itemdb_name2id(const char *str) {
+ int hIndex = 0;
+ struct item_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_itemdb_name2id_pre ) {
+ struct item_data* (*preHookFunc) (const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name2id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_name2id_pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.name2id(str);
+ }
+ if( HPMHooks.count.HP_itemdb_name2id_post ) {
+ struct item_data* (*postHookFunc) (struct item_data* retVal___, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name2id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_name2id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
+struct item_data* HP_itemdb_search_name(const char *name) {
+ int hIndex = 0;
+ struct item_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_itemdb_search_name_pre ) {
+ struct item_data* (*preHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_search_name_pre[hIndex].func;
+ retVal___ = preHookFunc(name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.search_name(name);
+ }
+ if( HPMHooks.count.HP_itemdb_search_name_post ) {
+ struct item_data* (*postHookFunc) (struct item_data* retVal___, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_search_name_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_search_name_array(struct item_data **data, int size, const char *str, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_search_name_array_pre ) {
+ int (*preHookFunc) (struct item_data **data, int *size, const char *str, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_array_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_search_name_array_pre[hIndex].func;
+ retVal___ = preHookFunc(data, &size, str, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.search_name_array(data, size, str, flag);
+ }
+ if( HPMHooks.count.HP_itemdb_search_name_array_post ) {
+ int (*postHookFunc) (int retVal___, struct item_data **data, int *size, const char *str, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_array_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_search_name_array_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data, &size, str, &flag);
+ }
+ }
+ return retVal___;
+}
+struct item_data* HP_itemdb_load(int nameid) {
+ int hIndex = 0;
+ struct item_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_itemdb_load_pre ) {
+ struct item_data* (*preHookFunc) (int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_load_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_load_pre[hIndex].func;
+ retVal___ = preHookFunc(&nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.load(nameid);
+ }
+ if( HPMHooks.count.HP_itemdb_load_post ) {
+ struct item_data* (*postHookFunc) (struct item_data* retVal___, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_load_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_load_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &nameid);
+ }
+ }
+ return retVal___;
+}
+struct item_data* HP_itemdb_search(int nameid) {
+ int hIndex = 0;
+ struct item_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_itemdb_search_pre ) {
+ struct item_data* (*preHookFunc) (int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_search_pre[hIndex].func;
+ retVal___ = preHookFunc(&nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.search(nameid);
+ }
+ if( HPMHooks.count.HP_itemdb_search_post ) {
+ struct item_data* (*postHookFunc) (struct item_data* retVal___, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_search_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &nameid);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_parse_dbrow(char **str, const char *source, int line, int scriptopt) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_parse_dbrow_pre ) {
+ int (*preHookFunc) (char **str, const char *source, int *line, int *scriptopt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_parse_dbrow_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_parse_dbrow_pre[hIndex].func;
+ retVal___ = preHookFunc(str, source, &line, &scriptopt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.parse_dbrow(str, source, line, scriptopt);
+ }
+ if( HPMHooks.count.HP_itemdb_parse_dbrow_post ) {
+ int (*postHookFunc) (int retVal___, char **str, const char *source, int *line, int *scriptopt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_parse_dbrow_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_parse_dbrow_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, source, &line, &scriptopt);
+ }
+ }
+ return retVal___;
+}
+struct item_data* HP_itemdb_exists(int nameid) {
+ int hIndex = 0;
+ struct item_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_itemdb_exists_pre ) {
+ struct item_data* (*preHookFunc) (int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_exists_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_exists_pre[hIndex].func;
+ retVal___ = preHookFunc(&nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.exists(nameid);
+ }
+ if( HPMHooks.count.HP_itemdb_exists_post ) {
+ struct item_data* (*postHookFunc) (struct item_data* retVal___, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_exists_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_exists_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &nameid);
+ }
+ }
+ return retVal___;
+}
+bool HP_itemdb_in_group(struct item_group *group, int nameid) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_itemdb_in_group_pre ) {
+ bool (*preHookFunc) (struct item_group *group, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_in_group_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_in_group_pre[hIndex].func;
+ retVal___ = preHookFunc(group, &nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.in_group(group, nameid);
+ }
+ if( HPMHooks.count.HP_itemdb_in_group_post ) {
+ bool (*postHookFunc) (bool retVal___, struct item_group *group, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_in_group_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_in_group_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, group, &nameid);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_group_item(struct item_group *group) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_group_item_pre ) {
+ int (*preHookFunc) (struct item_group *group);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_group_item_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_group_item_pre[hIndex].func;
+ retVal___ = preHookFunc(group);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.group_item(group);
+ }
+ if( HPMHooks.count.HP_itemdb_group_item_post ) {
+ int (*postHookFunc) (int retVal___, struct item_group *group);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_group_item_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_group_item_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, group);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_chain_item(unsigned short chain_id, int *rate) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_chain_item_pre ) {
+ int (*preHookFunc) (unsigned short *chain_id, int *rate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_chain_item_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_chain_item_pre[hIndex].func;
+ retVal___ = preHookFunc(&chain_id, rate);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.chain_item(chain_id, rate);
+ }
+ if( HPMHooks.count.HP_itemdb_chain_item_post ) {
+ int (*postHookFunc) (int retVal___, unsigned short *chain_id, int *rate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_chain_item_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_chain_item_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &chain_id, rate);
+ }
+ }
+ return retVal___;
+}
+void HP_itemdb_package_item(struct map_session_data *sd, struct item_package *package) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_package_item_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct item_package *package);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_package_item_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_package_item_pre[hIndex].func;
+ preHookFunc(sd, package);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.package_item(sd, package);
+ }
+ if( HPMHooks.count.HP_itemdb_package_item_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct item_package *package);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_package_item_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_package_item_post[hIndex].func;
+ postHookFunc(sd, package);
+ }
+ }
+ return;
+}
+int HP_itemdb_searchname_sub(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_searchname_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_itemdb_searchname_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.itemdb.searchname_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_itemdb_searchname_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_itemdb_searchname_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_searchname_array_sub(DBKey key, DBData data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_searchname_array_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_array_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_itemdb_searchname_array_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, &data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.itemdb.searchname_array_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_itemdb_searchname_array_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_array_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_itemdb_searchname_array_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, &data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_searchrandomid(struct item_group *group) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_searchrandomid_pre ) {
+ int (*preHookFunc) (struct item_group *group);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchrandomid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_searchrandomid_pre[hIndex].func;
+ retVal___ = preHookFunc(group);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.searchrandomid(group);
+ }
+ if( HPMHooks.count.HP_itemdb_searchrandomid_post ) {
+ int (*postHookFunc) (int retVal___, struct item_group *group);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchrandomid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_searchrandomid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, group);
+ }
+ }
+ return retVal___;
+}
+const char* HP_itemdb_typename(int type) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_itemdb_typename_pre ) {
+ const char* (*preHookFunc) (int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_typename_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_typename_pre[hIndex].func;
+ retVal___ = preHookFunc(&type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.typename(type);
+ }
+ if( HPMHooks.count.HP_itemdb_typename_post ) {
+ const char* (*postHookFunc) (const char* retVal___, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_typename_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_typename_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type);
+ }
+ }
+ return retVal___;
+}
+void HP_itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_jobid2mapid_pre ) {
+ void (*preHookFunc) (unsigned int *bclass, unsigned int *jobmask);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_jobid2mapid_pre[hIndex].func;
+ preHookFunc(bclass, &jobmask);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.jobid2mapid(bclass, jobmask);
+ }
+ if( HPMHooks.count.HP_itemdb_jobid2mapid_post ) {
+ void (*postHookFunc) (unsigned int *bclass, unsigned int *jobmask);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_jobid2mapid_post[hIndex].func;
+ postHookFunc(bclass, &jobmask);
+ }
+ }
+ return;
+}
+void HP_itemdb_create_dummy_data(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_create_dummy_data_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_dummy_data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_create_dummy_data_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.create_dummy_data();
+ }
+ if( HPMHooks.count.HP_itemdb_create_dummy_data_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_dummy_data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_create_dummy_data_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+struct item_data* HP_itemdb_create_item_data(int nameid) {
+ int hIndex = 0;
+ struct item_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_itemdb_create_item_data_pre ) {
+ struct item_data* (*preHookFunc) (int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_item_data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_create_item_data_pre[hIndex].func;
+ retVal___ = preHookFunc(&nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.create_item_data(nameid);
+ }
+ if( HPMHooks.count.HP_itemdb_create_item_data_post ) {
+ struct item_data* (*postHookFunc) (struct item_data* retVal___, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_item_data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_create_item_data_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &nameid);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_isequip(int nameid) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_isequip_pre ) {
+ int (*preHookFunc) (int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_isequip_pre[hIndex].func;
+ retVal___ = preHookFunc(&nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.isequip(nameid);
+ }
+ if( HPMHooks.count.HP_itemdb_isequip_post ) {
+ int (*postHookFunc) (int retVal___, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_isequip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &nameid);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_isequip2(struct item_data *data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_isequip2_pre ) {
+ int (*preHookFunc) (struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_isequip2_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.isequip2(data);
+ }
+ if( HPMHooks.count.HP_itemdb_isequip2_post ) {
+ int (*postHookFunc) (int retVal___, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_isequip2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_isstackable(int nameid) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_isstackable_pre ) {
+ int (*preHookFunc) (int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_isstackable_pre[hIndex].func;
+ retVal___ = preHookFunc(&nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.isstackable(nameid);
+ }
+ if( HPMHooks.count.HP_itemdb_isstackable_post ) {
+ int (*postHookFunc) (int retVal___, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_isstackable_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &nameid);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_isstackable2(struct item_data *data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_isstackable2_pre ) {
+ int (*preHookFunc) (struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_isstackable2_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.isstackable2(data);
+ }
+ if( HPMHooks.count.HP_itemdb_isstackable2_post ) {
+ int (*postHookFunc) (int retVal___, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_isstackable2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_isdropable_sub(struct item_data *item, int gmlv, int unused) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_isdropable_sub_pre ) {
+ int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isdropable_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_isdropable_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(item, &gmlv, &unused);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.isdropable_sub(item, gmlv, unused);
+ }
+ if( HPMHooks.count.HP_itemdb_isdropable_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *unused);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isdropable_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_isdropable_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, item, &gmlv, &unused);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_cantrade_sub(struct item_data *item, int gmlv, int gmlv2) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_cantrade_sub_pre ) {
+ int (*preHookFunc) (struct item_data *item, int *gmlv, int *gmlv2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cantrade_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_cantrade_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(item, &gmlv, &gmlv2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.cantrade_sub(item, gmlv, gmlv2);
+ }
+ if( HPMHooks.count.HP_itemdb_cantrade_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *gmlv2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cantrade_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_cantrade_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, item, &gmlv, &gmlv2);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_canpartnertrade_sub(struct item_data *item, int gmlv, int gmlv2) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_canpartnertrade_sub_pre ) {
+ int (*preHookFunc) (struct item_data *item, int *gmlv, int *gmlv2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canpartnertrade_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_canpartnertrade_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(item, &gmlv, &gmlv2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.canpartnertrade_sub(item, gmlv, gmlv2);
+ }
+ if( HPMHooks.count.HP_itemdb_canpartnertrade_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *gmlv2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canpartnertrade_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_canpartnertrade_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, item, &gmlv, &gmlv2);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_cansell_sub(struct item_data *item, int gmlv, int unused) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_cansell_sub_pre ) {
+ int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cansell_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_cansell_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(item, &gmlv, &unused);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.cansell_sub(item, gmlv, unused);
+ }
+ if( HPMHooks.count.HP_itemdb_cansell_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *unused);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cansell_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_cansell_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, item, &gmlv, &unused);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_cancartstore_sub(struct item_data *item, int gmlv, int unused) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_cancartstore_sub_pre ) {
+ int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cancartstore_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_cancartstore_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(item, &gmlv, &unused);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.cancartstore_sub(item, gmlv, unused);
+ }
+ if( HPMHooks.count.HP_itemdb_cancartstore_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *unused);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cancartstore_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_cancartstore_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, item, &gmlv, &unused);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_canstore_sub(struct item_data *item, int gmlv, int unused) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_canstore_sub_pre ) {
+ int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canstore_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_canstore_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(item, &gmlv, &unused);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.canstore_sub(item, gmlv, unused);
+ }
+ if( HPMHooks.count.HP_itemdb_canstore_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *unused);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canstore_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_canstore_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, item, &gmlv, &unused);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_canguildstore_sub(struct item_data *item, int gmlv, int unused) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_canguildstore_sub_pre ) {
+ int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canguildstore_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_canguildstore_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(item, &gmlv, &unused);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.canguildstore_sub(item, gmlv, unused);
+ }
+ if( HPMHooks.count.HP_itemdb_canguildstore_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *unused);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canguildstore_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_canguildstore_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, item, &gmlv, &unused);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_canmail_sub(struct item_data *item, int gmlv, int unused) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_canmail_sub_pre ) {
+ int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canmail_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_canmail_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(item, &gmlv, &unused);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.canmail_sub(item, gmlv, unused);
+ }
+ if( HPMHooks.count.HP_itemdb_canmail_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *unused);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canmail_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_canmail_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, item, &gmlv, &unused);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_canauction_sub(struct item_data *item, int gmlv, int unused) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_canauction_sub_pre ) {
+ int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canauction_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_canauction_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(item, &gmlv, &unused);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.canauction_sub(item, gmlv, unused);
+ }
+ if( HPMHooks.count.HP_itemdb_canauction_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct item_data *item, int *gmlv, int *unused);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canauction_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_canauction_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, item, &gmlv, &unused);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_isrestricted(struct item *item, int gmlv, int gmlv2, int ( *func ) (struct item_data *, int, int)) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_isrestricted_pre ) {
+ int (*preHookFunc) (struct item *item, int *gmlv, int *gmlv2, int ( *func ) (struct item_data *, int, int));
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isrestricted_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_isrestricted_pre[hIndex].func;
+ retVal___ = preHookFunc(item, &gmlv, &gmlv2, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.isrestricted(item, gmlv, gmlv2, func);
+ }
+ if( HPMHooks.count.HP_itemdb_isrestricted_post ) {
+ int (*postHookFunc) (int retVal___, struct item *item, int *gmlv, int *gmlv2, int ( *func ) (struct item_data *, int, int));
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isrestricted_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_isrestricted_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, item, &gmlv, &gmlv2, func);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_isidentified(int nameid) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_isidentified_pre ) {
+ int (*preHookFunc) (int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_isidentified_pre[hIndex].func;
+ retVal___ = preHookFunc(&nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.isidentified(nameid);
+ }
+ if( HPMHooks.count.HP_itemdb_isidentified_post ) {
+ int (*postHookFunc) (int retVal___, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_isidentified_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &nameid);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_isidentified2(struct item_data *data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_isidentified2_pre ) {
+ int (*preHookFunc) (struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_isidentified2_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.isidentified2(data);
+ }
+ if( HPMHooks.count.HP_itemdb_isidentified2_post ) {
+ int (*postHookFunc) (int retVal___, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_isidentified2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+bool HP_itemdb_read_itemavail(char *str[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_itemdb_read_itemavail_pre ) {
+ bool (*preHookFunc) (char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemavail_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_read_itemavail_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.read_itemavail(str, columns, current);
+ }
+ if( HPMHooks.count.HP_itemdb_read_itemavail_post ) {
+ bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemavail_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_read_itemavail_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_itemdb_read_itemtrade(char *str[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_itemdb_read_itemtrade_pre ) {
+ bool (*preHookFunc) (char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemtrade_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_read_itemtrade_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.read_itemtrade(str, columns, current);
+ }
+ if( HPMHooks.count.HP_itemdb_read_itemtrade_post ) {
+ bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemtrade_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_read_itemtrade_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_itemdb_read_itemdelay(char *str[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_itemdb_read_itemdelay_pre ) {
+ bool (*preHookFunc) (char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemdelay_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_read_itemdelay_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.read_itemdelay(str, columns, current);
+ }
+ if( HPMHooks.count.HP_itemdb_read_itemdelay_post ) {
+ bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_itemdelay_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_read_itemdelay_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_itemdb_read_stack(char *fields[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_itemdb_read_stack_pre ) {
+ bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_stack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_read_stack_pre[hIndex].func;
+ retVal___ = preHookFunc(fields, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.read_stack(fields, columns, current);
+ }
+ if( HPMHooks.count.HP_itemdb_read_stack_post ) {
+ bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_stack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_read_stack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fields, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_itemdb_read_buyingstore(char *fields[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_itemdb_read_buyingstore_pre ) {
+ bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_buyingstore_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_read_buyingstore_pre[hIndex].func;
+ retVal___ = preHookFunc(fields, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.read_buyingstore(fields, columns, current);
+ }
+ if( HPMHooks.count.HP_itemdb_read_buyingstore_post ) {
+ bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_buyingstore_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_read_buyingstore_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fields, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_itemdb_read_nouse(char *fields[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_itemdb_read_nouse_pre ) {
+ bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_nouse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_read_nouse_pre[hIndex].func;
+ retVal___ = preHookFunc(fields, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.read_nouse(fields, columns, current);
+ }
+ if( HPMHooks.count.HP_itemdb_read_nouse_post ) {
+ bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_nouse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_read_nouse_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fields, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_combo_split_atoi(char *str, int *val) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_combo_split_atoi_pre ) {
+ int (*preHookFunc) (char *str, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_combo_split_atoi_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_combo_split_atoi_pre[hIndex].func;
+ retVal___ = preHookFunc(str, val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.combo_split_atoi(str, val);
+ }
+ if( HPMHooks.count.HP_itemdb_combo_split_atoi_post ) {
+ int (*postHookFunc) (int retVal___, char *str, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_combo_split_atoi_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_combo_split_atoi_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, val);
+ }
+ }
+ return retVal___;
+}
+void HP_itemdb_read_combos(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_read_combos_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combos_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_read_combos_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.read_combos();
+ }
+ if( HPMHooks.count.HP_itemdb_read_combos_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combos_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_read_combos_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_itemdb_gendercheck(struct item_data *id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_gendercheck_pre ) {
+ int (*preHookFunc) (struct item_data *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_gendercheck_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_gendercheck_pre[hIndex].func;
+ retVal___ = preHookFunc(id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.gendercheck(id);
+ }
+ if( HPMHooks.count.HP_itemdb_gendercheck_post ) {
+ int (*postHookFunc) (int retVal___, struct item_data *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_gendercheck_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_gendercheck_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, id);
+ }
+ }
+ return retVal___;
+}
+void HP_itemdb_re_split_atoi(char *str, int *atk, int *matk) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_re_split_atoi_pre ) {
+ void (*preHookFunc) (char *str, int *atk, int *matk);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_re_split_atoi_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_re_split_atoi_pre[hIndex].func;
+ preHookFunc(str, atk, matk);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.re_split_atoi(str, atk, matk);
+ }
+ if( HPMHooks.count.HP_itemdb_re_split_atoi_post ) {
+ void (*postHookFunc) (char *str, int *atk, int *matk);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_re_split_atoi_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_re_split_atoi_post[hIndex].func;
+ postHookFunc(str, atk, matk);
+ }
+ }
+ return;
+}
+int HP_itemdb_readdb(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_readdb_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_readdb_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.readdb();
+ }
+ if( HPMHooks.count.HP_itemdb_readdb_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_readdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_read_sqldb(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_read_sqldb_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_sqldb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_read_sqldb_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.read_sqldb();
+ }
+ if( HPMHooks.count.HP_itemdb_read_sqldb_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_sqldb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_read_sqldb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+uint64 HP_itemdb_unique_id(int8 flag, int64 value) {
+ int hIndex = 0;
+ uint64 retVal___;
+ memset(&retVal___, '\0', sizeof(uint64));
+ if( HPMHooks.count.HP_itemdb_unique_id_pre ) {
+ uint64 (*preHookFunc) (int8 *flag, int64 *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_unique_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_unique_id_pre[hIndex].func;
+ retVal___ = preHookFunc(&flag, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.unique_id(flag, value);
+ }
+ if( HPMHooks.count.HP_itemdb_unique_id_post ) {
+ uint64 (*postHookFunc) (uint64 retVal___, int8 *flag, int64 *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_unique_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_unique_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &flag, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_itemdb_uid_load(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_uid_load_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_uid_load_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_uid_load_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.itemdb.uid_load();
+ }
+ if( HPMHooks.count.HP_itemdb_uid_load_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_uid_load_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_uid_load_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_itemdb_read(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_read_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_read_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.read();
+ }
+ if( HPMHooks.count.HP_itemdb_read_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_read_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_itemdb_destroy_item_data(struct item_data *self, int free_self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_itemdb_destroy_item_data_pre ) {
+ void (*preHookFunc) (struct item_data *self, int *free_self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_destroy_item_data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_destroy_item_data_pre[hIndex].func;
+ preHookFunc(self, &free_self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.itemdb.destroy_item_data(self, free_self);
+ }
+ if( HPMHooks.count.HP_itemdb_destroy_item_data_post ) {
+ void (*postHookFunc) (struct item_data *self, int *free_self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_destroy_item_data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_destroy_item_data_post[hIndex].func;
+ postHookFunc(self, &free_self);
+ }
+ }
+ return;
+}
+int HP_itemdb_final_sub(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_itemdb_final_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_itemdb_final_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.itemdb.final_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_itemdb_final_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_itemdb_final_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+/* logs */
+void HP_logs_pick_pc(struct map_session_data *sd, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_pick_pc_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_pc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_pick_pc_pre[hIndex].func;
+ preHookFunc(sd, &type, &amount, itm, data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.pick_pc(sd, type, amount, itm, data);
+ }
+ if( HPMHooks.count.HP_logs_pick_pc_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_pc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_pick_pc_post[hIndex].func;
+ postHookFunc(sd, &type, &amount, itm, data);
+ }
+ }
+ return;
+}
+void HP_logs_pick_mob(struct mob_data *md, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_pick_mob_pre ) {
+ void (*preHookFunc) (struct mob_data *md, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_mob_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_pick_mob_pre[hIndex].func;
+ preHookFunc(md, &type, &amount, itm, data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.pick_mob(md, type, amount, itm, data);
+ }
+ if( HPMHooks.count.HP_logs_pick_mob_post ) {
+ void (*postHookFunc) (struct mob_data *md, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_mob_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_pick_mob_post[hIndex].func;
+ postHookFunc(md, &type, &amount, itm, data);
+ }
+ }
+ return;
+}
+void HP_logs_zeny(struct map_session_data *sd, e_log_pick_type type, struct map_session_data *src_sd, int amount) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_zeny_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_zeny_pre[hIndex].func;
+ preHookFunc(sd, &type, src_sd, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.zeny(sd, type, src_sd, amount);
+ }
+ if( HPMHooks.count.HP_logs_zeny_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_zeny_post[hIndex].func;
+ postHookFunc(sd, &type, src_sd, &amount);
+ }
+ }
+ return;
+}
+void HP_logs_npc(struct map_session_data *sd, const char *message) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_npc_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_npc_pre[hIndex].func;
+ preHookFunc(sd, message);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.npc(sd, message);
+ }
+ if( HPMHooks.count.HP_logs_npc_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_npc_post[hIndex].func;
+ postHookFunc(sd, message);
+ }
+ }
+ return;
+}
+void HP_logs_chat(e_log_chat_type type, int type_id, int src_charid, int src_accid, const char *mapname, int x, int y, const char *dst_charname, const char *message) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_chat_pre ) {
+ void (*preHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_chat_pre[hIndex].func;
+ preHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.chat(type, type_id, src_charid, src_accid, mapname, x, y, dst_charname, message);
+ }
+ if( HPMHooks.count.HP_logs_chat_post ) {
+ void (*postHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_chat_post[hIndex].func;
+ postHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message);
+ }
+ }
+ return;
+}
+void HP_logs_atcommand(struct map_session_data *sd, const char *message) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_atcommand_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_atcommand_pre[hIndex].func;
+ preHookFunc(sd, message);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.atcommand(sd, message);
+ }
+ if( HPMHooks.count.HP_logs_atcommand_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_atcommand_post[hIndex].func;
+ postHookFunc(sd, message);
+ }
+ }
+ return;
+}
+void HP_logs_branch(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_branch_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_branch_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.branch(sd);
+ }
+ if( HPMHooks.count.HP_logs_branch_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_branch_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_logs_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_mvpdrop_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_mvpdrop_pre[hIndex].func;
+ preHookFunc(sd, &monster_id, log_mvp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.mvpdrop(sd, monster_id, log_mvp);
+ }
+ if( HPMHooks.count.HP_logs_mvpdrop_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_mvpdrop_post[hIndex].func;
+ postHookFunc(sd, &monster_id, log_mvp);
+ }
+ }
+ return;
+}
+void HP_logs_pick_sub(int id, int16 m, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_pick_sub_pre ) {
+ void (*preHookFunc) (int *id, int16 *m, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_pick_sub_pre[hIndex].func;
+ preHookFunc(&id, &m, &type, &amount, itm, data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.pick_sub(id, m, type, amount, itm, data);
+ }
+ if( HPMHooks.count.HP_logs_pick_sub_post ) {
+ void (*postHookFunc) (int *id, int16 *m, e_log_pick_type *type, int *amount, struct item *itm, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_pick_sub_post[hIndex].func;
+ postHookFunc(&id, &m, &type, &amount, itm, data);
+ }
+ }
+ return;
+}
+void HP_logs_zeny_sub(struct map_session_data *sd, e_log_pick_type type, struct map_session_data *src_sd, int amount) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_zeny_sub_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_zeny_sub_pre[hIndex].func;
+ preHookFunc(sd, &type, src_sd, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.zeny_sub(sd, type, src_sd, amount);
+ }
+ if( HPMHooks.count.HP_logs_zeny_sub_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, e_log_pick_type *type, struct map_session_data *src_sd, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_zeny_sub_post[hIndex].func;
+ postHookFunc(sd, &type, src_sd, &amount);
+ }
+ }
+ return;
+}
+void HP_logs_npc_sub(struct map_session_data *sd, const char *message) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_npc_sub_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_npc_sub_pre[hIndex].func;
+ preHookFunc(sd, message);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.npc_sub(sd, message);
+ }
+ if( HPMHooks.count.HP_logs_npc_sub_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_npc_sub_post[hIndex].func;
+ postHookFunc(sd, message);
+ }
+ }
+ return;
+}
+void HP_logs_chat_sub(e_log_chat_type type, int type_id, int src_charid, int src_accid, const char *mapname, int x, int y, const char *dst_charname, const char *message) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_chat_sub_pre ) {
+ void (*preHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_chat_sub_pre[hIndex].func;
+ preHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.chat_sub(type, type_id, src_charid, src_accid, mapname, x, y, dst_charname, message);
+ }
+ if( HPMHooks.count.HP_logs_chat_sub_post ) {
+ void (*postHookFunc) (e_log_chat_type *type, int *type_id, int *src_charid, int *src_accid, const char *mapname, int *x, int *y, const char *dst_charname, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_chat_sub_post[hIndex].func;
+ postHookFunc(&type, &type_id, &src_charid, &src_accid, mapname, &x, &y, dst_charname, message);
+ }
+ }
+ return;
+}
+void HP_logs_atcommand_sub(struct map_session_data *sd, const char *message) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_atcommand_sub_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_atcommand_sub_pre[hIndex].func;
+ preHookFunc(sd, message);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.atcommand_sub(sd, message);
+ }
+ if( HPMHooks.count.HP_logs_atcommand_sub_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *message);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_atcommand_sub_post[hIndex].func;
+ postHookFunc(sd, message);
+ }
+ }
+ return;
+}
+void HP_logs_branch_sub(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_branch_sub_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_branch_sub_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.branch_sub(sd);
+ }
+ if( HPMHooks.count.HP_logs_branch_sub_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_branch_sub_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_logs_mvpdrop_sub(struct map_session_data *sd, int monster_id, int *log_mvp) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_mvpdrop_sub_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_mvpdrop_sub_pre[hIndex].func;
+ preHookFunc(sd, &monster_id, log_mvp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.mvpdrop_sub(sd, monster_id, log_mvp);
+ }
+ if( HPMHooks.count.HP_logs_mvpdrop_sub_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *monster_id, int *log_mvp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_mvpdrop_sub_post[hIndex].func;
+ postHookFunc(sd, &monster_id, log_mvp);
+ }
+ }
+ return;
+}
+int HP_logs_config_read(const char *cfgName) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_logs_config_read_pre ) {
+ int (*preHookFunc) (const char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_config_read_pre[hIndex].func;
+ retVal___ = preHookFunc(cfgName);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.logs.config_read(cfgName);
+ }
+ if( HPMHooks.count.HP_logs_config_read_post ) {
+ int (*postHookFunc) (int retVal___, const char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_config_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, cfgName);
+ }
+ }
+ return retVal___;
+}
+void HP_logs_config_done(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_config_done_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_config_done_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.config_done();
+ }
+ if( HPMHooks.count.HP_logs_config_done_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_config_done_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_logs_sql_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_sql_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_sql_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.sql_init();
+ }
+ if( HPMHooks.count.HP_logs_sql_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_sql_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_logs_sql_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_logs_sql_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_sql_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.logs.sql_final();
+ }
+ if( HPMHooks.count.HP_logs_sql_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_sql_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+char HP_logs_picktype2char(e_log_pick_type type) {
+ int hIndex = 0;
+ char retVal___;
+ memset(&retVal___, '\0', sizeof(char));
+ if( HPMHooks.count.HP_logs_picktype2char_pre ) {
+ char (*preHookFunc) (e_log_pick_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_picktype2char_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_picktype2char_pre[hIndex].func;
+ retVal___ = preHookFunc(&type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.logs.picktype2char(type);
+ }
+ if( HPMHooks.count.HP_logs_picktype2char_post ) {
+ char (*postHookFunc) (char retVal___, e_log_pick_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_picktype2char_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_picktype2char_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type);
+ }
+ }
+ return retVal___;
+}
+char HP_logs_chattype2char(e_log_chat_type type) {
+ int hIndex = 0;
+ char retVal___;
+ memset(&retVal___, '\0', sizeof(char));
+ if( HPMHooks.count.HP_logs_chattype2char_pre ) {
+ char (*preHookFunc) (e_log_chat_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chattype2char_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_chattype2char_pre[hIndex].func;
+ retVal___ = preHookFunc(&type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.logs.chattype2char(type);
+ }
+ if( HPMHooks.count.HP_logs_chattype2char_post ) {
+ char (*postHookFunc) (char retVal___, e_log_chat_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chattype2char_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_chattype2char_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type);
+ }
+ }
+ return retVal___;
+}
+bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_data *id) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_logs_should_log_item_pre ) {
+ bool (*preHookFunc) (int *nameid, int *amount, int *refine, struct item_data *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_logs_should_log_item_pre[hIndex].func;
+ retVal___ = preHookFunc(&nameid, &amount, &refine, id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.logs.should_log_item(nameid, amount, refine, id);
+ }
+ if( HPMHooks.count.HP_logs_should_log_item_post ) {
+ bool (*postHookFunc) (bool retVal___, int *nameid, int *amount, int *refine, struct item_data *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_logs_should_log_item_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &nameid, &amount, &refine, id);
+ }
+ }
+ return retVal___;
+}
+/* mail */
+void HP_mail_clear(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mail_clear_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mail_clear_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mail.clear(sd);
+ }
+ if( HPMHooks.count.HP_mail_clear_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mail_clear_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_mail_removeitem(struct map_session_data *sd, short flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mail_removeitem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, short *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removeitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mail_removeitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mail.removeitem(sd, flag);
+ }
+ if( HPMHooks.count.HP_mail_removeitem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removeitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mail_removeitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_mail_removezeny(struct map_session_data *sd, short flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mail_removezeny_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, short *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removezeny_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mail_removezeny_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mail.removezeny(sd, flag);
+ }
+ if( HPMHooks.count.HP_mail_removezeny_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removezeny_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mail_removezeny_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &flag);
+ }
+ }
+ return retVal___;
+}
+unsigned char HP_mail_setitem(struct map_session_data *sd, int idx, int amount) {
+ int hIndex = 0;
+ unsigned char retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned char));
+ if( HPMHooks.count.HP_mail_setitem_pre ) {
+ unsigned char (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mail_setitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &idx, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mail.setitem(sd, idx, amount);
+ }
+ if( HPMHooks.count.HP_mail_setitem_post ) {
+ unsigned char (*postHookFunc) (unsigned char retVal___, struct map_session_data *sd, int *idx, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mail_setitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &idx, &amount);
+ }
+ }
+ return retVal___;
+}
+bool HP_mail_setattachment(struct map_session_data *sd, struct mail_message *msg) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mail_setattachment_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, struct mail_message *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setattachment_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mail_setattachment_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mail.setattachment(sd, msg);
+ }
+ if( HPMHooks.count.HP_mail_setattachment_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct mail_message *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setattachment_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mail_setattachment_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, msg);
+ }
+ }
+ return retVal___;
+}
+void HP_mail_getattachment(struct map_session_data *sd, int zeny, struct item *item) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mail_getattachment_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *zeny, struct item *item);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_getattachment_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mail_getattachment_pre[hIndex].func;
+ preHookFunc(sd, &zeny, item);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mail.getattachment(sd, zeny, item);
+ }
+ if( HPMHooks.count.HP_mail_getattachment_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *zeny, struct item *item);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_getattachment_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mail_getattachment_post[hIndex].func;
+ postHookFunc(sd, &zeny, item);
+ }
+ }
+ return;
+}
+int HP_mail_openmail(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mail_openmail_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mail_openmail_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mail.openmail(sd);
+ }
+ if( HPMHooks.count.HP_mail_openmail_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mail_openmail_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+void HP_mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mail_deliveryfail_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct mail_message *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mail_deliveryfail_pre[hIndex].func;
+ preHookFunc(sd, msg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mail.deliveryfail(sd, msg);
+ }
+ if( HPMHooks.count.HP_mail_deliveryfail_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct mail_message *msg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mail_deliveryfail_post[hIndex].func;
+ postHookFunc(sd, msg);
+ }
+ }
+ return;
+}
+bool HP_mail_invalid_operation(struct map_session_data *sd) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mail_invalid_operation_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_invalid_operation_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mail_invalid_operation_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mail.invalid_operation(sd);
+ }
+ if( HPMHooks.count.HP_mail_invalid_operation_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_invalid_operation_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mail_invalid_operation_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+/* map */
+void HP_map_zone_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_zone_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_zone_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.zone_init();
+ }
+ if( HPMHooks.count.HP_map_zone_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_zone_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_map_zone_remove(int m) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_zone_remove_pre ) {
+ void (*preHookFunc) (int *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_zone_remove_pre[hIndex].func;
+ preHookFunc(&m);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.zone_remove(m);
+ }
+ if( HPMHooks.count.HP_map_zone_remove_post ) {
+ void (*postHookFunc) (int *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_zone_remove_post[hIndex].func;
+ postHookFunc(&m);
+ }
+ }
+ return;
+}
+void HP_map_zone_apply(int m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_zone_apply_pre ) {
+ void (*preHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_apply_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_zone_apply_pre[hIndex].func;
+ preHookFunc(&m, zone, start, buffer, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.zone_apply(m, zone, start, buffer, filepath);
+ }
+ if( HPMHooks.count.HP_map_zone_apply_post ) {
+ void (*postHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_apply_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_zone_apply_post[hIndex].func;
+ postHookFunc(&m, zone, start, buffer, filepath);
+ }
+ }
+ return;
+}
+void HP_map_zone_change(int m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_zone_change_pre ) {
+ void (*preHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_zone_change_pre[hIndex].func;
+ preHookFunc(&m, zone, start, buffer, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.zone_change(m, zone, start, buffer, filepath);
+ }
+ if( HPMHooks.count.HP_map_zone_change_post ) {
+ void (*postHookFunc) (int *m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_zone_change_post[hIndex].func;
+ postHookFunc(&m, zone, start, buffer, filepath);
+ }
+ }
+ return;
+}
+void HP_map_zone_change2(int m, struct map_zone_data *zone) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_zone_change2_pre ) {
+ void (*preHookFunc) (int *m, struct map_zone_data *zone);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_zone_change2_pre[hIndex].func;
+ preHookFunc(&m, zone);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.zone_change2(m, zone);
+ }
+ if( HPMHooks.count.HP_map_zone_change2_post ) {
+ void (*postHookFunc) (int *m, struct map_zone_data *zone);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_zone_change2_post[hIndex].func;
+ postHookFunc(&m, zone);
+ }
+ }
+ return;
+}
+int HP_map_getcell(int16 m, int16 x, int16 y, cell_chk cellchk) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_getcell_pre ) {
+ int (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_chk *cellchk);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_getcell_pre[hIndex].func;
+ retVal___ = preHookFunc(&m, &x, &y, &cellchk);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.getcell(m, x, y, cellchk);
+ }
+ if( HPMHooks.count.HP_map_getcell_post ) {
+ int (*postHookFunc) (int retVal___, int16 *m, int16 *x, int16 *y, cell_chk *cellchk);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_getcell_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &m, &x, &y, &cellchk);
+ }
+ }
+ return retVal___;
+}
+void HP_map_setgatcell(int16 m, int16 x, int16 y, int gat) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_setgatcell_pre ) {
+ void (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *gat);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setgatcell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_setgatcell_pre[hIndex].func;
+ preHookFunc(&m, &x, &y, &gat);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.setgatcell(m, x, y, gat);
+ }
+ if( HPMHooks.count.HP_map_setgatcell_post ) {
+ void (*postHookFunc) (int16 *m, int16 *x, int16 *y, int *gat);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setgatcell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_setgatcell_post[hIndex].func;
+ postHookFunc(&m, &x, &y, &gat);
+ }
+ }
+ return;
+}
+void HP_map_cellfromcache(struct map_data *m) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_cellfromcache_pre ) {
+ void (*preHookFunc) (struct map_data *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_cellfromcache_pre[hIndex].func;
+ preHookFunc(m);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.cellfromcache(m);
+ }
+ if( HPMHooks.count.HP_map_cellfromcache_post ) {
+ void (*postHookFunc) (struct map_data *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_cellfromcache_post[hIndex].func;
+ postHookFunc(m);
+ }
+ }
+ return;
+}
+void HP_map_setusers(int p1) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_setusers_pre ) {
+ void (*preHookFunc) (int *p1);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setusers_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_setusers_pre[hIndex].func;
+ preHookFunc(&p1);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.setusers(p1);
+ }
+ if( HPMHooks.count.HP_map_setusers_post ) {
+ void (*postHookFunc) (int *p1);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setusers_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_setusers_post[hIndex].func;
+ postHookFunc(&p1);
+ }
+ }
+ return;
+}
+int HP_map_getusers(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_getusers_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_getusers_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.getusers();
+ }
+ if( HPMHooks.count.HP_map_getusers_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_getusers_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_map_usercount(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_usercount_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_usercount_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.usercount();
+ }
+ if( HPMHooks.count.HP_map_usercount_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_usercount_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_map_freeblock(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_freeblock_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_freeblock_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.freeblock(bl);
+ }
+ if( HPMHooks.count.HP_map_freeblock_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_freeblock_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_map_freeblock_lock(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_freeblock_lock_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_lock_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_freeblock_lock_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.freeblock_lock();
+ }
+ if( HPMHooks.count.HP_map_freeblock_lock_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_lock_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_freeblock_lock_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_map_freeblock_unlock(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_freeblock_unlock_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_unlock_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_freeblock_unlock_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.freeblock_unlock();
+ }
+ if( HPMHooks.count.HP_map_freeblock_unlock_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_unlock_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_freeblock_unlock_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_map_addblock(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_addblock_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_addblock_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.addblock(bl);
+ }
+ if( HPMHooks.count.HP_map_addblock_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_addblock_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_map_delblock(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_delblock_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_delblock_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.delblock(bl);
+ }
+ if( HPMHooks.count.HP_map_delblock_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_delblock_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_moveblock_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *x1, int *y1, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_moveblock_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &x1, &y1, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.moveblock(bl, x1, y1, tick);
+ }
+ if( HPMHooks.count.HP_map_moveblock_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *x1, int *y1, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_moveblock_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &x1, &y1, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_map_count_oncell(int16 m, int16 x, int16 y, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_count_oncell_pre ) {
+ int (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_oncell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_count_oncell_pre[hIndex].func;
+ retVal___ = preHookFunc(&m, &x, &y, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.count_oncell(m, x, y, type);
+ }
+ if( HPMHooks.count.HP_map_count_oncell_post ) {
+ int (*postHookFunc) (int retVal___, int16 *m, int16 *x, int16 *y, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_oncell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_count_oncell_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &m, &x, &y, &type);
+ }
+ }
+ return retVal___;
+}
+struct skill_unit* HP_map_find_skill_unit_oncell(struct block_list *target, int16 x, int16 y, uint16 skill_id, struct skill_unit *out_unit, int flag) {
+ int hIndex = 0;
+ struct skill_unit* retVal___ = NULL;
+ if( HPMHooks.count.HP_map_find_skill_unit_oncell_pre ) {
+ struct skill_unit* (*preHookFunc) (struct block_list *target, int16 *x, int16 *y, uint16 *skill_id, struct skill_unit *out_unit, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_find_skill_unit_oncell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_find_skill_unit_oncell_pre[hIndex].func;
+ retVal___ = preHookFunc(target, &x, &y, &skill_id, out_unit, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.find_skill_unit_oncell(target, x, y, skill_id, out_unit, flag);
+ }
+ if( HPMHooks.count.HP_map_find_skill_unit_oncell_post ) {
+ struct skill_unit* (*postHookFunc) (struct skill_unit* retVal___, struct block_list *target, int16 *x, int16 *y, uint16 *skill_id, struct skill_unit *out_unit, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_find_skill_unit_oncell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_find_skill_unit_oncell_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, target, &x, &y, &skill_id, out_unit, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_map_get_new_object_id(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_get_new_object_id_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_object_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_get_new_object_id_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.get_new_object_id();
+ }
+ if( HPMHooks.count.HP_map_get_new_object_id_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_object_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_get_new_object_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_map_search_freecell(struct block_list *src, int16 m, int16 *x, int16 *y, int16 rx, int16 ry, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_search_freecell_pre ) {
+ int (*preHookFunc) (struct block_list *src, int16 *m, int16 *x, int16 *y, int16 *rx, int16 *ry, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_search_freecell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_search_freecell_pre[hIndex].func;
+ retVal___ = preHookFunc(src, &m, x, y, &rx, &ry, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.search_freecell(src, m, x, y, rx, ry, flag);
+ }
+ if( HPMHooks.count.HP_map_search_freecell_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, int16 *m, int16 *x, int16 *y, int16 *rx, int16 *ry, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_search_freecell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_search_freecell_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, &m, x, y, &rx, &ry, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_map_quit(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_quit_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_quit_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.quit(sd);
+ }
+ if( HPMHooks.count.HP_map_quit_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_quit_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+bool HP_map_addnpc(int16 m, struct npc_data *nd) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_map_addnpc_pre ) {
+ bool (*preHookFunc) (int16 *m, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnpc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_addnpc_pre[hIndex].func;
+ retVal___ = preHookFunc(&m, nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.addnpc(m, nd);
+ }
+ if( HPMHooks.count.HP_map_addnpc_post ) {
+ bool (*postHookFunc) (bool retVal___, int16 *m, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnpc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_addnpc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &m, nd);
+ }
+ }
+ return retVal___;
+}
+int HP_map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_clearflooritem_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_clearflooritem_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.clearflooritem_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_map_clearflooritem_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_clearflooritem_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_map_removemobs_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_removemobs_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_removemobs_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.removemobs_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_map_removemobs_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_removemobs_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_map_clearflooritem(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_clearflooritem_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_clearflooritem_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.clearflooritem(bl);
+ }
+ if( HPMHooks.count.HP_map_clearflooritem_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_clearflooritem_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+int HP_map_addflooritem(struct item *item_data, int amount, int16 m, int16 x, int16 y, int first_charid, int second_charid, int third_charid, int flags) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_addflooritem_pre ) {
+ int (*preHookFunc) (struct item *item_data, int *amount, int16 *m, int16 *x, int16 *y, int *first_charid, int *second_charid, int *third_charid, int *flags);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_addflooritem_pre[hIndex].func;
+ retVal___ = preHookFunc(item_data, &amount, &m, &x, &y, &first_charid, &second_charid, &third_charid, &flags);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.addflooritem(item_data, amount, m, x, y, first_charid, second_charid, third_charid, flags);
+ }
+ if( HPMHooks.count.HP_map_addflooritem_post ) {
+ int (*postHookFunc) (int retVal___, struct item *item_data, int *amount, int16 *m, int16 *x, int16 *y, int *first_charid, int *second_charid, int *third_charid, int *flags);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_addflooritem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, item_data, &amount, &m, &x, &y, &first_charid, &second_charid, &third_charid, &flags);
+ }
+ }
+ return retVal___;
+}
+void HP_map_addnickdb(int charid, const char *nick) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_addnickdb_pre ) {
+ void (*preHookFunc) (int *charid, const char *nick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnickdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_addnickdb_pre[hIndex].func;
+ preHookFunc(&charid, nick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.addnickdb(charid, nick);
+ }
+ if( HPMHooks.count.HP_map_addnickdb_post ) {
+ void (*postHookFunc) (int *charid, const char *nick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnickdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_addnickdb_post[hIndex].func;
+ postHookFunc(&charid, nick);
+ }
+ }
+ return;
+}
+void HP_map_delnickdb(int charid, const char *nick) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_delnickdb_pre ) {
+ void (*preHookFunc) (int *charid, const char *nick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delnickdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_delnickdb_pre[hIndex].func;
+ preHookFunc(&charid, nick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.delnickdb(charid, nick);
+ }
+ if( HPMHooks.count.HP_map_delnickdb_post ) {
+ void (*postHookFunc) (int *charid, const char *nick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delnickdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_delnickdb_post[hIndex].func;
+ postHookFunc(&charid, nick);
+ }
+ }
+ return;
+}
+void HP_map_reqnickdb(struct map_session_data *sd, int charid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_reqnickdb_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *charid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reqnickdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_reqnickdb_pre[hIndex].func;
+ preHookFunc(sd, &charid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.reqnickdb(sd, charid);
+ }
+ if( HPMHooks.count.HP_map_reqnickdb_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *charid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reqnickdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_reqnickdb_post[hIndex].func;
+ postHookFunc(sd, &charid);
+ }
+ }
+ return;
+}
+const char* HP_map_charid2nick(int charid) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_map_charid2nick_pre ) {
+ const char* (*preHookFunc) (int *charid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2nick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_charid2nick_pre[hIndex].func;
+ retVal___ = preHookFunc(&charid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.charid2nick(charid);
+ }
+ if( HPMHooks.count.HP_map_charid2nick_post ) {
+ const char* (*postHookFunc) (const char* retVal___, int *charid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2nick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_charid2nick_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &charid);
+ }
+ }
+ return retVal___;
+}
+struct map_session_data* HP_map_charid2sd(int charid) {
+ int hIndex = 0;
+ struct map_session_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_map_charid2sd_pre ) {
+ struct map_session_data* (*preHookFunc) (int *charid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2sd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_charid2sd_pre[hIndex].func;
+ retVal___ = preHookFunc(&charid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.charid2sd(charid);
+ }
+ if( HPMHooks.count.HP_map_charid2sd_post ) {
+ struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, int *charid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2sd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_charid2sd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &charid);
+ }
+ }
+ return retVal___;
+}
+void HP_map_vforeachpc(int ( *func ) (struct map_session_data *sd, va_list args), va_list args) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_vforeachpc_pre ) {
+ void (*preHookFunc) (int ( *func ) (struct map_session_data *sd, va_list args), va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachpc_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_map_vforeachpc_pre[hIndex].func;
+ preHookFunc(func, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ HPMHooks.source.map.vforeachpc(func, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_map_vforeachpc_post ) {
+ void (*postHookFunc) (int ( *func ) (struct map_session_data *sd, va_list args), va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachpc_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_map_vforeachpc_post[hIndex].func;
+ postHookFunc(func, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return;
+}
+void HP_map_vforeachmob(int ( *func ) (struct mob_data *md, va_list args), va_list args) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_vforeachmob_pre ) {
+ void (*preHookFunc) (int ( *func ) (struct mob_data *md, va_list args), va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachmob_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_map_vforeachmob_pre[hIndex].func;
+ preHookFunc(func, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ HPMHooks.source.map.vforeachmob(func, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_map_vforeachmob_post ) {
+ void (*postHookFunc) (int ( *func ) (struct mob_data *md, va_list args), va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachmob_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_map_vforeachmob_post[hIndex].func;
+ postHookFunc(func, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return;
+}
+void HP_map_vforeachnpc(int ( *func ) (struct npc_data *nd, va_list args), va_list args) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_vforeachnpc_pre ) {
+ void (*preHookFunc) (int ( *func ) (struct npc_data *nd, va_list args), va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachnpc_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_map_vforeachnpc_pre[hIndex].func;
+ preHookFunc(func, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ HPMHooks.source.map.vforeachnpc(func, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_map_vforeachnpc_post ) {
+ void (*postHookFunc) (int ( *func ) (struct npc_data *nd, va_list args), va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachnpc_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_map_vforeachnpc_post[hIndex].func;
+ postHookFunc(func, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return;
+}
+void HP_map_vforeachregen(int ( *func ) (struct block_list *bl, va_list args), va_list args) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_vforeachregen_pre ) {
+ void (*preHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachregen_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_map_vforeachregen_pre[hIndex].func;
+ preHookFunc(func, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ HPMHooks.source.map.vforeachregen(func, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_map_vforeachregen_post ) {
+ void (*postHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachregen_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_map_vforeachregen_post[hIndex].func;
+ postHookFunc(func, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return;
+}
+void HP_map_vforeachiddb(int ( *func ) (struct block_list *bl, va_list args), va_list args) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_vforeachiddb_pre ) {
+ void (*preHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachiddb_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_map_vforeachiddb_pre[hIndex].func;
+ preHookFunc(func, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ HPMHooks.source.map.vforeachiddb(func, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_map_vforeachiddb_post ) {
+ void (*postHookFunc) (int ( *func ) (struct block_list *bl, va_list args), va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachiddb_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_map_vforeachiddb_post[hIndex].func;
+ postHookFunc(func, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return;
+}
+int HP_map_vforeachinrange(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int type, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_vforeachinrange_pre ) {
+ int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinrange_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_map_vforeachinrange_pre[hIndex].func;
+ retVal___ = preHookFunc(func, center, &range, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.map.vforeachinrange(func, center, range, type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_map_vforeachinrange_post ) {
+ int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinrange_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_map_vforeachinrange_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, func, center, &range, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_vforeachinshootrange(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int type, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_vforeachinshootrange_pre ) {
+ int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinshootrange_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_map_vforeachinshootrange_pre[hIndex].func;
+ retVal___ = preHookFunc(func, center, &range, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.map.vforeachinshootrange(func, center, range, type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_map_vforeachinshootrange_post ) {
+ int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinshootrange_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_map_vforeachinshootrange_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, func, center, &range, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_vforeachinarea(int ( *func ) (struct block_list *, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int type, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_vforeachinarea_pre ) {
+ int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinarea_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_map_vforeachinarea_pre[hIndex].func;
+ retVal___ = preHookFunc(func, &m, &x0, &y0, &x1, &y1, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.map.vforeachinarea(func, m, x0, y0, x1, y1, type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_map_vforeachinarea_post ) {
+ int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinarea_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_map_vforeachinarea_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, func, &m, &x0, &y0, &x1, &y1, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_vforcountinrange(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int count, int type, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_vforcountinrange_pre ) {
+ int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *count, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinrange_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_map_vforcountinrange_pre[hIndex].func;
+ retVal___ = preHookFunc(func, center, &range, &count, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.map.vforcountinrange(func, center, range, count, type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_map_vforcountinrange_post ) {
+ int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int *count, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinrange_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_map_vforcountinrange_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, func, center, &range, &count, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_vforcountinarea(int ( *func ) (struct block_list *, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int count, int type, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_vforcountinarea_pre ) {
+ int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *count, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinarea_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_map_vforcountinarea_pre[hIndex].func;
+ retVal___ = preHookFunc(func, &m, &x0, &y0, &x1, &y1, &count, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.map.vforcountinarea(func, m, x0, y0, x1, y1, count, type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_map_vforcountinarea_post ) {
+ int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *count, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinarea_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_map_vforcountinarea_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, func, &m, &x0, &y0, &x1, &y1, &count, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_vforeachinmovearea(int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int16 dx, int16 dy, int type, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_vforeachinmovearea_pre ) {
+ int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int16 *dx, int16 *dy, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmovearea_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_map_vforeachinmovearea_pre[hIndex].func;
+ retVal___ = preHookFunc(func, center, &range, &dx, &dy, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.map.vforeachinmovearea(func, center, range, dx, dy, type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_map_vforeachinmovearea_post ) {
+ int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 *range, int16 *dx, int16 *dy, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmovearea_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_map_vforeachinmovearea_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, func, center, &range, &dx, &dy, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_vforeachincell(int ( *func ) (struct block_list *, va_list), int16 m, int16 x, int16 y, int type, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_vforeachincell_pre ) {
+ int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x, int16 *y, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachincell_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_map_vforeachincell_pre[hIndex].func;
+ retVal___ = preHookFunc(func, &m, &x, &y, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.map.vforeachincell(func, m, x, y, type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_map_vforeachincell_post ) {
+ int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x, int16 *y, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachincell_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_map_vforeachincell_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, func, &m, &x, &y, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_vforeachinpath(int ( *func ) (struct block_list *, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int16 range, int length, int type, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_vforeachinpath_pre ) {
+ int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int16 *range, int *length, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinpath_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_map_vforeachinpath_pre[hIndex].func;
+ retVal___ = preHookFunc(func, &m, &x0, &y0, &x1, &y1, &range, &length, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.map.vforeachinpath(func, m, x0, y0, x1, y1, range, length, type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_map_vforeachinpath_post ) {
+ int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int16 *range, int *length, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinpath_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_map_vforeachinpath_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, func, &m, &x0, &y0, &x1, &y1, &range, &length, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_vforeachinmap(int ( *func ) (struct block_list *, va_list), int16 m, int type, va_list args) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_vforeachinmap_pre ) {
+ int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int *type, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmap_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_map_vforeachinmap_pre[hIndex].func;
+ retVal___ = preHookFunc(func, &m, &type, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.map.vforeachinmap(func, m, type, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_map_vforeachinmap_post ) {
+ int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *m, int *type, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmap_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_map_vforeachinmap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, func, &m, &type, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_vforeachininstance(int ( *func ) (struct block_list *, va_list), int16 instance_id, int type, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_vforeachininstance_pre ) {
+ int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *instance_id, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachininstance_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_map_vforeachininstance_pre[hIndex].func;
+ retVal___ = preHookFunc(func, &instance_id, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.map.vforeachininstance(func, instance_id, type, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_map_vforeachininstance_post ) {
+ int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 *instance_id, int *type, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachininstance_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_map_vforeachininstance_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, func, &instance_id, &type, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+struct map_session_data* HP_map_id2sd(int id) {
+ int hIndex = 0;
+ struct map_session_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_map_id2sd_pre ) {
+ struct map_session_data* (*preHookFunc) (int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2sd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_id2sd_pre[hIndex].func;
+ retVal___ = preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.id2sd(id);
+ }
+ if( HPMHooks.count.HP_map_id2sd_post ) {
+ struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2sd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_id2sd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id);
+ }
+ }
+ return retVal___;
+}
+struct mob_data* HP_map_id2md(int id) {
+ int hIndex = 0;
+ struct mob_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_map_id2md_pre ) {
+ struct mob_data* (*preHookFunc) (int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2md_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_id2md_pre[hIndex].func;
+ retVal___ = preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.id2md(id);
+ }
+ if( HPMHooks.count.HP_map_id2md_post ) {
+ struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2md_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_id2md_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id);
+ }
+ }
+ return retVal___;
+}
+struct npc_data* HP_map_id2nd(int id) {
+ int hIndex = 0;
+ struct npc_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_map_id2nd_pre ) {
+ struct npc_data* (*preHookFunc) (int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2nd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_id2nd_pre[hIndex].func;
+ retVal___ = preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.id2nd(id);
+ }
+ if( HPMHooks.count.HP_map_id2nd_post ) {
+ struct npc_data* (*postHookFunc) (struct npc_data* retVal___, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2nd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_id2nd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id);
+ }
+ }
+ return retVal___;
+}
+struct homun_data* HP_map_id2hd(int id) {
+ int hIndex = 0;
+ struct homun_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_map_id2hd_pre ) {
+ struct homun_data* (*preHookFunc) (int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2hd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_id2hd_pre[hIndex].func;
+ retVal___ = preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.id2hd(id);
+ }
+ if( HPMHooks.count.HP_map_id2hd_post ) {
+ struct homun_data* (*postHookFunc) (struct homun_data* retVal___, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2hd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_id2hd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id);
+ }
+ }
+ return retVal___;
+}
+struct mercenary_data* HP_map_id2mc(int id) {
+ int hIndex = 0;
+ struct mercenary_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_map_id2mc_pre ) {
+ struct mercenary_data* (*preHookFunc) (int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2mc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_id2mc_pre[hIndex].func;
+ retVal___ = preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.id2mc(id);
+ }
+ if( HPMHooks.count.HP_map_id2mc_post ) {
+ struct mercenary_data* (*postHookFunc) (struct mercenary_data* retVal___, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2mc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_id2mc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id);
+ }
+ }
+ return retVal___;
+}
+struct chat_data* HP_map_id2cd(int id) {
+ int hIndex = 0;
+ struct chat_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_map_id2cd_pre ) {
+ struct chat_data* (*preHookFunc) (int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2cd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_id2cd_pre[hIndex].func;
+ retVal___ = preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.id2cd(id);
+ }
+ if( HPMHooks.count.HP_map_id2cd_post ) {
+ struct chat_data* (*postHookFunc) (struct chat_data* retVal___, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2cd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_id2cd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id);
+ }
+ }
+ return retVal___;
+}
+struct block_list* HP_map_id2bl(int id) {
+ int hIndex = 0;
+ struct block_list* retVal___ = NULL;
+ if( HPMHooks.count.HP_map_id2bl_pre ) {
+ struct block_list* (*preHookFunc) (int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2bl_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_id2bl_pre[hIndex].func;
+ retVal___ = preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.id2bl(id);
+ }
+ if( HPMHooks.count.HP_map_id2bl_post ) {
+ struct block_list* (*postHookFunc) (struct block_list* retVal___, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2bl_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_id2bl_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id);
+ }
+ }
+ return retVal___;
+}
+bool HP_map_blid_exists(int id) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_map_blid_exists_pre ) {
+ bool (*preHookFunc) (int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_blid_exists_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_blid_exists_pre[hIndex].func;
+ retVal___ = preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.blid_exists(id);
+ }
+ if( HPMHooks.count.HP_map_blid_exists_post ) {
+ bool (*postHookFunc) (bool retVal___, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_blid_exists_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_blid_exists_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id);
+ }
+ }
+ return retVal___;
+}
+int16 HP_map_mapindex2mapid(unsigned short mapindex) {
+ int hIndex = 0;
+ int16 retVal___;
+ memset(&retVal___, '\0', sizeof(int16));
+ if( HPMHooks.count.HP_map_mapindex2mapid_pre ) {
+ int16 (*preHookFunc) (unsigned short *mapindex);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_mapindex2mapid_pre[hIndex].func;
+ retVal___ = preHookFunc(&mapindex);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.mapindex2mapid(mapindex);
+ }
+ if( HPMHooks.count.HP_map_mapindex2mapid_post ) {
+ int16 (*postHookFunc) (int16 retVal___, unsigned short *mapindex);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_mapindex2mapid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &mapindex);
+ }
+ }
+ return retVal___;
+}
+int16 HP_map_mapname2mapid(const char *name) {
+ int hIndex = 0;
+ int16 retVal___;
+ memset(&retVal___, '\0', sizeof(int16));
+ if( HPMHooks.count.HP_map_mapname2mapid_pre ) {
+ int16 (*preHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_mapname2mapid_pre[hIndex].func;
+ retVal___ = preHookFunc(name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.mapname2mapid(name);
+ }
+ if( HPMHooks.count.HP_map_mapname2mapid_post ) {
+ int16 (*postHookFunc) (int16 retVal___, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_mapname2mapid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name);
+ }
+ }
+ return retVal___;
+}
+int HP_map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_mapname2ipport_pre ) {
+ int (*preHookFunc) (unsigned short *name, uint32 *ip, uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2ipport_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_mapname2ipport_pre[hIndex].func;
+ retVal___ = preHookFunc(&name, ip, port);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.mapname2ipport(name, ip, port);
+ }
+ if( HPMHooks.count.HP_map_mapname2ipport_post ) {
+ int (*postHookFunc) (int retVal___, unsigned short *name, uint32 *ip, uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2ipport_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_mapname2ipport_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &name, ip, port);
+ }
+ }
+ return retVal___;
+}
+int HP_map_setipport(unsigned short mapindex, uint32 ip, uint16 port) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_setipport_pre ) {
+ int (*preHookFunc) (unsigned short *mapindex, 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.setipport(mapindex, ip, port);
+ }
+ if( HPMHooks.count.HP_map_setipport_post ) {
+ int (*postHookFunc) (int retVal___, unsigned short *mapindex, 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);
+ }
+ }
+ return retVal___;
+}
+int HP_map_eraseipport(unsigned short mapindex, uint32 ip, uint16 port) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_eraseipport_pre ) {
+ int (*preHookFunc) (unsigned short *mapindex, 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.eraseipport(mapindex, ip, port);
+ }
+ if( HPMHooks.count.HP_map_eraseipport_post ) {
+ int (*postHookFunc) (int retVal___, unsigned short *mapindex, 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);
+ }
+ }
+ return retVal___;
+}
+int HP_map_eraseallipport(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_eraseallipport_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_eraseallipport_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.eraseallipport();
+ }
+ if( HPMHooks.count.HP_map_eraseallipport_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_eraseallipport_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_map_addiddb(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_addiddb_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_addiddb_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.addiddb(bl);
+ }
+ if( HPMHooks.count.HP_map_addiddb_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_addiddb_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+void HP_map_deliddb(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_deliddb_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_deliddb_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.deliddb(bl);
+ }
+ if( HPMHooks.count.HP_map_deliddb_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_deliddb_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+struct map_session_data* HP_map_nick2sd(const char *nick) {
+ int hIndex = 0;
+ struct map_session_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_map_nick2sd_pre ) {
+ struct map_session_data* (*preHookFunc) (const char *nick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_nick2sd_pre[hIndex].func;
+ retVal___ = preHookFunc(nick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.nick2sd(nick);
+ }
+ if( HPMHooks.count.HP_map_nick2sd_post ) {
+ struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, const char *nick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_nick2sd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, nick);
+ }
+ }
+ return retVal___;
+}
+struct mob_data* HP_map_getmob_boss(int16 m) {
+ int hIndex = 0;
+ struct mob_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_map_getmob_boss_pre ) {
+ struct mob_data* (*preHookFunc) (int16 *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getmob_boss_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_getmob_boss_pre[hIndex].func;
+ retVal___ = preHookFunc(&m);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.getmob_boss(m);
+ }
+ if( HPMHooks.count.HP_map_getmob_boss_post ) {
+ struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int16 *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getmob_boss_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_getmob_boss_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &m);
+ }
+ }
+ return retVal___;
+}
+struct mob_data* HP_map_id2boss(int id) {
+ int hIndex = 0;
+ struct mob_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_map_id2boss_pre ) {
+ struct mob_data* (*preHookFunc) (int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2boss_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_id2boss_pre[hIndex].func;
+ retVal___ = preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.id2boss(id);
+ }
+ if( HPMHooks.count.HP_map_id2boss_post ) {
+ struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2boss_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_id2boss_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id);
+ }
+ }
+ return retVal___;
+}
+void HP_map_reloadnpc(bool clear) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_reloadnpc_pre ) {
+ void (*preHookFunc) (bool *clear);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_reloadnpc_pre[hIndex].func;
+ preHookFunc(&clear);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.reloadnpc(clear);
+ }
+ if( HPMHooks.count.HP_map_reloadnpc_post ) {
+ void (*postHookFunc) (bool *clear);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_reloadnpc_post[hIndex].func;
+ postHookFunc(&clear);
+ }
+ }
+ return;
+}
+int HP_map_check_dir(int s_dir, int t_dir) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_check_dir_pre ) {
+ int (*preHookFunc) (int *s_dir, int *t_dir);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_check_dir_pre[hIndex].func;
+ retVal___ = preHookFunc(&s_dir, &t_dir);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.check_dir(s_dir, t_dir);
+ }
+ if( HPMHooks.count.HP_map_check_dir_post ) {
+ int (*postHookFunc) (int retVal___, int *s_dir, int *t_dir);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_check_dir_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &s_dir, &t_dir);
+ }
+ }
+ return retVal___;
+}
+uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) {
+ int hIndex = 0;
+ uint8 retVal___;
+ memset(&retVal___, '\0', sizeof(uint8));
+ if( HPMHooks.count.HP_map_calc_dir_pre ) {
+ uint8 (*preHookFunc) (struct block_list *src, int16 *x, int16 *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_calc_dir_pre[hIndex].func;
+ retVal___ = preHookFunc(src, &x, &y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.calc_dir(src, x, y);
+ }
+ if( HPMHooks.count.HP_map_calc_dir_post ) {
+ uint8 (*postHookFunc) (uint8 retVal___, struct block_list *src, int16 *x, int16 *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_calc_dir_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, &x, &y);
+ }
+ }
+ return retVal___;
+}
+int HP_map_random_dir(struct block_list *bl, short *x, short *y) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_random_dir_pre ) {
+ int (*preHookFunc) (struct block_list *bl, short *x, short *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_random_dir_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_random_dir_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, x, y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.random_dir(bl, x, y);
+ }
+ if( HPMHooks.count.HP_map_random_dir_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, short *x, short *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_random_dir_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_random_dir_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, x, y);
+ }
+ }
+ return retVal___;
+}
+int HP_map_cleanup_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_cleanup_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_map_cleanup_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.map.cleanup_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_map_cleanup_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_map_cleanup_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_delmap(char *mapname) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_delmap_pre ) {
+ int (*preHookFunc) (char *mapname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_delmap_pre[hIndex].func;
+ retVal___ = preHookFunc(mapname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.delmap(mapname);
+ }
+ if( HPMHooks.count.HP_map_delmap_post ) {
+ int (*postHookFunc) (int retVal___, char *mapname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_delmap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, mapname);
+ }
+ }
+ return retVal___;
+}
+void HP_map_flags_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_flags_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_flags_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.flags_init();
+ }
+ if( HPMHooks.count.HP_map_flags_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_flags_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shootable, const char *wall_name) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_map_iwall_set_pre ) {
+ bool (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *size, int8 *dir, bool *shootable, const char *wall_name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_set_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_iwall_set_pre[hIndex].func;
+ retVal___ = preHookFunc(&m, &x, &y, &size, &dir, &shootable, wall_name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.iwall_set(m, x, y, size, dir, shootable, wall_name);
+ }
+ if( HPMHooks.count.HP_map_iwall_set_post ) {
+ bool (*postHookFunc) (bool retVal___, int16 *m, int16 *x, int16 *y, int *size, int8 *dir, bool *shootable, const char *wall_name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_set_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_iwall_set_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &m, &x, &y, &size, &dir, &shootable, wall_name);
+ }
+ }
+ return retVal___;
+}
+void HP_map_iwall_get(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_iwall_get_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_iwall_get_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.iwall_get(sd);
+ }
+ if( HPMHooks.count.HP_map_iwall_get_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_iwall_get_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_map_iwall_remove(const char *wall_name) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_iwall_remove_pre ) {
+ void (*preHookFunc) (const char *wall_name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_iwall_remove_pre[hIndex].func;
+ preHookFunc(wall_name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.iwall_remove(wall_name);
+ }
+ if( HPMHooks.count.HP_map_iwall_remove_post ) {
+ void (*postHookFunc) (const char *wall_name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_iwall_remove_post[hIndex].func;
+ postHookFunc(wall_name);
+ }
+ }
+ return;
+}
+int HP_map_addmobtolist(unsigned short m, struct spawn_data *spawn) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_addmobtolist_pre ) {
+ int (*preHookFunc) (unsigned short *m, struct spawn_data *spawn);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmobtolist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_addmobtolist_pre[hIndex].func;
+ retVal___ = preHookFunc(&m, spawn);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.addmobtolist(m, spawn);
+ }
+ if( HPMHooks.count.HP_map_addmobtolist_post ) {
+ int (*postHookFunc) (int retVal___, unsigned short *m, struct spawn_data *spawn);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmobtolist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_addmobtolist_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &m, spawn);
+ }
+ }
+ return retVal___;
+}
+void HP_map_spawnmobs(int16 m) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_spawnmobs_pre ) {
+ void (*preHookFunc) (int16 *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_spawnmobs_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_spawnmobs_pre[hIndex].func;
+ preHookFunc(&m);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.spawnmobs(m);
+ }
+ if( HPMHooks.count.HP_map_spawnmobs_post ) {
+ void (*postHookFunc) (int16 *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_spawnmobs_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_spawnmobs_post[hIndex].func;
+ postHookFunc(&m);
+ }
+ }
+ return;
+}
+void HP_map_removemobs(int16 m) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_removemobs_pre ) {
+ void (*preHookFunc) (int16 *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_removemobs_pre[hIndex].func;
+ preHookFunc(&m);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.removemobs(m);
+ }
+ if( HPMHooks.count.HP_map_removemobs_post ) {
+ void (*postHookFunc) (int16 *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_removemobs_post[hIndex].func;
+ postHookFunc(&m);
+ }
+ }
+ return;
+}
+void HP_map_addmap2db(struct map_data *m) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_addmap2db_pre ) {
+ void (*preHookFunc) (struct map_data *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_addmap2db_pre[hIndex].func;
+ preHookFunc(m);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.addmap2db(m);
+ }
+ if( HPMHooks.count.HP_map_addmap2db_post ) {
+ void (*postHookFunc) (struct map_data *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_addmap2db_post[hIndex].func;
+ postHookFunc(m);
+ }
+ }
+ return;
+}
+void HP_map_removemapdb(struct map_data *m) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_removemapdb_pre ) {
+ void (*preHookFunc) (struct map_data *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_removemapdb_pre[hIndex].func;
+ preHookFunc(m);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.removemapdb(m);
+ }
+ if( HPMHooks.count.HP_map_removemapdb_post ) {
+ void (*postHookFunc) (struct map_data *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_removemapdb_post[hIndex].func;
+ postHookFunc(m);
+ }
+ }
+ return;
+}
+void HP_map_clean(int i) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_clean_pre ) {
+ void (*preHookFunc) (int *i);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clean_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_clean_pre[hIndex].func;
+ preHookFunc(&i);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.clean(i);
+ }
+ if( HPMHooks.count.HP_map_clean_post ) {
+ void (*postHookFunc) (int *i);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clean_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_clean_post[hIndex].func;
+ postHookFunc(&i);
+ }
+ }
+ return;
+}
+void HP_map_do_shutdown(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_do_shutdown_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_do_shutdown_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.do_shutdown();
+ }
+ if( HPMHooks.count.HP_map_do_shutdown_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_do_shutdown_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_map_freeblock_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_freeblock_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_freeblock_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.freeblock_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_map_freeblock_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_freeblock_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_map_searchrandfreecell(int16 m, int16 *x, int16 *y, int stack) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_searchrandfreecell_pre ) {
+ int (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *stack);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_searchrandfreecell_pre[hIndex].func;
+ retVal___ = preHookFunc(&m, x, y, &stack);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.searchrandfreecell(m, x, y, stack);
+ }
+ if( HPMHooks.count.HP_map_searchrandfreecell_post ) {
+ int (*postHookFunc) (int retVal___, int16 *m, int16 *x, int16 *y, int *stack);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_searchrandfreecell_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &m, x, y, &stack);
+ }
+ }
+ return retVal___;
+}
+int HP_map_count_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_count_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_map_count_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.map.count_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_map_count_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_map_count_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+DBData HP_map_create_charid2nick(DBKey key, va_list args) {
+ int hIndex = 0;
+ DBData retVal___;
+ memset(&retVal___, '\0', sizeof(DBData));
+ if( HPMHooks.count.HP_map_create_charid2nick_pre ) {
+ DBData (*preHookFunc) (DBKey *key, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_charid2nick_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_map_create_charid2nick_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.map.create_charid2nick(key, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_map_create_charid2nick_post ) {
+ DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_charid2nick_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_map_create_charid2nick_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_removemobs_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_removemobs_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_map_removemobs_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.map.removemobs_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_map_removemobs_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_map_removemobs_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+struct mapcell HP_map_gat2cell(int gat) {
+ int hIndex = 0;
+ struct mapcell retVal___;
+ memset(&retVal___, '\0', sizeof(struct mapcell));
+ if( HPMHooks.count.HP_map_gat2cell_pre ) {
+ struct mapcell (*preHookFunc) (int *gat);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_gat2cell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_gat2cell_pre[hIndex].func;
+ retVal___ = preHookFunc(&gat);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.gat2cell(gat);
+ }
+ if( HPMHooks.count.HP_map_gat2cell_post ) {
+ struct mapcell (*postHookFunc) (struct mapcell retVal___, int *gat);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_gat2cell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_gat2cell_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &gat);
+ }
+ }
+ return retVal___;
+}
+int HP_map_cell2gat(struct mapcell cell) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_cell2gat_pre ) {
+ int (*preHookFunc) (struct mapcell *cell);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cell2gat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_cell2gat_pre[hIndex].func;
+ retVal___ = preHookFunc(&cell);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.cell2gat(cell);
+ }
+ if( HPMHooks.count.HP_map_cell2gat_post ) {
+ int (*postHookFunc) (int retVal___, struct mapcell *cell);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cell2gat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_cell2gat_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &cell);
+ }
+ }
+ return retVal___;
+}
+int HP_map_getcellp(struct map_data *m, int16 x, int16 y, cell_chk cellchk) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_getcellp_pre ) {
+ int (*preHookFunc) (struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_getcellp_pre[hIndex].func;
+ retVal___ = preHookFunc(m, &x, &y, &cellchk);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.getcellp(m, x, y, cellchk);
+ }
+ if( HPMHooks.count.HP_map_getcellp_post ) {
+ int (*postHookFunc) (int retVal___, struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_getcellp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, m, &x, &y, &cellchk);
+ }
+ }
+ return retVal___;
+}
+void HP_map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_setcell_pre ) {
+ void (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setcell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_setcell_pre[hIndex].func;
+ preHookFunc(&m, &x, &y, &cell, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.setcell(m, x, y, cell, flag);
+ }
+ if( HPMHooks.count.HP_map_setcell_post ) {
+ void (*postHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setcell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_setcell_post[hIndex].func;
+ postHookFunc(&m, &x, &y, &cell, &flag);
+ }
+ }
+ return;
+}
+int HP_map_sub_getcellp(struct map_data *m, int16 x, int16 y, cell_chk cellchk) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_sub_getcellp_pre ) {
+ int (*preHookFunc) (struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_getcellp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_sub_getcellp_pre[hIndex].func;
+ retVal___ = preHookFunc(m, &x, &y, &cellchk);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.sub_getcellp(m, x, y, cellchk);
+ }
+ if( HPMHooks.count.HP_map_sub_getcellp_post ) {
+ int (*postHookFunc) (int retVal___, struct map_data *m, int16 *x, int16 *y, cell_chk *cellchk);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_getcellp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_sub_getcellp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, m, &x, &y, &cellchk);
+ }
+ }
+ return retVal___;
+}
+void HP_map_sub_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_sub_setcell_pre ) {
+ void (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_setcell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_sub_setcell_pre[hIndex].func;
+ preHookFunc(&m, &x, &y, &cell, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.sub_setcell(m, x, y, cell, flag);
+ }
+ if( HPMHooks.count.HP_map_sub_setcell_post ) {
+ void (*postHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_setcell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_sub_setcell_post[hIndex].func;
+ postHookFunc(&m, &x, &y, &cell, &flag);
+ }
+ }
+ return;
+}
+void HP_map_iwall_nextxy(int16 x, int16 y, int8 dir, int pos, int16 *x1, int16 *y1) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_iwall_nextxy_pre ) {
+ void (*preHookFunc) (int16 *x, int16 *y, int8 *dir, int *pos, int16 *x1, int16 *y1);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_nextxy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_iwall_nextxy_pre[hIndex].func;
+ preHookFunc(&x, &y, &dir, &pos, x1, y1);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.iwall_nextxy(x, y, dir, pos, x1, y1);
+ }
+ if( HPMHooks.count.HP_map_iwall_nextxy_post ) {
+ void (*postHookFunc) (int16 *x, int16 *y, int8 *dir, int *pos, int16 *x1, int16 *y1);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_nextxy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_iwall_nextxy_post[hIndex].func;
+ postHookFunc(&x, &y, &dir, &pos, x1, y1);
+ }
+ }
+ return;
+}
+DBData HP_map_create_map_data_other_server(DBKey key, va_list args) {
+ int hIndex = 0;
+ DBData retVal___;
+ memset(&retVal___, '\0', sizeof(DBData));
+ if( HPMHooks.count.HP_map_create_map_data_other_server_pre ) {
+ DBData (*preHookFunc) (DBKey *key, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_map_data_other_server_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_map_create_map_data_other_server_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.map.create_map_data_other_server(key, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_map_create_map_data_other_server_post ) {
+ DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_map_data_other_server_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_map_create_map_data_other_server_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_eraseallipport_sub(DBKey key, DBData *data, va_list va) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_eraseallipport_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list va);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_sub_pre; hIndex++ ) {
+ va_list va___copy; va_copy(va___copy, va);
+ preHookFunc = HPMHooks.list.HP_map_eraseallipport_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, va___copy);
+ va_end(va___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list va___copy; va_copy(va___copy, va);
+ retVal___ = HPMHooks.source.map.eraseallipport_sub(key, data, va___copy);
+ va_end(va___copy);
+ }
+ if( HPMHooks.count.HP_map_eraseallipport_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list va);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_sub_post; hIndex++ ) {
+ va_list va___copy; va_copy(va___copy, va);
+ postHookFunc = HPMHooks.list.HP_map_eraseallipport_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, va___copy);
+ va_end(va___copy);
+ }
+ }
+ return retVal___;
+}
+char* HP_map_init_mapcache(FILE *fp) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_map_init_mapcache_pre ) {
+ char* (*preHookFunc) (FILE *fp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_init_mapcache_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_init_mapcache_pre[hIndex].func;
+ retVal___ = preHookFunc(fp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.init_mapcache(fp);
+ }
+ if( HPMHooks.count.HP_map_init_mapcache_post ) {
+ char* (*postHookFunc) (char* retVal___, FILE *fp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_init_mapcache_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_init_mapcache_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fp);
+ }
+ }
+ return retVal___;
+}
+int HP_map_readfromcache(struct map_data *m, char *buffer) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_readfromcache_pre ) {
+ int (*preHookFunc) (struct map_data *m, char *buffer);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_readfromcache_pre[hIndex].func;
+ retVal___ = preHookFunc(m, buffer);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.readfromcache(m, buffer);
+ }
+ if( HPMHooks.count.HP_map_readfromcache_post ) {
+ int (*postHookFunc) (int retVal___, struct map_data *m, char *buffer);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_readfromcache_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, m, buffer);
+ }
+ }
+ return retVal___;
+}
+int HP_map_addmap(char *mapname) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_addmap_pre ) {
+ int (*preHookFunc) (char *mapname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_addmap_pre[hIndex].func;
+ retVal___ = preHookFunc(mapname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.addmap(mapname);
+ }
+ if( HPMHooks.count.HP_map_addmap_post ) {
+ int (*postHookFunc) (int retVal___, char *mapname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_addmap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, mapname);
+ }
+ }
+ return retVal___;
+}
+void HP_map_delmapid(int id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_delmapid_pre ) {
+ void (*preHookFunc) (int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmapid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_delmapid_pre[hIndex].func;
+ preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.delmapid(id);
+ }
+ if( HPMHooks.count.HP_map_delmapid_post ) {
+ void (*postHookFunc) (int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmapid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_delmapid_post[hIndex].func;
+ postHookFunc(&id);
+ }
+ }
+ return;
+}
+void HP_map_zone_db_clear(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_zone_db_clear_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_db_clear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_zone_db_clear_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.zone_db_clear();
+ }
+ if( HPMHooks.count.HP_map_zone_db_clear_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_db_clear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_zone_db_clear_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_map_list_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_list_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_list_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.list_final();
+ }
+ if( HPMHooks.count.HP_map_list_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_list_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_map_waterheight(char *mapname) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_waterheight_pre ) {
+ int (*preHookFunc) (char *mapname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_waterheight_pre[hIndex].func;
+ retVal___ = preHookFunc(mapname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.waterheight(mapname);
+ }
+ if( HPMHooks.count.HP_map_waterheight_post ) {
+ int (*postHookFunc) (int retVal___, char *mapname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_waterheight_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, mapname);
+ }
+ }
+ return retVal___;
+}
+int HP_map_readgat(struct map_data *m) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_readgat_pre ) {
+ int (*preHookFunc) (struct map_data *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_readgat_pre[hIndex].func;
+ retVal___ = preHookFunc(m);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.readgat(m);
+ }
+ if( HPMHooks.count.HP_map_readgat_post ) {
+ int (*postHookFunc) (int retVal___, struct map_data *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_readgat_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, m);
+ }
+ }
+ return retVal___;
+}
+int HP_map_readallmaps(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_readallmaps_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readallmaps_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_readallmaps_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.readallmaps();
+ }
+ if( HPMHooks.count.HP_map_readallmaps_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readallmaps_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_readallmaps_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_map_config_read(char *cfgName) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_config_read_pre ) {
+ int (*preHookFunc) (char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_config_read_pre[hIndex].func;
+ retVal___ = preHookFunc(cfgName);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.config_read(cfgName);
+ }
+ if( HPMHooks.count.HP_map_config_read_post ) {
+ int (*postHookFunc) (int retVal___, char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_config_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, cfgName);
+ }
+ }
+ return retVal___;
+}
+int HP_map_config_read_sub(char *cfgName) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_config_read_sub_pre ) {
+ int (*preHookFunc) (char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_config_read_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(cfgName);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.config_read_sub(cfgName);
+ }
+ if( HPMHooks.count.HP_map_config_read_sub_post ) {
+ int (*postHookFunc) (int retVal___, char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_config_read_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, cfgName);
+ }
+ }
+ return retVal___;
+}
+void HP_map_reloadnpc_sub(char *cfgName) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_reloadnpc_sub_pre ) {
+ void (*preHookFunc) (char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_reloadnpc_sub_pre[hIndex].func;
+ preHookFunc(cfgName);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.reloadnpc_sub(cfgName);
+ }
+ if( HPMHooks.count.HP_map_reloadnpc_sub_post ) {
+ void (*postHookFunc) (char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_reloadnpc_sub_post[hIndex].func;
+ postHookFunc(cfgName);
+ }
+ }
+ return;
+}
+int HP_map_inter_config_read(char *cfgName) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_inter_config_read_pre ) {
+ int (*preHookFunc) (char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_inter_config_read_pre[hIndex].func;
+ retVal___ = preHookFunc(cfgName);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.inter_config_read(cfgName);
+ }
+ if( HPMHooks.count.HP_map_inter_config_read_post ) {
+ int (*postHookFunc) (int retVal___, char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_inter_config_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, cfgName);
+ }
+ }
+ return retVal___;
+}
+int HP_map_sql_init(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_sql_init_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_sql_init_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.sql_init();
+ }
+ if( HPMHooks.count.HP_map_sql_init_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_sql_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_map_sql_close(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_sql_close_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_close_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_sql_close_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.sql_close();
+ }
+ if( HPMHooks.count.HP_map_sql_close_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_close_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_sql_close_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+bool HP_map_zone_mf_cache(int m, char *flag, char *params) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_map_zone_mf_cache_pre ) {
+ bool (*preHookFunc) (int *m, char *flag, char *params);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_mf_cache_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_zone_mf_cache_pre[hIndex].func;
+ retVal___ = preHookFunc(&m, flag, params);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.zone_mf_cache(m, flag, params);
+ }
+ if( HPMHooks.count.HP_map_zone_mf_cache_post ) {
+ bool (*postHookFunc) (bool retVal___, int *m, char *flag, char *params);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_mf_cache_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_zone_mf_cache_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &m, flag, params);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_map_zone_str2itemid(const char *name) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_map_zone_str2itemid_pre ) {
+ unsigned short (*preHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2itemid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_zone_str2itemid_pre[hIndex].func;
+ retVal___ = preHookFunc(name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.zone_str2itemid(name);
+ }
+ if( HPMHooks.count.HP_map_zone_str2itemid_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2itemid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_zone_str2itemid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_map_zone_str2skillid(const char *name) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_map_zone_str2skillid_pre ) {
+ unsigned short (*preHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2skillid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_zone_str2skillid_pre[hIndex].func;
+ retVal___ = preHookFunc(name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.zone_str2skillid(name);
+ }
+ if( HPMHooks.count.HP_map_zone_str2skillid_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2skillid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_zone_str2skillid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name);
+ }
+ }
+ return retVal___;
+}
+enum bl_type HP_map_zone_bl_type(const char *entry, enum map_zone_skill_subtype *subtype) {
+ int hIndex = 0;
+ enum bl_type retVal___;
+ memset(&retVal___, '\0', sizeof(enum bl_type));
+ if( HPMHooks.count.HP_map_zone_bl_type_pre ) {
+ enum bl_type (*preHookFunc) (const char *entry, enum map_zone_skill_subtype *subtype);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_bl_type_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_zone_bl_type_pre[hIndex].func;
+ retVal___ = preHookFunc(entry, subtype);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.zone_bl_type(entry, subtype);
+ }
+ if( HPMHooks.count.HP_map_zone_bl_type_post ) {
+ enum bl_type (*postHookFunc) (enum bl_type retVal___, const char *entry, enum map_zone_skill_subtype *subtype);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_bl_type_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_zone_bl_type_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, entry, subtype);
+ }
+ }
+ return retVal___;
+}
+void HP_map_read_zone_db(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_read_zone_db_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_zone_db_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_read_zone_db_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.read_zone_db();
+ }
+ if( HPMHooks.count.HP_map_read_zone_db_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_zone_db_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_read_zone_db_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_map_db_final(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_db_final_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_db_final_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_map_db_final_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.map.db_final(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_map_db_final_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_db_final_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_map_db_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_nick_db_final(DBKey key, DBData *data, va_list args) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_nick_db_final_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick_db_final_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_map_nick_db_final_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.map.nick_db_final(key, data, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_map_nick_db_final_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick_db_final_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_map_nick_db_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_cleanup_db_sub(DBKey key, DBData *data, va_list va) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_cleanup_db_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list va);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_db_sub_pre; hIndex++ ) {
+ va_list va___copy; va_copy(va___copy, va);
+ preHookFunc = HPMHooks.list.HP_map_cleanup_db_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, va___copy);
+ va_end(va___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list va___copy; va_copy(va___copy, va);
+ retVal___ = HPMHooks.source.map.cleanup_db_sub(key, data, va___copy);
+ va_end(va___copy);
+ }
+ if( HPMHooks.count.HP_map_cleanup_db_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list va);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_db_sub_post; hIndex++ ) {
+ va_list va___copy; va_copy(va___copy, va);
+ postHookFunc = HPMHooks.list.HP_map_cleanup_db_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, va___copy);
+ va_end(va___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_map_abort_sub(struct map_session_data *sd, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_map_abort_sub_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_abort_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_map_abort_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.map.abort_sub(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_map_abort_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_abort_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_map_abort_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_map_helpscreen(bool do_exit) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_helpscreen_pre ) {
+ void (*preHookFunc) (bool *do_exit);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_helpscreen_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_helpscreen_pre[hIndex].func;
+ preHookFunc(&do_exit);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.helpscreen(do_exit);
+ }
+ if( HPMHooks.count.HP_map_helpscreen_post ) {
+ void (*postHookFunc) (bool *do_exit);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_helpscreen_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_helpscreen_post[hIndex].func;
+ postHookFunc(&do_exit);
+ }
+ }
+ return;
+}
+void HP_map_versionscreen(bool do_exit) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_versionscreen_pre ) {
+ void (*preHookFunc) (bool *do_exit);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_versionscreen_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_versionscreen_pre[hIndex].func;
+ preHookFunc(&do_exit);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.versionscreen(do_exit);
+ }
+ if( HPMHooks.count.HP_map_versionscreen_post ) {
+ void (*postHookFunc) (bool *do_exit);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_versionscreen_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_versionscreen_post[hIndex].func;
+ postHookFunc(&do_exit);
+ }
+ }
+ return;
+}
+bool HP_map_arg_next_value(const char *option, int i, int argc) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_map_arg_next_value_pre ) {
+ bool (*preHookFunc) (const char *option, int *i, int *argc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_arg_next_value_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_arg_next_value_pre[hIndex].func;
+ retVal___ = preHookFunc(option, &i, &argc);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.arg_next_value(option, i, argc);
+ }
+ if( HPMHooks.count.HP_map_arg_next_value_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *option, int *i, int *argc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_arg_next_value_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_arg_next_value_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, option, &i, &argc);
+ }
+ }
+ return retVal___;
+}
+void HP_map_addblcell(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_addblcell_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblcell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_addblcell_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.addblcell(bl);
+ }
+ if( HPMHooks.count.HP_map_addblcell_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblcell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_addblcell_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+void HP_map_delblcell(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_map_delblcell_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblcell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_delblcell_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.map.delblcell(bl);
+ }
+ if( HPMHooks.count.HP_map_delblcell_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblcell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_delblcell_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+/* mapit */
+struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types) {
+ int hIndex = 0;
+ struct s_mapiterator* retVal___ = NULL;
+ if( HPMHooks.count.HP_mapit_alloc_pre ) {
+ struct s_mapiterator* (*preHookFunc) (enum e_mapitflags *flags, enum bl_type *types);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_alloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapit_alloc_pre[hIndex].func;
+ retVal___ = preHookFunc(&flags, &types);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapit.alloc(flags, types);
+ }
+ if( HPMHooks.count.HP_mapit_alloc_post ) {
+ struct s_mapiterator* (*postHookFunc) (struct s_mapiterator* retVal___, enum e_mapitflags *flags, enum bl_type *types);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_alloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapit_alloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &flags, &types);
+ }
+ }
+ return retVal___;
+}
+void HP_mapit_free(struct s_mapiterator *iter) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mapit_free_pre ) {
+ void (*preHookFunc) (struct s_mapiterator *iter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapit_free_pre[hIndex].func;
+ preHookFunc(iter);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapit.free(iter);
+ }
+ if( HPMHooks.count.HP_mapit_free_post ) {
+ void (*postHookFunc) (struct s_mapiterator *iter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapit_free_post[hIndex].func;
+ postHookFunc(iter);
+ }
+ }
+ return;
+}
+struct block_list* HP_mapit_first(struct s_mapiterator *iter) {
+ int hIndex = 0;
+ struct block_list* retVal___ = NULL;
+ if( HPMHooks.count.HP_mapit_first_pre ) {
+ struct block_list* (*preHookFunc) (struct s_mapiterator *iter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapit_first_pre[hIndex].func;
+ retVal___ = preHookFunc(iter);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapit.first(iter);
+ }
+ if( HPMHooks.count.HP_mapit_first_post ) {
+ struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapit_first_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, iter);
+ }
+ }
+ return retVal___;
+}
+struct block_list* HP_mapit_last(struct s_mapiterator *iter) {
+ int hIndex = 0;
+ struct block_list* retVal___ = NULL;
+ if( HPMHooks.count.HP_mapit_last_pre ) {
+ struct block_list* (*preHookFunc) (struct s_mapiterator *iter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapit_last_pre[hIndex].func;
+ retVal___ = preHookFunc(iter);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapit.last(iter);
+ }
+ if( HPMHooks.count.HP_mapit_last_post ) {
+ struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapit_last_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, iter);
+ }
+ }
+ return retVal___;
+}
+struct block_list* HP_mapit_next(struct s_mapiterator *iter) {
+ int hIndex = 0;
+ struct block_list* retVal___ = NULL;
+ if( HPMHooks.count.HP_mapit_next_pre ) {
+ struct block_list* (*preHookFunc) (struct s_mapiterator *iter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapit_next_pre[hIndex].func;
+ retVal___ = preHookFunc(iter);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapit.next(iter);
+ }
+ if( HPMHooks.count.HP_mapit_next_post ) {
+ struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapit_next_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, iter);
+ }
+ }
+ return retVal___;
+}
+struct block_list* HP_mapit_prev(struct s_mapiterator *iter) {
+ int hIndex = 0;
+ struct block_list* retVal___ = NULL;
+ if( HPMHooks.count.HP_mapit_prev_pre ) {
+ struct block_list* (*preHookFunc) (struct s_mapiterator *iter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapit_prev_pre[hIndex].func;
+ retVal___ = preHookFunc(iter);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapit.prev(iter);
+ }
+ if( HPMHooks.count.HP_mapit_prev_post ) {
+ struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapit_prev_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, iter);
+ }
+ }
+ return retVal___;
+}
+bool HP_mapit_exists(struct s_mapiterator *iter) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mapit_exists_pre ) {
+ bool (*preHookFunc) (struct s_mapiterator *iter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapit_exists_pre[hIndex].func;
+ retVal___ = preHookFunc(iter);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapit.exists(iter);
+ }
+ if( HPMHooks.count.HP_mapit_exists_post ) {
+ bool (*postHookFunc) (bool retVal___, struct s_mapiterator *iter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapit_exists_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, iter);
+ }
+ }
+ return retVal___;
+}
+/* mapreg */
+void HP_mapreg_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mapreg_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapreg_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapreg.init();
+ }
+ if( HPMHooks.count.HP_mapreg_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapreg_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_mapreg_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mapreg_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapreg_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapreg.final();
+ }
+ if( HPMHooks.count.HP_mapreg_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapreg_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_mapreg_readreg(int uid) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mapreg_readreg_pre ) {
+ int (*preHookFunc) (int *uid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readreg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapreg_readreg_pre[hIndex].func;
+ retVal___ = preHookFunc(&uid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapreg.readreg(uid);
+ }
+ if( HPMHooks.count.HP_mapreg_readreg_post ) {
+ int (*postHookFunc) (int retVal___, int *uid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readreg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapreg_readreg_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &uid);
+ }
+ }
+ return retVal___;
+}
+char* HP_mapreg_readregstr(int uid) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_mapreg_readregstr_pre ) {
+ char* (*preHookFunc) (int *uid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readregstr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapreg_readregstr_pre[hIndex].func;
+ retVal___ = preHookFunc(&uid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapreg.readregstr(uid);
+ }
+ if( HPMHooks.count.HP_mapreg_readregstr_post ) {
+ char* (*postHookFunc) (char* retVal___, int *uid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readregstr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapreg_readregstr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &uid);
+ }
+ }
+ return retVal___;
+}
+bool HP_mapreg_setreg(int uid, int val) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mapreg_setreg_pre ) {
+ bool (*preHookFunc) (int *uid, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setreg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapreg_setreg_pre[hIndex].func;
+ retVal___ = preHookFunc(&uid, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapreg.setreg(uid, val);
+ }
+ if( HPMHooks.count.HP_mapreg_setreg_post ) {
+ bool (*postHookFunc) (bool retVal___, int *uid, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setreg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapreg_setreg_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &uid, &val);
+ }
+ }
+ return retVal___;
+}
+bool HP_mapreg_setregstr(int uid, const char *str) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mapreg_setregstr_pre ) {
+ bool (*preHookFunc) (int *uid, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setregstr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapreg_setregstr_pre[hIndex].func;
+ retVal___ = preHookFunc(&uid, str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapreg.setregstr(uid, str);
+ }
+ if( HPMHooks.count.HP_mapreg_setregstr_post ) {
+ bool (*postHookFunc) (bool retVal___, int *uid, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setregstr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapreg_setregstr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &uid, str);
+ }
+ }
+ return retVal___;
+}
+void HP_mapreg_load(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mapreg_load_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapreg_load_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapreg.load();
+ }
+ if( HPMHooks.count.HP_mapreg_load_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapreg_load_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_mapreg_save(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mapreg_save_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapreg_save_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapreg.save();
+ }
+ if( HPMHooks.count.HP_mapreg_save_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapreg_save_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_mapreg_save_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mapreg_save_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapreg_save_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapreg.save_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_mapreg_save_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapreg_save_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_mapreg_reload(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mapreg_reload_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapreg_reload_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapreg.reload();
+ }
+ if( HPMHooks.count.HP_mapreg_reload_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapreg_reload_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_mapreg_config_read(const char *w1, const char *w2) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mapreg_config_read_pre ) {
+ bool (*preHookFunc) (const char *w1, const char *w2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapreg_config_read_pre[hIndex].func;
+ retVal___ = preHookFunc(w1, w2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapreg.config_read(w1, w2);
+ }
+ if( HPMHooks.count.HP_mapreg_config_read_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *w1, const char *w2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapreg_config_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, w1, w2);
+ }
+ }
+ return retVal___;
+}
+/* mercenary */
+void HP_mercenary_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mercenary_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mercenary.init();
+ }
+ if( HPMHooks.count.HP_mercenary_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_mercenary_class(int class_) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mercenary_class_pre ) {
+ bool (*preHookFunc) (int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_class_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_class_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.class(class_);
+ }
+ if( HPMHooks.count.HP_mercenary_class_post ) {
+ bool (*postHookFunc) (bool retVal___, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_class_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_class_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_);
+ }
+ }
+ return retVal___;
+}
+struct view_data* HP_mercenary_get_viewdata(int class_) {
+ int hIndex = 0;
+ struct view_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_mercenary_get_viewdata_pre ) {
+ struct view_data* (*preHookFunc) (int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_viewdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_get_viewdata_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.get_viewdata(class_);
+ }
+ if( HPMHooks.count.HP_mercenary_get_viewdata_post ) {
+ struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_viewdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_get_viewdata_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_create(struct map_session_data *sd, int class_, unsigned int lifetime) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_create_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *class_, unsigned int *lifetime);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_create_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &class_, &lifetime);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.create(sd, class_, lifetime);
+ }
+ if( HPMHooks.count.HP_mercenary_create_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *class_, unsigned int *lifetime);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &class_, &lifetime);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_data_received(struct s_mercenary *merc, bool flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_data_received_pre ) {
+ int (*preHookFunc) (struct s_mercenary *merc, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_data_received_pre[hIndex].func;
+ retVal___ = preHookFunc(merc, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.data_received(merc, flag);
+ }
+ if( HPMHooks.count.HP_mercenary_data_received_post ) {
+ int (*postHookFunc) (int retVal___, struct s_mercenary *merc, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_data_received_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, merc, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_save(struct mercenary_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_save_pre ) {
+ int (*preHookFunc) (struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_save_pre[hIndex].func;
+ retVal___ = preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.save(md);
+ }
+ if( HPMHooks.count.HP_mercenary_save_post ) {
+ int (*postHookFunc) (int retVal___, struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_save_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md);
+ }
+ }
+ return retVal___;
+}
+void HP_mercenary_heal(struct mercenary_data *md, int hp, int sp) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mercenary_heal_pre ) {
+ void (*preHookFunc) (struct mercenary_data *md, int *hp, int *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_heal_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_heal_pre[hIndex].func;
+ preHookFunc(md, &hp, &sp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mercenary.heal(md, hp, sp);
+ }
+ if( HPMHooks.count.HP_mercenary_heal_post ) {
+ void (*postHookFunc) (struct mercenary_data *md, int *hp, int *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_heal_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_heal_post[hIndex].func;
+ postHookFunc(md, &hp, &sp);
+ }
+ }
+ return;
+}
+int HP_mercenary_dead(struct mercenary_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_dead_pre ) {
+ int (*preHookFunc) (struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_dead_pre[hIndex].func;
+ retVal___ = preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.dead(md);
+ }
+ if( HPMHooks.count.HP_mercenary_dead_post ) {
+ int (*postHookFunc) (int retVal___, struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_dead_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_delete(struct mercenary_data *md, int reply) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_delete_pre ) {
+ int (*preHookFunc) (struct mercenary_data *md, int *reply);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &reply);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.delete(md, reply);
+ }
+ if( HPMHooks.count.HP_mercenary_delete_post ) {
+ int (*postHookFunc) (int retVal___, struct mercenary_data *md, int *reply);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &reply);
+ }
+ }
+ return retVal___;
+}
+void HP_mercenary_contract_stop(struct mercenary_data *md) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mercenary_contract_stop_pre ) {
+ void (*preHookFunc) (struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_contract_stop_pre[hIndex].func;
+ preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mercenary.contract_stop(md);
+ }
+ if( HPMHooks.count.HP_mercenary_contract_stop_post ) {
+ void (*postHookFunc) (struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_contract_stop_post[hIndex].func;
+ postHookFunc(md);
+ }
+ }
+ return;
+}
+int HP_mercenary_get_lifetime(struct mercenary_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_get_lifetime_pre ) {
+ int (*preHookFunc) (struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_lifetime_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_get_lifetime_pre[hIndex].func;
+ retVal___ = preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.get_lifetime(md);
+ }
+ if( HPMHooks.count.HP_mercenary_get_lifetime_post ) {
+ int (*postHookFunc) (int retVal___, struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_lifetime_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_get_lifetime_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_get_guild(struct mercenary_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_get_guild_pre ) {
+ int (*preHookFunc) (struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_guild_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_get_guild_pre[hIndex].func;
+ retVal___ = preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.get_guild(md);
+ }
+ if( HPMHooks.count.HP_mercenary_get_guild_post ) {
+ int (*postHookFunc) (int retVal___, struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_guild_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_get_guild_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_get_faith(struct mercenary_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_get_faith_pre ) {
+ int (*preHookFunc) (struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_faith_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_get_faith_pre[hIndex].func;
+ retVal___ = preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.get_faith(md);
+ }
+ if( HPMHooks.count.HP_mercenary_get_faith_post ) {
+ int (*postHookFunc) (int retVal___, struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_faith_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_get_faith_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_set_faith(struct mercenary_data *md, int value) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_set_faith_pre ) {
+ int (*preHookFunc) (struct mercenary_data *md, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_faith_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_set_faith_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.set_faith(md, value);
+ }
+ if( HPMHooks.count.HP_mercenary_set_faith_post ) {
+ int (*postHookFunc) (int retVal___, struct mercenary_data *md, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_faith_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_set_faith_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_get_calls(struct mercenary_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_get_calls_pre ) {
+ int (*preHookFunc) (struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_calls_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_get_calls_pre[hIndex].func;
+ retVal___ = preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.get_calls(md);
+ }
+ if( HPMHooks.count.HP_mercenary_get_calls_post ) {
+ int (*postHookFunc) (int retVal___, struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_calls_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_get_calls_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_set_calls(struct mercenary_data *md, int value) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_set_calls_pre ) {
+ int (*preHookFunc) (struct mercenary_data *md, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_calls_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_set_calls_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.set_calls(md, value);
+ }
+ if( HPMHooks.count.HP_mercenary_set_calls_post ) {
+ int (*postHookFunc) (int retVal___, struct mercenary_data *md, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_calls_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_set_calls_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_kills(struct mercenary_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_kills_pre ) {
+ int (*preHookFunc) (struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_kills_pre[hIndex].func;
+ retVal___ = preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.kills(md);
+ }
+ if( HPMHooks.count.HP_mercenary_kills_post ) {
+ int (*postHookFunc) (int retVal___, struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_kills_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_checkskill(struct mercenary_data *md, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_checkskill_pre ) {
+ int (*preHookFunc) (struct mercenary_data *md, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_checkskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_checkskill_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.checkskill(md, skill_id);
+ }
+ if( HPMHooks.count.HP_mercenary_checkskill_post ) {
+ int (*postHookFunc) (int retVal___, struct mercenary_data *md, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_checkskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_checkskill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_read_db(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_read_db_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_read_db_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.read_db();
+ }
+ if( HPMHooks.count.HP_mercenary_read_db_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_read_db_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_read_skilldb(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_read_skilldb_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skilldb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_read_skilldb_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.read_skilldb();
+ }
+ if( HPMHooks.count.HP_mercenary_read_skilldb_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skilldb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_read_skilldb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_killbonus(struct mercenary_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_killbonus_pre ) {
+ int (*preHookFunc) (struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_killbonus_pre[hIndex].func;
+ retVal___ = preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.killbonus(md);
+ }
+ if( HPMHooks.count.HP_mercenary_killbonus_post ) {
+ int (*postHookFunc) (int retVal___, struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_killbonus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_search_index(int class_) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_search_index_pre ) {
+ int (*preHookFunc) (int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_search_index_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_search_index_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.search_index(class_);
+ }
+ if( HPMHooks.count.HP_mercenary_search_index_post ) {
+ int (*postHookFunc) (int retVal___, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_search_index_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_search_index_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_);
+ }
+ }
+ return retVal___;
+}
+int HP_mercenary_contract_end_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mercenary_contract_end_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_contract_end_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.contract_end_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_mercenary_contract_end_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_contract_end_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+bool HP_mercenary_read_db_sub(char *str[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mercenary_read_db_sub_pre ) {
+ bool (*preHookFunc) (char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_read_db_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.read_db_sub(str, columns, current);
+ }
+ if( HPMHooks.count.HP_mercenary_read_db_sub_post ) {
+ bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_read_db_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_mercenary_read_skill_db_sub(char *str[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mercenary_read_skill_db_sub_pre ) {
+ bool (*preHookFunc) (char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skill_db_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mercenary_read_skill_db_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mercenary.read_skill_db_sub(str, columns, current);
+ }
+ if( HPMHooks.count.HP_mercenary_read_skill_db_sub_post ) {
+ bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skill_db_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mercenary_read_skill_db_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+/* mob */
+int HP_mob_init(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_init_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_init_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.init();
+ }
+ if( HPMHooks.count.HP_mob_init_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_final(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_final_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_final_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.final();
+ }
+ if( HPMHooks.count.HP_mob_final_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_mob_reload(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mob_reload_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_reload_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.reload();
+ }
+ if( HPMHooks.count.HP_mob_reload_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_reload_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+struct mob_db* HP_mob_db(int index) {
+ int hIndex = 0;
+ struct mob_db* retVal___ = NULL;
+ if( HPMHooks.count.HP_mob_db_pre ) {
+ struct mob_db* (*preHookFunc) (int *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_db_pre[hIndex].func;
+ retVal___ = preHookFunc(&index);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.db(index);
+ }
+ if( HPMHooks.count.HP_mob_db_post ) {
+ struct mob_db* (*postHookFunc) (struct mob_db* retVal___, int *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_db_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &index);
+ }
+ }
+ return retVal___;
+}
+struct mob_chat* HP_mob_chat(short id) {
+ int hIndex = 0;
+ struct mob_chat* retVal___ = NULL;
+ if( HPMHooks.count.HP_mob_chat_pre ) {
+ struct mob_chat* (*preHookFunc) (short *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_chat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_chat_pre[hIndex].func;
+ retVal___ = preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.chat(id);
+ }
+ if( HPMHooks.count.HP_mob_chat_post ) {
+ struct mob_chat* (*postHookFunc) (struct mob_chat* retVal___, short *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_chat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_chat_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_makedummymobdb(int p1) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_makedummymobdb_pre ) {
+ int (*preHookFunc) (int *p1);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_makedummymobdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_makedummymobdb_pre[hIndex].func;
+ retVal___ = preHookFunc(&p1);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.makedummymobdb(p1);
+ }
+ if( HPMHooks.count.HP_mob_makedummymobdb_post ) {
+ int (*postHookFunc) (int retVal___, int *p1);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_makedummymobdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_makedummymobdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &p1);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_spawn_guardian_sub(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_spawn_guardian_sub_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_spawn_guardian_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.spawn_guardian_sub(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_mob_spawn_guardian_sub_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_spawn_guardian_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_skill_id2skill_idx(int class_, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_skill_id2skill_idx_pre ) {
+ int (*preHookFunc) (int *class_, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_id2skill_idx_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_skill_id2skill_idx_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.skill_id2skill_idx(class_, skill_id);
+ }
+ if( HPMHooks.count.HP_mob_skill_id2skill_idx_post ) {
+ int (*postHookFunc) (int retVal___, int *class_, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_id2skill_idx_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_skill_id2skill_idx_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_db_searchname(const char *str) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_db_searchname_pre ) {
+ int (*preHookFunc) (const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_db_searchname_pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.db_searchname(str);
+ }
+ if( HPMHooks.count.HP_mob_db_searchname_post ) {
+ int (*postHookFunc) (int retVal___, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_db_searchname_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_db_searchname_array_sub(struct mob_db *mob, const char *str, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_db_searchname_array_sub_pre ) {
+ int (*preHookFunc) (struct mob_db *mob, 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.db_searchname_array_sub(mob, 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);
+ 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);
+ }
+ }
+ return retVal___;
+}
+void HP_mob_mvptomb_create(struct mob_data *md, char *killer, time_t time) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mob_mvptomb_create_pre ) {
+ void (*preHookFunc) (struct mob_data *md, char *killer, time_t *time);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_mvptomb_create_pre[hIndex].func;
+ preHookFunc(md, killer, &time);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.mvptomb_create(md, killer, time);
+ }
+ if( HPMHooks.count.HP_mob_mvptomb_create_post ) {
+ void (*postHookFunc) (struct mob_data *md, char *killer, time_t *time);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_mvptomb_create_post[hIndex].func;
+ postHookFunc(md, killer, &time);
+ }
+ }
+ return;
+}
+void HP_mob_mvptomb_destroy(struct mob_data *md) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mob_mvptomb_destroy_pre ) {
+ void (*preHookFunc) (struct mob_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_mvptomb_destroy_pre[hIndex].func;
+ preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.mvptomb_destroy(md);
+ }
+ if( HPMHooks.count.HP_mob_mvptomb_destroy_post ) {
+ void (*postHookFunc) (struct mob_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_mvptomb_destroy_post[hIndex].func;
+ postHookFunc(md);
+ }
+ }
+ return;
+}
+int HP_mob_db_searchname_array(struct mob_db **data, int size, const char *str, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_db_searchname_array_pre ) {
+ int (*preHookFunc) (struct mob_db **data, int *size, const char *str, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_db_searchname_array_pre[hIndex].func;
+ retVal___ = preHookFunc(data, &size, str, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.db_searchname_array(data, size, str, flag);
+ }
+ if( HPMHooks.count.HP_mob_db_searchname_array_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_db **data, int *size, const char *str, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_db_searchname_array_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data, &size, str, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_db_checkid(const int id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_db_checkid_pre ) {
+ int (*preHookFunc) (const int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_checkid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_db_checkid_pre[hIndex].func;
+ retVal___ = preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.db_checkid(id);
+ }
+ if( HPMHooks.count.HP_mob_db_checkid_post ) {
+ int (*postHookFunc) (int retVal___, const int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_checkid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_db_checkid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id);
+ }
+ }
+ return retVal___;
+}
+struct view_data* HP_mob_get_viewdata(int class_) {
+ int hIndex = 0;
+ struct view_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_mob_get_viewdata_pre ) {
+ struct view_data* (*preHookFunc) (int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_viewdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_get_viewdata_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.get_viewdata(class_);
+ }
+ if( HPMHooks.count.HP_mob_get_viewdata_post ) {
+ struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_viewdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_get_viewdata_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_parse_dataset(struct spawn_data *data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_parse_dataset_pre ) {
+ int (*preHookFunc) (struct spawn_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dataset_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_parse_dataset_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.parse_dataset(data);
+ }
+ if( HPMHooks.count.HP_mob_parse_dataset_post ) {
+ int (*postHookFunc) (int retVal___, struct spawn_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dataset_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_parse_dataset_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+struct mob_data* HP_mob_spawn_dataset(struct spawn_data *data) {
+ int hIndex = 0;
+ struct mob_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_mob_spawn_dataset_pre ) {
+ struct mob_data* (*preHookFunc) (struct spawn_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_dataset_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_spawn_dataset_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.spawn_dataset(data);
+ }
+ if( HPMHooks.count.HP_mob_spawn_dataset_post ) {
+ struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct spawn_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_dataset_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_spawn_dataset_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_get_random_id(int type, int flag, int lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_get_random_id_pre ) {
+ int (*preHookFunc) (int *type, int *flag, int *lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_random_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_get_random_id_pre[hIndex].func;
+ retVal___ = preHookFunc(&type, &flag, &lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.get_random_id(type, flag, lv);
+ }
+ if( HPMHooks.count.HP_mob_get_random_id_post ) {
+ int (*postHookFunc) (int retVal___, int *type, int *flag, int *lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_random_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_get_random_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type, &flag, &lv);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_ksprotected(struct block_list *src, struct block_list *target) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mob_ksprotected_pre ) {
+ bool (*preHookFunc) (struct block_list *src, struct block_list *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ksprotected_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_ksprotected_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.ksprotected(src, target);
+ }
+ if( HPMHooks.count.HP_mob_ksprotected_post ) {
+ bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ksprotected_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_ksprotected_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target);
+ }
+ }
+ return retVal___;
+}
+struct mob_data* HP_mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int class_, const char *event, unsigned int size, unsigned int ai) {
+ int hIndex = 0;
+ struct mob_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_mob_once_spawn_sub_pre ) {
+ struct mob_data* (*preHookFunc) (struct block_list *bl, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, const char *event, unsigned int *size, unsigned int *ai);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_once_spawn_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &m, &x, &y, mobname, &class_, event, &size, &ai);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.once_spawn_sub(bl, m, x, y, mobname, class_, event, size, ai);
+ }
+ if( HPMHooks.count.HP_mob_once_spawn_sub_post ) {
+ struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct block_list *bl, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, const char *event, unsigned int *size, unsigned int *ai);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_once_spawn_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &m, &x, &y, mobname, &class_, event, &size, &ai);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_once_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, const char *mobname, int class_, int amount, const char *event, unsigned int size, unsigned int ai) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_once_spawn_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_once_spawn_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &m, &x, &y, mobname, &class_, &amount, event, &size, &ai);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.once_spawn(sd, m, x, y, mobname, class_, amount, event, size, ai);
+ }
+ if( HPMHooks.count.HP_mob_once_spawn_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_once_spawn_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &m, &x, &y, mobname, &class_, &amount, event, &size, &ai);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_once_spawn_area(struct map_session_data *sd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, const char *mobname, int class_, int amount, const char *event, unsigned int size, unsigned int ai) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_once_spawn_area_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_area_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_once_spawn_area_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &m, &x0, &y0, &x1, &y1, mobname, &class_, &amount, event, &size, &ai);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.once_spawn_area(sd, m, x0, y0, x1, y1, mobname, class_, amount, event, size, ai);
+ }
+ if( HPMHooks.count.HP_mob_once_spawn_area_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, const char *mobname, int *class_, int *amount, const char *event, unsigned int *size, unsigned int *ai);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_area_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_once_spawn_area_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &m, &x0, &y0, &x1, &y1, mobname, &class_, &amount, event, &size, &ai);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_spawn_guardian(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_spawn_guardian_pre ) {
+ int (*preHookFunc) (const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, int *guardian, bool *has_index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_spawn_guardian_pre[hIndex].func;
+ retVal___ = preHookFunc(mapname, &x, &y, mobname, &class_, event, &guardian, &has_index);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.spawn_guardian(mapname, x, y, mobname, class_, event, guardian, has_index);
+ }
+ if( HPMHooks.count.HP_mob_spawn_guardian_post ) {
+ int (*postHookFunc) (int retVal___, const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, int *guardian, bool *has_index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_spawn_guardian_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, mapname, &x, &y, mobname, &class_, event, &guardian, &has_index);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_spawn_bg(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_spawn_bg_pre ) {
+ int (*preHookFunc) (const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, unsigned int *bg_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_bg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_spawn_bg_pre[hIndex].func;
+ retVal___ = preHookFunc(mapname, &x, &y, mobname, &class_, event, &bg_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.spawn_bg(mapname, x, y, mobname, class_, event, bg_id);
+ }
+ if( HPMHooks.count.HP_mob_spawn_bg_post ) {
+ int (*postHookFunc) (int retVal___, const char *mapname, short *x, short *y, const char *mobname, int *class_, const char *event, unsigned int *bg_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_bg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_spawn_bg_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, mapname, &x, &y, mobname, &class_, event, &bg_id);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_can_reach(struct mob_data *md, struct block_list *bl, int range, int state) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_can_reach_pre ) {
+ int (*preHookFunc) (struct mob_data *md, struct block_list *bl, int *range, int *state);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_reach_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_can_reach_pre[hIndex].func;
+ retVal___ = preHookFunc(md, bl, &range, &state);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.can_reach(md, bl, range, state);
+ }
+ if( HPMHooks.count.HP_mob_can_reach_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *bl, int *range, int *state);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_reach_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_can_reach_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, bl, &range, &state);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_linksearch(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_linksearch_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_linksearch_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_mob_linksearch_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.mob.linksearch(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_mob_linksearch_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_linksearch_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_mob_linksearch_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_delayspawn(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_delayspawn_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_delayspawn_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.delayspawn(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_mob_delayspawn_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_delayspawn_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_setdelayspawn(struct mob_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_setdelayspawn_pre ) {
+ int (*preHookFunc) (struct mob_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_setdelayspawn_pre[hIndex].func;
+ retVal___ = preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.setdelayspawn(md);
+ }
+ if( HPMHooks.count.HP_mob_setdelayspawn_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_setdelayspawn_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_count_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_count_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_count_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_mob_count_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.mob.count_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_mob_count_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_count_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_mob_count_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_spawn(struct mob_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_spawn_pre ) {
+ int (*preHookFunc) (struct mob_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_spawn_pre[hIndex].func;
+ retVal___ = preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.spawn(md);
+ }
+ if( HPMHooks.count.HP_mob_spawn_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_spawn_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_can_changetarget(struct mob_data *md, struct block_list *target, int mode) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_can_changetarget_pre ) {
+ int (*preHookFunc) (struct mob_data *md, struct block_list *target, int *mode);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_changetarget_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_can_changetarget_pre[hIndex].func;
+ retVal___ = preHookFunc(md, target, &mode);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.can_changetarget(md, target, mode);
+ }
+ if( HPMHooks.count.HP_mob_can_changetarget_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *target, int *mode);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_changetarget_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_can_changetarget_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, target, &mode);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_target(struct mob_data *md, struct block_list *bl, int dist) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_target_pre ) {
+ int (*preHookFunc) (struct mob_data *md, struct block_list *bl, int *dist);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_target_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_target_pre[hIndex].func;
+ retVal___ = preHookFunc(md, bl, &dist);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.target(md, bl, dist);
+ }
+ if( HPMHooks.count.HP_mob_target_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *bl, int *dist);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_target_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_target_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, bl, &dist);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_ai_sub_hard_activesearch(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_activesearch_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.mob.ai_sub_hard_activesearch(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_mob_ai_sub_hard_activesearch_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_activesearch_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_activesearch_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_ai_sub_hard_changechase(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_changechase_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.mob.ai_sub_hard_changechase(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_mob_ai_sub_hard_changechase_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_changechase_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_changechase_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_ai_sub_hard_bg_ally(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_bg_ally_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.mob.ai_sub_hard_bg_ally(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_bg_ally_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_lootsearch_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.mob.ai_sub_hard_lootsearch(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_lootsearch_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_warpchase_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_warpchase_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_mob_warpchase_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.mob.warpchase_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_mob_warpchase_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_mob_warpchase_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre ) {
+ int (*preHookFunc) (struct mob_data *md, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_slavemob_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.ai_sub_hard_slavemob(md, tick);
+ }
+ if( HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_slavemob_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_unlocktarget(struct mob_data *md, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_unlocktarget_pre ) {
+ int (*preHookFunc) (struct mob_data *md, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_unlocktarget_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.unlocktarget(md, tick);
+ }
+ if( HPMHooks.count.HP_mob_unlocktarget_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_unlocktarget_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_randomwalk(struct mob_data *md, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_randomwalk_pre ) {
+ int (*preHookFunc) (struct mob_data *md, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_randomwalk_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.randomwalk(md, tick);
+ }
+ if( HPMHooks.count.HP_mob_randomwalk_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_randomwalk_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_warpchase(struct mob_data *md, struct block_list *target) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_warpchase_pre ) {
+ int (*preHookFunc) (struct mob_data *md, struct block_list *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_warpchase_pre[hIndex].func;
+ retVal___ = preHookFunc(md, target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.warpchase(md, target);
+ }
+ if( HPMHooks.count.HP_mob_warpchase_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_warpchase_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, target);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_ai_sub_hard(struct mob_data *md, unsigned int tick) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mob_ai_sub_hard_pre ) {
+ bool (*preHookFunc) (struct mob_data *md, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.ai_sub_hard(md, tick);
+ }
+ if( HPMHooks.count.HP_mob_ai_sub_hard_post ) {
+ bool (*postHookFunc) (bool retVal___, struct mob_data *md, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_ai_sub_hard_timer(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_ai_sub_hard_timer_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_timer_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.mob.ai_sub_hard_timer(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_mob_ai_sub_hard_timer_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_timer_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_mob_ai_sub_hard_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_ai_sub_foreachclient_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_foreachclient_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_mob_ai_sub_foreachclient_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.mob.ai_sub_foreachclient(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_mob_ai_sub_foreachclient_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_foreachclient_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_mob_ai_sub_foreachclient_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_ai_sub_lazy(struct mob_data *md, va_list args) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_ai_sub_lazy_pre ) {
+ int (*preHookFunc) (struct mob_data *md, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_lazy_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_mob_ai_sub_lazy_pre[hIndex].func;
+ retVal___ = preHookFunc(md, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.mob.ai_sub_lazy(md, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_mob_ai_sub_lazy_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_lazy_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_mob_ai_sub_lazy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_ai_lazy(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_ai_lazy_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_ai_lazy_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.ai_lazy(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_mob_ai_lazy_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_ai_lazy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_ai_hard(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_ai_hard_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_ai_hard_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.ai_hard(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_mob_ai_hard_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_ai_hard_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data) {
+ int hIndex = 0;
+ struct item_drop* retVal___ = NULL;
+ if( HPMHooks.count.HP_mob_setdropitem_pre ) {
+ struct item_drop* (*preHookFunc) (int *nameid, int *qty, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_setdropitem_pre[hIndex].func;
+ retVal___ = preHookFunc(&nameid, &qty, data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.setdropitem(nameid, qty, data);
+ }
+ if( HPMHooks.count.HP_mob_setdropitem_post ) {
+ struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int *nameid, int *qty, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_setdropitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &nameid, &qty, data);
+ }
+ }
+ return retVal___;
+}
+struct item_drop* HP_mob_setlootitem(struct item *item) {
+ int hIndex = 0;
+ struct item_drop* retVal___ = NULL;
+ if( HPMHooks.count.HP_mob_setlootitem_pre ) {
+ struct item_drop* (*preHookFunc) (struct item *item);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_setlootitem_pre[hIndex].func;
+ retVal___ = preHookFunc(item);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.setlootitem(item);
+ }
+ if( HPMHooks.count.HP_mob_setlootitem_post ) {
+ struct item_drop* (*postHookFunc) (struct item_drop* retVal___, struct item *item);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_setlootitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, item);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_delay_item_drop_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_delay_item_drop_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.delay_item_drop(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_mob_delay_item_drop_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_delay_item_drop_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int loot, int drop_rate, unsigned short flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mob_item_drop_pre ) {
+ void (*preHookFunc) (struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int *loot, int *drop_rate, unsigned short *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_drop_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_item_drop_pre[hIndex].func;
+ preHookFunc(md, dlist, ditem, &loot, &drop_rate, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.item_drop(md, dlist, ditem, loot, drop_rate, flag);
+ }
+ if( HPMHooks.count.HP_mob_item_drop_post ) {
+ void (*postHookFunc) (struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int *loot, int *drop_rate, unsigned short *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_drop_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_item_drop_post[hIndex].func;
+ postHookFunc(md, dlist, ditem, &loot, &drop_rate, &flag);
+ }
+ }
+ return;
+}
+int HP_mob_timer_delete(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_timer_delete_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_timer_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.timer_delete(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_mob_timer_delete_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_timer_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_deleteslave_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_deleteslave_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_mob_deleteslave_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.mob.deleteslave_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_mob_deleteslave_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_mob_deleteslave_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_deleteslave(struct mob_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_deleteslave_pre ) {
+ int (*preHookFunc) (struct mob_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_deleteslave_pre[hIndex].func;
+ retVal___ = preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.deleteslave(md);
+ }
+ if( HPMHooks.count.HP_mob_deleteslave_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_deleteslave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_respawn(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_respawn_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_respawn_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.respawn(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_mob_respawn_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_respawn_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_mob_log_damage(struct mob_data *md, struct block_list *src, int damage) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mob_log_damage_pre ) {
+ void (*preHookFunc) (struct mob_data *md, struct block_list *src, int *damage);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_log_damage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_log_damage_pre[hIndex].func;
+ preHookFunc(md, src, &damage);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.log_damage(md, src, damage);
+ }
+ if( HPMHooks.count.HP_mob_log_damage_post ) {
+ void (*postHookFunc) (struct mob_data *md, struct block_list *src, int *damage);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_log_damage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_log_damage_post[hIndex].func;
+ postHookFunc(md, src, &damage);
+ }
+ }
+ return;
+}
+void HP_mob_damage(struct mob_data *md, struct block_list *src, int damage) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mob_damage_pre ) {
+ void (*preHookFunc) (struct mob_data *md, struct block_list *src, int *damage);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_damage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_damage_pre[hIndex].func;
+ preHookFunc(md, src, &damage);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.damage(md, src, damage);
+ }
+ if( HPMHooks.count.HP_mob_damage_post ) {
+ void (*postHookFunc) (struct mob_data *md, struct block_list *src, int *damage);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_damage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_damage_post[hIndex].func;
+ postHookFunc(md, src, &damage);
+ }
+ }
+ return;
+}
+int HP_mob_dead(struct mob_data *md, struct block_list *src, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_dead_pre ) {
+ int (*preHookFunc) (struct mob_data *md, struct block_list *src, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_dead_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_dead_pre[hIndex].func;
+ retVal___ = preHookFunc(md, src, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.dead(md, src, type);
+ }
+ if( HPMHooks.count.HP_mob_dead_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *src, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_dead_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_dead_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, src, &type);
+ }
+ }
+ return retVal___;
+}
+void HP_mob_revive(struct mob_data *md, unsigned int hp) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mob_revive_pre ) {
+ void (*preHookFunc) (struct mob_data *md, unsigned int *hp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_revive_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_revive_pre[hIndex].func;
+ preHookFunc(md, &hp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.revive(md, hp);
+ }
+ if( HPMHooks.count.HP_mob_revive_post ) {
+ void (*postHookFunc) (struct mob_data *md, unsigned int *hp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_revive_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_revive_post[hIndex].func;
+ postHookFunc(md, &hp);
+ }
+ }
+ return;
+}
+int HP_mob_guardian_guildchange(struct mob_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_guardian_guildchange_pre ) {
+ int (*preHookFunc) (struct mob_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_guardian_guildchange_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_guardian_guildchange_pre[hIndex].func;
+ retVal___ = preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.guardian_guildchange(md);
+ }
+ if( HPMHooks.count.HP_mob_guardian_guildchange_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_guardian_guildchange_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_guardian_guildchange_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_random_class(int *value, size_t count) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_random_class_pre ) {
+ int (*preHookFunc) (int *value, size_t *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_random_class_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_random_class_pre[hIndex].func;
+ retVal___ = preHookFunc(value, &count);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.random_class(value, count);
+ }
+ if( HPMHooks.count.HP_mob_random_class_post ) {
+ int (*postHookFunc) (int retVal___, int *value, size_t *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_random_class_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_random_class_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, value, &count);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_class_change(struct mob_data *md, int class_) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_class_change_pre ) {
+ int (*preHookFunc) (struct mob_data *md, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_class_change_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_class_change_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.class_change(md, class_);
+ }
+ if( HPMHooks.count.HP_mob_class_change_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_class_change_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_class_change_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &class_);
+ }
+ }
+ return retVal___;
+}
+void HP_mob_heal(struct mob_data *md, unsigned int heal) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mob_heal_pre ) {
+ void (*preHookFunc) (struct mob_data *md, unsigned int *heal);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_heal_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_heal_pre[hIndex].func;
+ preHookFunc(md, &heal);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.heal(md, heal);
+ }
+ if( HPMHooks.count.HP_mob_heal_post ) {
+ void (*postHookFunc) (struct mob_data *md, unsigned int *heal);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_heal_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_heal_post[hIndex].func;
+ postHookFunc(md, &heal);
+ }
+ }
+ return;
+}
+int HP_mob_warpslave_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_warpslave_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_mob_warpslave_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.mob.warpslave_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_mob_warpslave_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_mob_warpslave_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_warpslave(struct block_list *bl, int range) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_warpslave_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *range);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_warpslave_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &range);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.warpslave(bl, range);
+ }
+ if( HPMHooks.count.HP_mob_warpslave_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *range);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_warpslave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &range);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_countslave_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_countslave_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_mob_countslave_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.mob.countslave_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_mob_countslave_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_mob_countslave_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_countslave(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_countslave_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_countslave_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.countslave(bl);
+ }
+ if( HPMHooks.count.HP_mob_countslave_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_countslave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_summonslave(struct mob_data *md2, int *value, int amount, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_summonslave_pre ) {
+ int (*preHookFunc) (struct mob_data *md2, int *value, int *amount, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_summonslave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_summonslave_pre[hIndex].func;
+ retVal___ = preHookFunc(md2, value, &amount, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.summonslave(md2, value, amount, skill_id);
+ }
+ if( HPMHooks.count.HP_mob_summonslave_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md2, int *value, int *amount, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_summonslave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_summonslave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md2, value, &amount, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_getfriendhprate_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_getfriendhprate_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_mob_getfriendhprate_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.mob.getfriendhprate_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_mob_getfriendhprate_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_mob_getfriendhprate_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+struct block_list* HP_mob_getfriendhprate(struct mob_data *md, int min_rate, int max_rate) {
+ int hIndex = 0;
+ struct block_list* retVal___ = NULL;
+ if( HPMHooks.count.HP_mob_getfriendhprate_pre ) {
+ struct block_list* (*preHookFunc) (struct mob_data *md, int *min_rate, int *max_rate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_getfriendhprate_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &min_rate, &max_rate);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.getfriendhprate(md, min_rate, max_rate);
+ }
+ if( HPMHooks.count.HP_mob_getfriendhprate_post ) {
+ struct block_list* (*postHookFunc) (struct block_list* retVal___, struct mob_data *md, int *min_rate, int *max_rate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_getfriendhprate_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &min_rate, &max_rate);
+ }
+ }
+ return retVal___;
+}
+struct block_list* HP_mob_getmasterhpltmaxrate(struct mob_data *md, int rate) {
+ int hIndex = 0;
+ struct block_list* retVal___ = NULL;
+ if( HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre ) {
+ struct block_list* (*preHookFunc) (struct mob_data *md, int *rate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_getmasterhpltmaxrate_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &rate);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.getmasterhpltmaxrate(md, rate);
+ }
+ if( HPMHooks.count.HP_mob_getmasterhpltmaxrate_post ) {
+ struct block_list* (*postHookFunc) (struct block_list* retVal___, struct mob_data *md, int *rate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getmasterhpltmaxrate_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_getmasterhpltmaxrate_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &rate);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_getfriendstatus_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_getfriendstatus_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_mob_getfriendstatus_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.mob.getfriendstatus_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_mob_getfriendstatus_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_mob_getfriendstatus_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+struct mob_data* HP_mob_getfriendstatus(struct mob_data *md, int cond1, int cond2) {
+ int hIndex = 0;
+ struct mob_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_mob_getfriendstatus_pre ) {
+ struct mob_data* (*preHookFunc) (struct mob_data *md, int *cond1, int *cond2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_getfriendstatus_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &cond1, &cond2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.getfriendstatus(md, cond1, cond2);
+ }
+ if( HPMHooks.count.HP_mob_getfriendstatus_post ) {
+ struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct mob_data *md, int *cond1, int *cond2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_getfriendstatus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &cond1, &cond2);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_skill_use(struct mob_data *md, unsigned int tick, int event) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_skill_use_pre ) {
+ int (*preHookFunc) (struct mob_data *md, unsigned int *tick, int *event);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_skill_use_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &tick, &event);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.skill_use(md, tick, event);
+ }
+ if( HPMHooks.count.HP_mob_skill_use_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md, unsigned int *tick, int *event);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_skill_use_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &tick, &event);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_skill_event(struct mob_data *md, struct block_list *src, unsigned int tick, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_skill_event_pre ) {
+ int (*preHookFunc) (struct mob_data *md, struct block_list *src, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_skill_event_pre[hIndex].func;
+ retVal___ = preHookFunc(md, src, &tick, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.skill_event(md, src, tick, flag);
+ }
+ if( HPMHooks.count.HP_mob_skill_event_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *src, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_skill_event_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, src, &tick, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_is_clone(int class_) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_is_clone_pre ) {
+ int (*preHookFunc) (int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_clone_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_is_clone_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.is_clone(class_);
+ }
+ if( HPMHooks.count.HP_mob_is_clone_post ) {
+ int (*postHookFunc) (int retVal___, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_clone_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_is_clone_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, const char *event, int master_id, int mode, int flag, unsigned int duration) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_clone_spawn_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *event, int *master_id, int *mode, int *flag, unsigned int *duration);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_spawn_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_clone_spawn_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &m, &x, &y, event, &master_id, &mode, &flag, &duration);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.clone_spawn(sd, m, x, y, event, master_id, mode, flag, duration);
+ }
+ if( HPMHooks.count.HP_mob_clone_spawn_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y, const char *event, int *master_id, int *mode, int *flag, unsigned int *duration);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_spawn_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_clone_spawn_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &m, &x, &y, event, &master_id, &mode, &flag, &duration);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_clone_delete(struct mob_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_clone_delete_pre ) {
+ int (*preHookFunc) (struct mob_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_clone_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.clone_delete(md);
+ }
+ if( HPMHooks.count.HP_mob_clone_delete_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_clone_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_mob_drop_adjust(int baserate, int rate_adjust, unsigned short rate_min, unsigned short rate_max) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_mob_drop_adjust_pre ) {
+ unsigned int (*preHookFunc) (int *baserate, int *rate_adjust, unsigned short *rate_min, unsigned short *rate_max);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_drop_adjust_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_drop_adjust_pre[hIndex].func;
+ retVal___ = preHookFunc(&baserate, &rate_adjust, &rate_min, &rate_max);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.drop_adjust(baserate, rate_adjust, rate_min, rate_max);
+ }
+ if( HPMHooks.count.HP_mob_drop_adjust_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, int *baserate, int *rate_adjust, unsigned short *rate_min, unsigned short *rate_max);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_drop_adjust_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_drop_adjust_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &baserate, &rate_adjust, &rate_min, &rate_max);
+ }
+ }
+ return retVal___;
+}
+void HP_mob_item_dropratio_adjust(int nameid, int mob_id, int *rate_adjust) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mob_item_dropratio_adjust_pre ) {
+ void (*preHookFunc) (int *nameid, int *mob_id, int *rate_adjust);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_dropratio_adjust_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_item_dropratio_adjust_pre[hIndex].func;
+ preHookFunc(&nameid, &mob_id, rate_adjust);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.item_dropratio_adjust(nameid, mob_id, rate_adjust);
+ }
+ if( HPMHooks.count.HP_mob_item_dropratio_adjust_post ) {
+ void (*postHookFunc) (int *nameid, int *mob_id, int *rate_adjust);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_dropratio_adjust_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_item_dropratio_adjust_post[hIndex].func;
+ postHookFunc(&nameid, &mob_id, rate_adjust);
+ }
+ }
+ return;
+}
+bool HP_mob_parse_dbrow(char **str) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mob_parse_dbrow_pre ) {
+ bool (*preHookFunc) (char **str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dbrow_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_parse_dbrow_pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.parse_dbrow(str);
+ }
+ if( HPMHooks.count.HP_mob_parse_dbrow_post ) {
+ bool (*postHookFunc) (bool retVal___, char **str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dbrow_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_parse_dbrow_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_readdb_sub(char *fields[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mob_readdb_sub_pre ) {
+ bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_readdb_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(fields, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.readdb_sub(fields, columns, current);
+ }
+ if( HPMHooks.count.HP_mob_readdb_sub_post ) {
+ bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_readdb_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fields, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+void HP_mob_readdb(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mob_readdb_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_readdb_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.readdb();
+ }
+ if( HPMHooks.count.HP_mob_readdb_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_readdb_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_mob_read_sqldb(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_read_sqldb_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqldb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_read_sqldb_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.read_sqldb();
+ }
+ if( HPMHooks.count.HP_mob_read_sqldb_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqldb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_read_sqldb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_readdb_mobavail(char *str[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mob_readdb_mobavail_pre ) {
+ bool (*preHookFunc) (char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_mobavail_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_readdb_mobavail_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.readdb_mobavail(str, columns, current);
+ }
+ if( HPMHooks.count.HP_mob_readdb_mobavail_post ) {
+ bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_mobavail_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_readdb_mobavail_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+int HP_mob_read_randommonster(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_read_randommonster_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_randommonster_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_read_randommonster_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.read_randommonster();
+ }
+ if( HPMHooks.count.HP_mob_read_randommonster_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_randommonster_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_read_randommonster_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_parse_row_chatdb(char **str, const char *source, int line, int *last_msg_id) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mob_parse_row_chatdb_pre ) {
+ bool (*preHookFunc) (char **str, const char *source, int *line, int *last_msg_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_chatdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_parse_row_chatdb_pre[hIndex].func;
+ retVal___ = preHookFunc(str, source, &line, last_msg_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.parse_row_chatdb(str, source, line, last_msg_id);
+ }
+ if( HPMHooks.count.HP_mob_parse_row_chatdb_post ) {
+ bool (*postHookFunc) (bool retVal___, char **str, const char *source, int *line, int *last_msg_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_chatdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_parse_row_chatdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, source, &line, last_msg_id);
+ }
+ }
+ return retVal___;
+}
+void HP_mob_readchatdb(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mob_readchatdb_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_readchatdb_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.readchatdb();
+ }
+ if( HPMHooks.count.HP_mob_readchatdb_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_readchatdb_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_mob_parse_row_mobskilldb(char **str, int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mob_parse_row_mobskilldb_pre ) {
+ bool (*preHookFunc) (char **str, int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_mobskilldb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_parse_row_mobskilldb_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.parse_row_mobskilldb(str, columns, current);
+ }
+ if( HPMHooks.count.HP_mob_parse_row_mobskilldb_post ) {
+ bool (*postHookFunc) (bool retVal___, char **str, int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_mobskilldb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_parse_row_mobskilldb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+void HP_mob_readskilldb(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mob_readskilldb_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_readskilldb_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.readskilldb();
+ }
+ if( HPMHooks.count.HP_mob_readskilldb_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_readskilldb_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_mob_read_sqlskilldb(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_mob_read_sqlskilldb_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqlskilldb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_read_sqlskilldb_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.read_sqlskilldb();
+ }
+ if( HPMHooks.count.HP_mob_read_sqlskilldb_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_sqlskilldb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_read_sqlskilldb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_readdb_race2(char *fields[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mob_readdb_race2_pre ) {
+ bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_race2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_readdb_race2_pre[hIndex].func;
+ retVal___ = preHookFunc(fields, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.readdb_race2(fields, columns, current);
+ }
+ if( HPMHooks.count.HP_mob_readdb_race2_post ) {
+ bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_race2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_readdb_race2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fields, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_mob_readdb_itemratio(char *str[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_mob_readdb_itemratio_pre ) {
+ bool (*preHookFunc) (char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_itemratio_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_readdb_itemratio_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mob.readdb_itemratio(str, columns, current);
+ }
+ if( HPMHooks.count.HP_mob_readdb_itemratio_post ) {
+ bool (*postHookFunc) (bool retVal___, char *str[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_itemratio_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_readdb_itemratio_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+void HP_mob_load(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mob_load_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_load_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.load();
+ }
+ if( HPMHooks.count.HP_mob_load_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_load_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_mob_clear_spawninfo(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mob_clear_spawninfo_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mob_clear_spawninfo_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mob.clear_spawninfo();
+ }
+ if( HPMHooks.count.HP_mob_clear_spawninfo_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mob_clear_spawninfo_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* npc */
+int HP_npc_init(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_init_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_init_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.init();
+ }
+ if( HPMHooks.count.HP_npc_init_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_final(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_final_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_final_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.final();
+ }
+ if( HPMHooks.count.HP_npc_final_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_get_new_npc_id(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_get_new_npc_id_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_new_npc_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_get_new_npc_id_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.get_new_npc_id();
+ }
+ if( HPMHooks.count.HP_npc_get_new_npc_id_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_new_npc_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_get_new_npc_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+struct view_data* HP_npc_get_viewdata(int class_) {
+ int hIndex = 0;
+ struct view_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_get_viewdata_pre ) {
+ struct view_data* (*preHookFunc) (int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_viewdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_get_viewdata_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.get_viewdata(class_);
+ }
+ if( HPMHooks.count.HP_npc_get_viewdata_post ) {
+ struct view_data* (*postHookFunc) (struct view_data* retVal___, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_viewdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_get_viewdata_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_isnear_sub(struct block_list *bl, va_list args) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_isnear_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_sub_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_npc_isnear_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.npc.isnear_sub(bl, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_npc_isnear_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_sub_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_npc_isnear_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+bool HP_npc_isnear(struct block_list *bl) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_npc_isnear_pre ) {
+ bool (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_isnear_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.isnear(bl);
+ }
+ if( HPMHooks.count.HP_npc_isnear_post ) {
+ bool (*postHookFunc) (bool retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_isnear_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_ontouch_event_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch_event_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_ontouch_event_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.ontouch_event(sd, nd);
+ }
+ if( HPMHooks.count.HP_npc_ontouch_event_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch_event_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_ontouch_event_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, nd);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_ontouch2_event_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch2_event_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_ontouch2_event_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.ontouch2_event(sd, nd);
+ }
+ if( HPMHooks.count.HP_npc_ontouch2_event_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch2_event_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_ontouch2_event_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, nd);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_enable_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_enable_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_npc_enable_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.npc.enable_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_npc_enable_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_npc_enable_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_enable(const char *name, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_enable_pre ) {
+ int (*preHookFunc) (const char *name, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_enable_pre[hIndex].func;
+ retVal___ = preHookFunc(name, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.enable(name, flag);
+ }
+ if( HPMHooks.count.HP_npc_enable_post ) {
+ int (*postHookFunc) (int retVal___, const char *name, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_enable_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name, &flag);
+ }
+ }
+ return retVal___;
+}
+struct npc_data* HP_npc_name2id(const char *name) {
+ int hIndex = 0;
+ struct npc_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_name2id_pre ) {
+ struct npc_data* (*preHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_name2id_pre[hIndex].func;
+ retVal___ = preHookFunc(name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.name2id(name);
+ }
+ if( HPMHooks.count.HP_npc_name2id_post ) {
+ struct npc_data* (*postHookFunc) (struct npc_data* retVal___, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_name2id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_event_dequeue(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_event_dequeue_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_dequeue_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_event_dequeue_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.event_dequeue(sd);
+ }
+ if( HPMHooks.count.HP_npc_event_dequeue_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_dequeue_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_event_dequeue_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+DBData HP_npc_event_export_create(DBKey key, va_list args) {
+ int hIndex = 0;
+ DBData retVal___;
+ memset(&retVal___, '\0', sizeof(DBData));
+ if( HPMHooks.count.HP_npc_event_export_create_pre ) {
+ DBData (*preHookFunc) (DBKey *key, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_create_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_npc_event_export_create_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.npc.event_export_create(key, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_npc_event_export_create_post ) {
+ DBData (*postHookFunc) (DBData retVal___, DBKey *key, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_create_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_npc_event_export_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_event_export(struct npc_data *nd, int i) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_event_export_pre ) {
+ int (*preHookFunc) (struct npc_data *nd, int *i);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_event_export_pre[hIndex].func;
+ retVal___ = preHookFunc(nd, &i);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.event_export(nd, i);
+ }
+ if( HPMHooks.count.HP_npc_event_export_post ) {
+ int (*postHookFunc) (int retVal___, struct npc_data *nd, int *i);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_event_export_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, nd, &i);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_event_sub(struct map_session_data *sd, struct event_data *ev, const char *eventname) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_event_sub_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct event_data *ev, const char *eventname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_event_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, ev, eventname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.event_sub(sd, ev, eventname);
+ }
+ if( HPMHooks.count.HP_npc_event_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct event_data *ev, const char *eventname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_event_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, ev, eventname);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_event_doall_sub(void *key, void *data, va_list ap) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_event_doall_sub_pre ) {
+ void (*preHookFunc) (void *key, void *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_npc_event_doall_sub_pre[hIndex].func;
+ preHookFunc(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ HPMHooks.source.npc.event_doall_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_npc_event_doall_sub_post ) {
+ void (*postHookFunc) (void *key, void *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_npc_event_doall_sub_post[hIndex].func;
+ postHookFunc(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return;
+}
+int HP_npc_event_do(const char *name) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_event_do_pre ) {
+ int (*preHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_event_do_pre[hIndex].func;
+ retVal___ = preHookFunc(name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.event_do(name);
+ }
+ if( HPMHooks.count.HP_npc_event_do_post ) {
+ int (*postHookFunc) (int retVal___, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_event_do_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_event_doall_id(const char *name, int rid) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_event_doall_id_pre ) {
+ int (*preHookFunc) (const char *name, int *rid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_event_doall_id_pre[hIndex].func;
+ retVal___ = preHookFunc(name, &rid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.event_doall_id(name, rid);
+ }
+ if( HPMHooks.count.HP_npc_event_doall_id_post ) {
+ int (*postHookFunc) (int retVal___, const char *name, int *rid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_event_doall_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name, &rid);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_event_doall(const char *name) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_event_doall_pre ) {
+ int (*preHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_event_doall_pre[hIndex].func;
+ retVal___ = preHookFunc(name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.event_doall(name);
+ }
+ if( HPMHooks.count.HP_npc_event_doall_post ) {
+ int (*postHookFunc) (int retVal___, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_event_doall_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_event_do_clock(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_event_do_clock_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_event_do_clock_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.event_do_clock(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_npc_event_do_clock_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_event_do_clock_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_event_do_oninit(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_event_do_oninit_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_oninit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_event_do_oninit_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.event_do_oninit();
+ }
+ if( HPMHooks.count.HP_npc_event_do_oninit_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_oninit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_event_do_oninit_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_npc_timerevent_export(struct npc_data *nd, int i) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_timerevent_export_pre ) {
+ int (*preHookFunc) (struct npc_data *nd, int *i);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_export_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_timerevent_export_pre[hIndex].func;
+ retVal___ = preHookFunc(nd, &i);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.timerevent_export(nd, i);
+ }
+ if( HPMHooks.count.HP_npc_timerevent_export_post ) {
+ int (*postHookFunc) (int retVal___, struct npc_data *nd, int *i);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_export_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_timerevent_export_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, nd, &i);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_timerevent(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_timerevent_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_timerevent_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.timerevent(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_npc_timerevent_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_timerevent_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_timerevent_start(struct npc_data *nd, int rid) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_timerevent_start_pre ) {
+ int (*preHookFunc) (struct npc_data *nd, int *rid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_start_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_timerevent_start_pre[hIndex].func;
+ retVal___ = preHookFunc(nd, &rid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.timerevent_start(nd, rid);
+ }
+ if( HPMHooks.count.HP_npc_timerevent_start_post ) {
+ int (*postHookFunc) (int retVal___, struct npc_data *nd, int *rid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_start_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_timerevent_start_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, nd, &rid);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_timerevent_stop(struct npc_data *nd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_timerevent_stop_pre ) {
+ int (*preHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_stop_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_timerevent_stop_pre[hIndex].func;
+ retVal___ = preHookFunc(nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.timerevent_stop(nd);
+ }
+ if( HPMHooks.count.HP_npc_timerevent_stop_post ) {
+ int (*postHookFunc) (int retVal___, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_stop_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_timerevent_stop_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, nd);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_timerevent_quit(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_timerevent_quit_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_timerevent_quit_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.timerevent_quit(sd);
+ }
+ if( HPMHooks.count.HP_npc_timerevent_quit_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_timerevent_quit_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_npc_gettimerevent_tick(struct npc_data *nd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_gettimerevent_tick_pre ) {
+ int (*preHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_gettimerevent_tick_pre[hIndex].func;
+ retVal___ = preHookFunc(nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.gettimerevent_tick(nd);
+ }
+ if( HPMHooks.count.HP_npc_gettimerevent_tick_post ) {
+ int (*postHookFunc) (int retVal___, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_gettimerevent_tick_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, nd);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_settimerevent_tick(struct npc_data *nd, int newtimer) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_settimerevent_tick_pre ) {
+ int (*preHookFunc) (struct npc_data *nd, int *newtimer);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_settimerevent_tick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_settimerevent_tick_pre[hIndex].func;
+ retVal___ = preHookFunc(nd, &newtimer);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.settimerevent_tick(nd, newtimer);
+ }
+ if( HPMHooks.count.HP_npc_settimerevent_tick_post ) {
+ int (*postHookFunc) (int retVal___, struct npc_data *nd, int *newtimer);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_settimerevent_tick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_settimerevent_tick_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, nd, &newtimer);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_event(struct map_session_data *sd, const char *eventname, int ontouch) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_event_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *eventname, int *ontouch);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_event_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, eventname, &ontouch);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.event(sd, eventname, ontouch);
+ }
+ if( HPMHooks.count.HP_npc_event_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *eventname, int *ontouch);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_event_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, eventname, &ontouch);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_touch_areanpc_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_touch_areanpc_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_npc_touch_areanpc_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.npc.touch_areanpc_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_npc_touch_areanpc_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_npc_touch_areanpc_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_touchnext_areanpc(struct map_session_data *sd, bool leavemap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_touchnext_areanpc_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, bool *leavemap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touchnext_areanpc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_touchnext_areanpc_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &leavemap);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.touchnext_areanpc(sd, leavemap);
+ }
+ if( HPMHooks.count.HP_npc_touchnext_areanpc_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, bool *leavemap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touchnext_areanpc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_touchnext_areanpc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &leavemap);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_touch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_touch_areanpc_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_touch_areanpc_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &m, &x, &y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.touch_areanpc(sd, m, x, y);
+ }
+ if( HPMHooks.count.HP_npc_touch_areanpc_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 *m, int16 *x, int16 *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_touch_areanpc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &m, &x, &y);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_touch_areanpc2(struct mob_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_touch_areanpc2_pre ) {
+ int (*preHookFunc) (struct mob_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_touch_areanpc2_pre[hIndex].func;
+ retVal___ = preHookFunc(md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.touch_areanpc2(md);
+ }
+ if( HPMHooks.count.HP_npc_touch_areanpc2_post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_touch_areanpc2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_check_areanpc_pre ) {
+ int (*preHookFunc) (int *flag, int16 *m, int16 *x, int16 *y, int16 *range);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_check_areanpc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_check_areanpc_pre[hIndex].func;
+ retVal___ = preHookFunc(&flag, &m, &x, &y, &range);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.check_areanpc(flag, m, x, y, range);
+ }
+ if( HPMHooks.count.HP_npc_check_areanpc_post ) {
+ int (*postHookFunc) (int retVal___, int *flag, int16 *m, int16 *x, int16 *y, int16 *range);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_check_areanpc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_check_areanpc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &flag, &m, &x, &y, &range);
+ }
+ }
+ return retVal___;
+}
+struct npc_data* HP_npc_checknear(struct map_session_data *sd, struct block_list *bl) {
+ int hIndex = 0;
+ struct npc_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_checknear_pre ) {
+ struct npc_data* (*preHookFunc) (struct map_session_data *sd, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_checknear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_checknear_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.checknear(sd, bl);
+ }
+ if( HPMHooks.count.HP_npc_checknear_post ) {
+ struct npc_data* (*postHookFunc) (struct npc_data* retVal___, struct map_session_data *sd, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_checknear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_checknear_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_globalmessage(const char *name, const char *mes) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_globalmessage_pre ) {
+ int (*preHookFunc) (const char *name, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_globalmessage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_globalmessage_pre[hIndex].func;
+ retVal___ = preHookFunc(name, mes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.globalmessage(name, mes);
+ }
+ if( HPMHooks.count.HP_npc_globalmessage_post ) {
+ int (*postHookFunc) (int retVal___, const char *name, const char *mes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_globalmessage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_globalmessage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name, mes);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_run_tomb(struct map_session_data *sd, struct npc_data *nd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_run_tomb_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_run_tomb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_run_tomb_pre[hIndex].func;
+ preHookFunc(sd, nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.run_tomb(sd, nd);
+ }
+ if( HPMHooks.count.HP_npc_run_tomb_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_run_tomb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_run_tomb_post[hIndex].func;
+ postHookFunc(sd, nd);
+ }
+ }
+ return;
+}
+int HP_npc_click(struct map_session_data *sd, struct npc_data *nd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_click_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_click_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_click_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.click(sd, nd);
+ }
+ if( HPMHooks.count.HP_npc_click_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_click_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_click_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, nd);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_scriptcont(struct map_session_data *sd, int id, bool closing) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_scriptcont_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *id, bool *closing);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_scriptcont_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_scriptcont_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &id, &closing);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.scriptcont(sd, id, closing);
+ }
+ if( HPMHooks.count.HP_npc_scriptcont_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *id, bool *closing);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_scriptcont_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_scriptcont_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &id, &closing);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_buysellsel(struct map_session_data *sd, int id, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_buysellsel_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *id, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buysellsel_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_buysellsel_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &id, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.buysellsel(sd, id, type);
+ }
+ if( HPMHooks.count.HP_npc_buysellsel_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *id, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buysellsel_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_buysellsel_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &id, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, int count, unsigned short *item_list) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_cashshop_buylist_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *points, int *count, unsigned short *item_list);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_cashshop_buylist_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &points, &count, item_list);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.cashshop_buylist(sd, points, count, item_list);
+ }
+ if( HPMHooks.count.HP_npc_cashshop_buylist_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *points, int *count, unsigned short *item_list);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_cashshop_buylist_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &points, &count, item_list);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_buylist_sub(struct map_session_data *sd, int n, unsigned short *item_list, struct npc_data *nd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_buylist_sub_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_buylist_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n, item_list, nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.buylist_sub(sd, n, item_list, nd);
+ }
+ if( HPMHooks.count.HP_npc_buylist_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_buylist_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n, item_list, nd);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int points) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_cashshop_buy_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *amount, int *points);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_cashshop_buy_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &nameid, &amount, &points);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.cashshop_buy(sd, nameid, amount, points);
+ }
+ if( HPMHooks.count.HP_npc_cashshop_buy_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid, int *amount, int *points);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_cashshop_buy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &nameid, &amount, &points);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_buylist(struct map_session_data *sd, int n, unsigned short *item_list) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_buylist_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_buylist_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n, item_list);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.buylist(sd, n, item_list);
+ }
+ if( HPMHooks.count.HP_npc_buylist_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_buylist_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n, item_list);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_selllist_sub(struct map_session_data *sd, int n, unsigned short *item_list, struct npc_data *nd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_selllist_sub_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_selllist_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n, item_list, nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.selllist_sub(sd, n, item_list, nd);
+ }
+ if( HPMHooks.count.HP_npc_selllist_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_selllist_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n, item_list, nd);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_selllist(struct map_session_data *sd, int n, unsigned short *item_list) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_selllist_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_selllist_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n, item_list);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.selllist(sd, n, item_list);
+ }
+ if( HPMHooks.count.HP_npc_selllist_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_selllist_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n, item_list);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_remove_map(struct npc_data *nd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_remove_map_pre ) {
+ int (*preHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_remove_map_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_remove_map_pre[hIndex].func;
+ retVal___ = preHookFunc(nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.remove_map(nd);
+ }
+ if( HPMHooks.count.HP_npc_remove_map_post ) {
+ int (*postHookFunc) (int retVal___, struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_remove_map_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_remove_map_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, nd);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_unload_ev(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_unload_ev_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_npc_unload_ev_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.npc.unload_ev(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_npc_unload_ev_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_npc_unload_ev_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_unload_ev_label(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_unload_ev_label_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_label_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_npc_unload_ev_label_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.npc.unload_ev_label(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_npc_unload_ev_label_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_label_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_npc_unload_ev_label_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_unload_dup_sub(struct npc_data *nd, va_list args) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_unload_dup_sub_pre ) {
+ int (*preHookFunc) (struct npc_data *nd, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_dup_sub_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_npc_unload_dup_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(nd, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.npc.unload_dup_sub(nd, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_npc_unload_dup_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct npc_data *nd, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_dup_sub_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_npc_unload_dup_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, nd, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_unload_duplicates(struct npc_data *nd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_unload_duplicates_pre ) {
+ void (*preHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_unload_duplicates_pre[hIndex].func;
+ preHookFunc(nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.unload_duplicates(nd);
+ }
+ if( HPMHooks.count.HP_npc_unload_duplicates_post ) {
+ void (*postHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_unload_duplicates_post[hIndex].func;
+ postHookFunc(nd);
+ }
+ }
+ return;
+}
+int HP_npc_unload(struct npc_data *nd, bool single) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_unload_pre ) {
+ int (*preHookFunc) (struct npc_data *nd, bool *single);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_unload_pre[hIndex].func;
+ retVal___ = preHookFunc(nd, &single);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.unload(nd, single);
+ }
+ if( HPMHooks.count.HP_npc_unload_post ) {
+ int (*postHookFunc) (int retVal___, struct npc_data *nd, bool *single);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_unload_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, nd, &single);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_clearsrcfile(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_clearsrcfile_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_clearsrcfile_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.clearsrcfile();
+ }
+ if( HPMHooks.count.HP_npc_clearsrcfile_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_clearsrcfile_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_npc_addsrcfile(const char *name) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_addsrcfile_pre ) {
+ void (*preHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_addsrcfile_pre[hIndex].func;
+ preHookFunc(name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.addsrcfile(name);
+ }
+ if( HPMHooks.count.HP_npc_addsrcfile_post ) {
+ void (*postHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_addsrcfile_post[hIndex].func;
+ postHookFunc(name);
+ }
+ }
+ return;
+}
+void HP_npc_delsrcfile(const char *name) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_delsrcfile_pre ) {
+ void (*preHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_delsrcfile_pre[hIndex].func;
+ preHookFunc(name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.delsrcfile(name);
+ }
+ if( HPMHooks.count.HP_npc_delsrcfile_post ) {
+ void (*postHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_delsrcfile_post[hIndex].func;
+ postHookFunc(name);
+ }
+ }
+ return;
+}
+void HP_npc_parsename(struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_parsename_pre ) {
+ void (*preHookFunc) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsename_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_parsename_pre[hIndex].func;
+ preHookFunc(nd, name, start, buffer, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.parsename(nd, name, start, buffer, filepath);
+ }
+ if( HPMHooks.count.HP_npc_parsename_post ) {
+ void (*postHookFunc) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsename_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_parsename_post[hIndex].func;
+ postHookFunc(nd, name, start, buffer, filepath);
+ }
+ }
+ return;
+}
+struct npc_data* HP_npc_add_warp(char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y) {
+ int hIndex = 0;
+ struct npc_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_add_warp_pre ) {
+ struct npc_data* (*preHookFunc) (char *name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_warp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_add_warp_pre[hIndex].func;
+ retVal___ = preHookFunc(name, &from_mapid, &from_x, &from_y, &xs, &ys, &to_mapindex, &to_x, &to_y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.add_warp(name, from_mapid, from_x, from_y, xs, ys, to_mapindex, to_x, to_y);
+ }
+ if( HPMHooks.count.HP_npc_add_warp_post ) {
+ struct npc_data* (*postHookFunc) (struct npc_data* retVal___, char *name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_warp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_add_warp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name, &from_mapid, &from_x, &from_y, &xs, &ys, &to_mapindex, &to_x, &to_y);
+ }
+ }
+ return retVal___;
+}
+const char* HP_npc_parse_warp(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_parse_warp_pre ) {
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_parse_warp_pre[hIndex].func;
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.parse_warp(w1, w2, w3, w4, start, buffer, filepath);
+ }
+ if( HPMHooks.count.HP_npc_parse_warp_post ) {
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_parse_warp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath);
+ }
+ }
+ return retVal___;
+}
+const char* HP_npc_parse_shop(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_parse_shop_pre ) {
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_parse_shop_pre[hIndex].func;
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.parse_shop(w1, w2, w3, w4, start, buffer, filepath);
+ }
+ if( HPMHooks.count.HP_npc_parse_shop_post ) {
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_parse_shop_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_convertlabel_db(struct npc_label_list *label_list, const char *filepath) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_convertlabel_db_pre ) {
+ void (*preHookFunc) (struct npc_label_list *label_list, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_convertlabel_db_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_convertlabel_db_pre[hIndex].func;
+ preHookFunc(label_list, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.convertlabel_db(label_list, filepath);
+ }
+ if( HPMHooks.count.HP_npc_convertlabel_db_post ) {
+ void (*postHookFunc) (struct npc_label_list *label_list, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_convertlabel_db_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_convertlabel_db_post[hIndex].func;
+ postHookFunc(label_list, filepath);
+ }
+ }
+ return;
+}
+const char* HP_npc_skip_script(const char *start, const char *buffer, const char *filepath) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_skip_script_pre ) {
+ const char* (*preHookFunc) (const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_skip_script_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_skip_script_pre[hIndex].func;
+ retVal___ = preHookFunc(start, buffer, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.skip_script(start, buffer, filepath);
+ }
+ if( HPMHooks.count.HP_npc_skip_script_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_skip_script_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_skip_script_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, start, buffer, filepath);
+ }
+ }
+ return retVal___;
+}
+const char* HP_npc_parse_script(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, bool runOnInit) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_parse_script_pre ) {
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, bool *runOnInit);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_parse_script_pre[hIndex].func;
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, &runOnInit);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.parse_script(w1, w2, w3, w4, start, buffer, filepath, runOnInit);
+ }
+ if( HPMHooks.count.HP_npc_parse_script_post ) {
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, bool *runOnInit);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_parse_script_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, &runOnInit);
+ }
+ }
+ return retVal___;
+}
+const char* HP_npc_parse_duplicate(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_parse_duplicate_pre ) {
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_parse_duplicate_pre[hIndex].func;
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.parse_duplicate(w1, w2, w3, w4, start, buffer, filepath);
+ }
+ if( HPMHooks.count.HP_npc_parse_duplicate_post ) {
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_parse_duplicate_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_duplicate4instance(struct npc_data *snd, int16 m) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_duplicate4instance_pre ) {
+ int (*preHookFunc) (struct npc_data *snd, int16 *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate4instance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_duplicate4instance_pre[hIndex].func;
+ retVal___ = preHookFunc(snd, &m);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.duplicate4instance(snd, m);
+ }
+ if( HPMHooks.count.HP_npc_duplicate4instance_post ) {
+ int (*postHookFunc) (int retVal___, struct npc_data *snd, int16 *m);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate4instance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_duplicate4instance_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, snd, &m);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_setcells(struct npc_data *nd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_setcells_pre ) {
+ void (*preHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_setcells_pre[hIndex].func;
+ preHookFunc(nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.setcells(nd);
+ }
+ if( HPMHooks.count.HP_npc_setcells_post ) {
+ void (*postHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_setcells_post[hIndex].func;
+ postHookFunc(nd);
+ }
+ }
+ return;
+}
+int HP_npc_unsetcells_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_unsetcells_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_npc_unsetcells_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.npc.unsetcells_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_npc_unsetcells_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_npc_unsetcells_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_unsetcells(struct npc_data *nd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_unsetcells_pre ) {
+ void (*preHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_unsetcells_pre[hIndex].func;
+ preHookFunc(nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.unsetcells(nd);
+ }
+ if( HPMHooks.count.HP_npc_unsetcells_post ) {
+ void (*postHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_unsetcells_post[hIndex].func;
+ postHookFunc(nd);
+ }
+ }
+ return;
+}
+void HP_npc_movenpc(struct npc_data *nd, int16 x, int16 y) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_movenpc_pre ) {
+ void (*preHookFunc) (struct npc_data *nd, int16 *x, int16 *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_movenpc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_movenpc_pre[hIndex].func;
+ preHookFunc(nd, &x, &y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.movenpc(nd, x, y);
+ }
+ if( HPMHooks.count.HP_npc_movenpc_post ) {
+ void (*postHookFunc) (struct npc_data *nd, int16 *x, int16 *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_movenpc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_movenpc_post[hIndex].func;
+ postHookFunc(nd, &x, &y);
+ }
+ }
+ return;
+}
+void HP_npc_setdisplayname(struct npc_data *nd, const char *newname) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_setdisplayname_pre ) {
+ void (*preHookFunc) (struct npc_data *nd, const char *newname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_setdisplayname_pre[hIndex].func;
+ preHookFunc(nd, newname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.setdisplayname(nd, newname);
+ }
+ if( HPMHooks.count.HP_npc_setdisplayname_post ) {
+ void (*postHookFunc) (struct npc_data *nd, const char *newname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_setdisplayname_post[hIndex].func;
+ postHookFunc(nd, newname);
+ }
+ }
+ return;
+}
+void HP_npc_setclass(struct npc_data *nd, short class_) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_setclass_pre ) {
+ void (*preHookFunc) (struct npc_data *nd, short *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_setclass_pre[hIndex].func;
+ preHookFunc(nd, &class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.setclass(nd, class_);
+ }
+ if( HPMHooks.count.HP_npc_setclass_post ) {
+ void (*postHookFunc) (struct npc_data *nd, short *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_setclass_post[hIndex].func;
+ postHookFunc(nd, &class_);
+ }
+ }
+ return;
+}
+int HP_npc_do_atcmd_event(struct map_session_data *sd, const char *command, const char *message, const char *eventname) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_do_atcmd_event_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *command, const char *message, const char *eventname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_atcmd_event_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_do_atcmd_event_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, command, message, eventname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.do_atcmd_event(sd, command, message, eventname);
+ }
+ if( HPMHooks.count.HP_npc_do_atcmd_event_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *command, const char *message, const char *eventname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_atcmd_event_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_do_atcmd_event_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, command, message, eventname);
+ }
+ }
+ return retVal___;
+}
+const char* HP_npc_parse_function(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_parse_function_pre ) {
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_parse_function_pre[hIndex].func;
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.parse_function(w1, w2, w3, w4, start, buffer, filepath);
+ }
+ if( HPMHooks.count.HP_npc_parse_function_post ) {
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_parse_function_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_parse_mob2(struct spawn_data *mobspawn) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_parse_mob2_pre ) {
+ void (*preHookFunc) (struct spawn_data *mobspawn);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_parse_mob2_pre[hIndex].func;
+ preHookFunc(mobspawn);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.parse_mob2(mobspawn);
+ }
+ if( HPMHooks.count.HP_npc_parse_mob2_post ) {
+ void (*postHookFunc) (struct spawn_data *mobspawn);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_parse_mob2_post[hIndex].func;
+ postHookFunc(mobspawn);
+ }
+ }
+ return;
+}
+const char* HP_npc_parse_mob(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_parse_mob_pre ) {
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_parse_mob_pre[hIndex].func;
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.parse_mob(w1, w2, w3, w4, start, buffer, filepath);
+ }
+ if( HPMHooks.count.HP_npc_parse_mob_post ) {
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_parse_mob_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath);
+ }
+ }
+ return retVal___;
+}
+const char* HP_npc_parse_mapflag(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_parse_mapflag_pre ) {
+ const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_parse_mapflag_pre[hIndex].func;
+ retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.parse_mapflag(w1, w2, w3, w4, start, buffer, filepath);
+ }
+ if( HPMHooks.count.HP_npc_parse_mapflag_post ) {
+ const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_parse_mapflag_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_parsesrcfile(const char *filepath, bool runOnInit) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_parsesrcfile_pre ) {
+ void (*preHookFunc) (const char *filepath, bool *runOnInit);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_parsesrcfile_pre[hIndex].func;
+ preHookFunc(filepath, &runOnInit);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.parsesrcfile(filepath, runOnInit);
+ }
+ if( HPMHooks.count.HP_npc_parsesrcfile_post ) {
+ void (*postHookFunc) (const char *filepath, bool *runOnInit);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_parsesrcfile_post[hIndex].func;
+ postHookFunc(filepath, &runOnInit);
+ }
+ }
+ return;
+}
+int HP_npc_script_event(struct map_session_data *sd, enum npce_event type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_script_event_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, enum npce_event *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_script_event_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_script_event_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.script_event(sd, type);
+ }
+ if( HPMHooks.count.HP_npc_script_event_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum npce_event *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_script_event_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_script_event_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_read_event_script(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_read_event_script_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_read_event_script_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_read_event_script_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.read_event_script();
+ }
+ if( HPMHooks.count.HP_npc_read_event_script_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_read_event_script_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_read_event_script_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_npc_path_db_clear_sub(DBKey key, DBData *data, va_list args) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_path_db_clear_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_path_db_clear_sub_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_npc_path_db_clear_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.npc.path_db_clear_sub(key, data, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_npc_path_db_clear_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_path_db_clear_sub_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_npc_path_db_clear_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_ev_label_db_clear_sub(DBKey key, DBData *data, va_list args) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_npc_ev_label_db_clear_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.npc.ev_label_db_clear_sub(key, data, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_npc_ev_label_db_clear_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ev_label_db_clear_sub_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_npc_ev_label_db_clear_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_npc_reload(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_reload_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_reload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_reload_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.reload();
+ }
+ if( HPMHooks.count.HP_npc_reload_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_reload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_reload_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+bool HP_npc_unloadfile(const char *filepath) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_npc_unloadfile_pre ) {
+ bool (*preHookFunc) (const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_unloadfile_pre[hIndex].func;
+ retVal___ = preHookFunc(filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.unloadfile(filepath);
+ }
+ if( HPMHooks.count.HP_npc_unloadfile_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_unloadfile_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filepath);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_do_clear_npc(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_do_clear_npc_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_clear_npc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_do_clear_npc_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.do_clear_npc();
+ }
+ if( HPMHooks.count.HP_npc_do_clear_npc_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_clear_npc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_do_clear_npc_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_npc_debug_warps_sub(struct npc_data *nd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_debug_warps_sub_pre ) {
+ void (*preHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_debug_warps_sub_pre[hIndex].func;
+ preHookFunc(nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.debug_warps_sub(nd);
+ }
+ if( HPMHooks.count.HP_npc_debug_warps_sub_post ) {
+ void (*postHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_debug_warps_sub_post[hIndex].func;
+ postHookFunc(nd);
+ }
+ }
+ return;
+}
+void HP_npc_debug_warps(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_debug_warps_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_debug_warps_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.debug_warps();
+ }
+ if( HPMHooks.count.HP_npc_debug_warps_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_debug_warps_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_npc_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_npc_secure_timeout_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_secure_timeout_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc.secure_timeout_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_npc_secure_timeout_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_secure_timeout_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+/* party */
+void HP_party_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.init();
+ }
+ if( HPMHooks.count.HP_party_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_party_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.final();
+ }
+ if( HPMHooks.count.HP_party_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+struct party_data* HP_party_search(int party_id) {
+ int hIndex = 0;
+ struct party_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_party_search_pre ) {
+ struct party_data* (*preHookFunc) (int *party_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_search_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.search(party_id);
+ }
+ if( HPMHooks.count.HP_party_search_post ) {
+ struct party_data* (*postHookFunc) (struct party_data* retVal___, int *party_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_search_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id);
+ }
+ }
+ return retVal___;
+}
+struct party_data* HP_party_searchname(const char *str) {
+ int hIndex = 0;
+ struct party_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_party_searchname_pre ) {
+ struct party_data* (*preHookFunc) (const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_searchname_pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.searchname(str);
+ }
+ if( HPMHooks.count.HP_party_searchname_post ) {
+ struct party_data* (*postHookFunc) (struct party_data* retVal___, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_searchname_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
+int HP_party_getmemberid(struct party_data *p, struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_getmemberid_pre ) {
+ int (*preHookFunc) (struct party_data *p, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getmemberid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_getmemberid_pre[hIndex].func;
+ retVal___ = preHookFunc(p, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.getmemberid(p, sd);
+ }
+ if( HPMHooks.count.HP_party_getmemberid_post ) {
+ int (*postHookFunc) (int retVal___, struct party_data *p, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getmemberid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_getmemberid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, sd);
+ }
+ }
+ return retVal___;
+}
+struct map_session_data* HP_party_getavailablesd(struct party_data *p) {
+ int hIndex = 0;
+ struct map_session_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_party_getavailablesd_pre ) {
+ struct map_session_data* (*preHookFunc) (struct party_data *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getavailablesd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_getavailablesd_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.getavailablesd(p);
+ }
+ if( HPMHooks.count.HP_party_getavailablesd_post ) {
+ struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct party_data *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getavailablesd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_getavailablesd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+int HP_party_create(struct map_session_data *sd, char *name, int item, int item2) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_create_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, char *name, int *item, int *item2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_create_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, name, &item, &item2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.create(sd, name, item, item2);
+ }
+ if( HPMHooks.count.HP_party_create_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name, int *item, int *item2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, name, &item, &item2);
+ }
+ }
+ return retVal___;
+}
+void HP_party_created(int account_id, int char_id, int fail, int party_id, char *name) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_created_pre ) {
+ void (*preHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_created_pre[hIndex].func;
+ preHookFunc(&account_id, &char_id, &fail, &party_id, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.created(account_id, char_id, fail, party_id, name);
+ }
+ if( HPMHooks.count.HP_party_created_post ) {
+ void (*postHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_created_post[hIndex].func;
+ postHookFunc(&account_id, &char_id, &fail, &party_id, name);
+ }
+ }
+ return;
+}
+int HP_party_request_info(int party_id, int char_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_request_info_pre ) {
+ int (*preHookFunc) (int *party_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_request_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_request_info_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.request_info(party_id, char_id);
+ }
+ if( HPMHooks.count.HP_party_request_info_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_request_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_request_info_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, &char_id);
+ }
+ }
+ return retVal___;
+}
+int HP_party_invite(struct map_session_data *sd, struct map_session_data *tsd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_invite_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_invite_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_invite_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, tsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.invite(sd, tsd);
+ }
+ if( HPMHooks.count.HP_party_invite_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_invite_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_invite_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, tsd);
+ }
+ }
+ return retVal___;
+}
+void HP_party_member_joined(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_member_joined_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_member_joined_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.member_joined(sd);
+ }
+ if( HPMHooks.count.HP_party_member_joined_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_member_joined_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_party_member_added(int party_id, int account_id, int char_id, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_member_added_pre ) {
+ int (*preHookFunc) (int *party_id, int *account_id, int *char_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_added_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_member_added_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, &account_id, &char_id, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.member_added(party_id, account_id, char_id, flag);
+ }
+ if( HPMHooks.count.HP_party_member_added_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_added_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_member_added_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_party_leave(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_leave_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_leave_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.leave(sd);
+ }
+ if( HPMHooks.count.HP_party_leave_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_leave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_party_removemember(struct map_session_data *sd, int account_id, char *name) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_removemember_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *account_id, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_removemember_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &account_id, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.removemember(sd, account_id, name);
+ }
+ if( HPMHooks.count.HP_party_removemember_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *account_id, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_removemember_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &account_id, name);
+ }
+ }
+ return retVal___;
+}
+int HP_party_member_withdraw(int party_id, int account_id, int char_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_member_withdraw_pre ) {
+ int (*preHookFunc) (int *party_id, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_withdraw_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_member_withdraw_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, &account_id, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.member_withdraw(party_id, account_id, char_id);
+ }
+ if( HPMHooks.count.HP_party_member_withdraw_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_withdraw_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_member_withdraw_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id);
+ }
+ }
+ return retVal___;
+}
+void HP_party_reply_invite(struct map_session_data *sd, int party_id, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_reply_invite_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *party_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_reply_invite_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_reply_invite_pre[hIndex].func;
+ preHookFunc(sd, &party_id, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.reply_invite(sd, party_id, flag);
+ }
+ if( HPMHooks.count.HP_party_reply_invite_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *party_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_reply_invite_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_reply_invite_post[hIndex].func;
+ postHookFunc(sd, &party_id, &flag);
+ }
+ }
+ return;
+}
+int HP_party_recv_noinfo(int party_id, int char_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_recv_noinfo_pre ) {
+ int (*preHookFunc) (int *party_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_noinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_recv_noinfo_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.recv_noinfo(party_id, char_id);
+ }
+ if( HPMHooks.count.HP_party_recv_noinfo_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_noinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_recv_noinfo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, &char_id);
+ }
+ }
+ return retVal___;
+}
+int HP_party_recv_info(struct party *sp, int char_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_recv_info_pre ) {
+ int (*preHookFunc) (struct party *sp, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_recv_info_pre[hIndex].func;
+ retVal___ = preHookFunc(sp, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.recv_info(sp, char_id);
+ }
+ if( HPMHooks.count.HP_party_recv_info_post ) {
+ int (*postHookFunc) (int retVal___, struct party *sp, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_recv_info_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sp, &char_id);
+ }
+ }
+ return retVal___;
+}
+int HP_party_recv_movemap(int party_id, int account_id, int char_id, unsigned short mapid, int online, int lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_recv_movemap_pre ) {
+ int (*preHookFunc) (int *party_id, int *account_id, int *char_id, unsigned short *mapid, int *online, int *lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_movemap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_recv_movemap_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, &account_id, &char_id, &mapid, &online, &lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.recv_movemap(party_id, account_id, char_id, mapid, online, lv);
+ }
+ if( HPMHooks.count.HP_party_recv_movemap_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id, unsigned short *mapid, int *online, int *lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_movemap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_recv_movemap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id, &mapid, &online, &lv);
+ }
+ }
+ return retVal___;
+}
+int HP_party_broken(int party_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_broken_pre ) {
+ int (*preHookFunc) (int *party_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_broken_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_broken_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.broken(party_id);
+ }
+ if( HPMHooks.count.HP_party_broken_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_broken_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_broken_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id);
+ }
+ }
+ return retVal___;
+}
+int HP_party_optionchanged(int party_id, int account_id, int exp, int item, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_optionchanged_pre ) {
+ int (*preHookFunc) (int *party_id, int *account_id, int *exp, int *item, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_optionchanged_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_optionchanged_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, &account_id, &exp, &item, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.optionchanged(party_id, account_id, exp, item, flag);
+ }
+ if( HPMHooks.count.HP_party_optionchanged_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *exp, int *item, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_optionchanged_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_optionchanged_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, &account_id, &exp, &item, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_party_changeoption(struct map_session_data *sd, int exp, int item) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_changeoption_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *exp, int *item);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeoption_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_changeoption_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &exp, &item);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.changeoption(sd, exp, item);
+ }
+ if( HPMHooks.count.HP_party_changeoption_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *exp, int *item);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeoption_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_changeoption_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &exp, &item);
+ }
+ }
+ return retVal___;
+}
+bool HP_party_changeleader(struct map_session_data *sd, struct map_session_data *t_sd) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_party_changeleader_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, struct map_session_data *t_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeleader_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_changeleader_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, t_sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.changeleader(sd, t_sd);
+ }
+ if( HPMHooks.count.HP_party_changeleader_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct map_session_data *t_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeleader_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_changeleader_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, t_sd);
+ }
+ }
+ return retVal___;
+}
+void HP_party_send_movemap(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_send_movemap_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_send_movemap_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.send_movemap(sd);
+ }
+ if( HPMHooks.count.HP_party_send_movemap_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_send_movemap_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_party_send_levelup(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_send_levelup_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_send_levelup_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.send_levelup(sd);
+ }
+ if( HPMHooks.count.HP_party_send_levelup_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_send_levelup_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_party_send_logout(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_send_logout_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_logout_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_send_logout_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.send_logout(sd);
+ }
+ if( HPMHooks.count.HP_party_send_logout_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_logout_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_send_logout_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_party_send_message(struct map_session_data *sd, const char *mes, int len) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_send_message_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_send_message_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, mes, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.send_message(sd, mes, len);
+ }
+ if( HPMHooks.count.HP_party_send_message_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_send_message_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, mes, &len);
+ }
+ }
+ return retVal___;
+}
+int HP_party_recv_message(int party_id, int account_id, const char *mes, int len) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_recv_message_pre ) {
+ int (*preHookFunc) (int *party_id, int *account_id, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_recv_message_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, &account_id, mes, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.recv_message(party_id, account_id, mes, len);
+ }
+ if( HPMHooks.count.HP_party_recv_message_post ) {
+ int (*postHookFunc) (int retVal___, int *party_id, int *account_id, const char *mes, int *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_recv_message_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, &account_id, mes, &len);
+ }
+ }
+ return retVal___;
+}
+int HP_party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_skill_check_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *party_id, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_skill_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_skill_check_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &party_id, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.skill_check(sd, party_id, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_party_skill_check_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *party_id, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_skill_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_skill_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &party_id, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_party_send_xy_clear(struct party_data *p) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_send_xy_clear_pre ) {
+ int (*preHookFunc) (struct party_data *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_clear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_send_xy_clear_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.send_xy_clear(p);
+ }
+ if( HPMHooks.count.HP_party_send_xy_clear_post ) {
+ int (*postHookFunc) (int retVal___, struct party_data *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_clear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_send_xy_clear_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+int HP_party_exp_share(struct party_data *p, struct block_list *src, unsigned int base_exp, unsigned int job_exp, int zeny) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_exp_share_pre ) {
+ int (*preHookFunc) (struct party_data *p, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, int *zeny);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_exp_share_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_exp_share_pre[hIndex].func;
+ retVal___ = preHookFunc(p, src, &base_exp, &job_exp, &zeny);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.exp_share(p, src, base_exp, job_exp, zeny);
+ }
+ if( HPMHooks.count.HP_party_exp_share_post ) {
+ int (*postHookFunc) (int retVal___, struct party_data *p, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, int *zeny);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_exp_share_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_exp_share_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, src, &base_exp, &job_exp, &zeny);
+ }
+ }
+ return retVal___;
+}
+int HP_party_share_loot(struct party_data *p, struct map_session_data *sd, struct item *item_data, int first_charid) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_share_loot_pre ) {
+ int (*preHookFunc) (struct party_data *p, struct map_session_data *sd, struct item *item_data, int *first_charid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_share_loot_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_share_loot_pre[hIndex].func;
+ retVal___ = preHookFunc(p, sd, item_data, &first_charid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.share_loot(p, sd, item_data, first_charid);
+ }
+ if( HPMHooks.count.HP_party_share_loot_post ) {
+ int (*postHookFunc) (int retVal___, struct party_data *p, struct map_session_data *sd, struct item *item_data, int *first_charid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_share_loot_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_share_loot_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, sd, item_data, &first_charid);
+ }
+ }
+ return retVal___;
+}
+int HP_party_send_dot_remove(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_send_dot_remove_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_dot_remove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_send_dot_remove_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.send_dot_remove(sd);
+ }
+ if( HPMHooks.count.HP_party_send_dot_remove_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_dot_remove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_send_dot_remove_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_party_sub_count(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_sub_count_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_party_sub_count_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.party.sub_count(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_party_sub_count_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_party_sub_count_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_party_booking_register(struct map_session_data *sd, short level, short mapid, short *job) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_booking_register_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_register_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_booking_register_pre[hIndex].func;
+ preHookFunc(sd, &level, &mapid, job);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.booking_register(sd, level, mapid, job);
+ }
+ if( HPMHooks.count.HP_party_booking_register_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_register_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_booking_register_post[hIndex].func;
+ postHookFunc(sd, &level, &mapid, job);
+ }
+ }
+ return;
+}
+void HP_party_booking_update(struct map_session_data *sd, short *job) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_booking_update_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *job);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_booking_update_pre[hIndex].func;
+ preHookFunc(sd, job);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.booking_update(sd, job);
+ }
+ if( HPMHooks.count.HP_party_booking_update_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *job);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_booking_update_post[hIndex].func;
+ postHookFunc(sd, job);
+ }
+ }
+ return;
+}
+void HP_party_booking_search(struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_booking_search_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job, unsigned long *lastindex, short *resultcount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_booking_search_pre[hIndex].func;
+ preHookFunc(sd, &level, &mapid, &job, &lastindex, &resultcount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.booking_search(sd, level, mapid, job, lastindex, resultcount);
+ }
+ if( HPMHooks.count.HP_party_booking_search_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job, unsigned long *lastindex, short *resultcount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_booking_search_post[hIndex].func;
+ postHookFunc(sd, &level, &mapid, &job, &lastindex, &resultcount);
+ }
+ }
+ return;
+}
+void HP_party_recruit_register(struct map_session_data *sd, short level, const char *notice) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_recruit_register_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *level, const char *notice);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_recruit_register_pre[hIndex].func;
+ preHookFunc(sd, &level, notice);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.recruit_register(sd, level, notice);
+ }
+ if( HPMHooks.count.HP_party_recruit_register_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *level, const char *notice);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_recruit_register_post[hIndex].func;
+ postHookFunc(sd, &level, notice);
+ }
+ }
+ return;
+}
+void HP_party_recruit_update(struct map_session_data *sd, const char *notice) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_recruit_update_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *notice);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_recruit_update_pre[hIndex].func;
+ preHookFunc(sd, notice);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.recruit_update(sd, notice);
+ }
+ if( HPMHooks.count.HP_party_recruit_update_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *notice);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_recruit_update_post[hIndex].func;
+ postHookFunc(sd, notice);
+ }
+ }
+ return;
+}
+void HP_party_recruit_search(struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_recruit_search_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_recruit_search_pre[hIndex].func;
+ preHookFunc(sd, &level, &mapid, &lastindex, &resultcount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.recruit_search(sd, level, mapid, lastindex, resultcount);
+ }
+ if( HPMHooks.count.HP_party_recruit_search_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_recruit_search_post[hIndex].func;
+ postHookFunc(sd, &level, &mapid, &lastindex, &resultcount);
+ }
+ }
+ return;
+}
+bool HP_party_booking_delete(struct map_session_data *sd) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_party_booking_delete_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_booking_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.booking_delete(sd);
+ }
+ if( HPMHooks.count.HP_party_booking_delete_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_booking_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_party_vforeachsamemap(int ( *func ) (struct block_list *, va_list), struct map_session_data *sd, int range, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_vforeachsamemap_pre ) {
+ int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), struct map_session_data *sd, int *range, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_vforeachsamemap_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_party_vforeachsamemap_pre[hIndex].func;
+ retVal___ = preHookFunc(func, sd, &range, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.party.vforeachsamemap(func, sd, range, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_party_vforeachsamemap_post ) {
+ int (*postHookFunc) (int retVal___, int ( *func ) (struct block_list *, va_list), struct map_session_data *sd, int *range, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_vforeachsamemap_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_party_vforeachsamemap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, func, sd, &range, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_party_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_send_xy_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_send_xy_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.send_xy_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_party_send_xy_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_send_xy_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_party_fill_member(struct party_member *member, struct map_session_data *sd, unsigned int leader) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_fill_member_pre ) {
+ void (*preHookFunc) (struct party_member *member, struct map_session_data *sd, unsigned int *leader);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_fill_member_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_fill_member_pre[hIndex].func;
+ preHookFunc(member, sd, &leader);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.fill_member(member, sd, leader);
+ }
+ if( HPMHooks.count.HP_party_fill_member_post ) {
+ void (*postHookFunc) (struct party_member *member, struct map_session_data *sd, unsigned int *leader);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_fill_member_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_fill_member_post[hIndex].func;
+ postHookFunc(member, sd, &leader);
+ }
+ }
+ return;
+}
+TBL_PC* HP_party_sd_check(int party_id, int account_id, int char_id) {
+ int hIndex = 0;
+ TBL_PC* retVal___ = NULL;
+ if( HPMHooks.count.HP_party_sd_check_pre ) {
+ TBL_PC* (*preHookFunc) (int *party_id, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sd_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_sd_check_pre[hIndex].func;
+ retVal___ = preHookFunc(&party_id, &account_id, &char_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.sd_check(party_id, account_id, char_id);
+ }
+ if( HPMHooks.count.HP_party_sd_check_post ) {
+ TBL_PC* (*postHookFunc) (TBL_PC* retVal___, int *party_id, int *account_id, int *char_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sd_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_sd_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id);
+ }
+ }
+ return retVal___;
+}
+void HP_party_check_state(struct party_data *p) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_party_check_state_pre ) {
+ void (*preHookFunc) (struct party_data *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_check_state_pre[hIndex].func;
+ preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.party.check_state(p);
+ }
+ if( HPMHooks.count.HP_party_check_state_post ) {
+ void (*postHookFunc) (struct party_data *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_check_state_post[hIndex].func;
+ postHookFunc(p);
+ }
+ }
+ return;
+}
+struct party_booking_ad_info* HP_party_create_booking_data(void) {
+ int hIndex = 0;
+ struct party_booking_ad_info* retVal___ = NULL;
+ if( HPMHooks.count.HP_party_create_booking_data_pre ) {
+ struct party_booking_ad_info* (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_booking_data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_party_create_booking_data_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.party.create_booking_data();
+ }
+ if( HPMHooks.count.HP_party_create_booking_data_post ) {
+ struct party_booking_ad_info* (*postHookFunc) (struct party_booking_ad_info* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_booking_data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_party_create_booking_data_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_party_db_final(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_party_db_final_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_db_final_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_party_db_final_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.party.db_final(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_party_db_final_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_party_db_final_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_party_db_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+/* path */
+int HP_path_blownpos(int16 m, int16 x0, int16 y0, int16 dx, int16 dy, int count) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_path_blownpos_pre ) {
+ int (*preHookFunc) (int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_path_blownpos_pre[hIndex].func;
+ retVal___ = preHookFunc(&m, &x0, &y0, &dx, &dy, &count);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.path.blownpos(m, x0, y0, dx, dy, count);
+ }
+ if( HPMHooks.count.HP_path_blownpos_post ) {
+ int (*postHookFunc) (int retVal___, int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_path_blownpos_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &m, &x0, &y0, &dx, &dy, &count);
+ }
+ }
+ return retVal___;
+}
+bool HP_path_search(struct walkpath_data *wpd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int flag, cell_chk cell) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_path_search_pre ) {
+ bool (*preHookFunc) (struct walkpath_data *wpd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_path_search_pre[hIndex].func;
+ retVal___ = preHookFunc(wpd, &m, &x0, &y0, &x1, &y1, &flag, &cell);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.path.search(wpd, m, x0, y0, x1, y1, flag, cell);
+ }
+ if( HPMHooks.count.HP_path_search_post ) {
+ bool (*postHookFunc) (bool retVal___, struct walkpath_data *wpd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_path_search_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, wpd, &m, &x0, &y0, &x1, &y1, &flag, &cell);
+ }
+ }
+ return retVal___;
+}
+bool HP_path_search_long(struct shootpath_data *spd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, cell_chk cell) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_path_search_long_pre ) {
+ bool (*preHookFunc) (struct shootpath_data *spd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_long_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_path_search_long_pre[hIndex].func;
+ retVal___ = preHookFunc(spd, &m, &x0, &y0, &x1, &y1, &cell);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.path.search_long(spd, m, x0, y0, x1, y1, cell);
+ }
+ if( HPMHooks.count.HP_path_search_long_post ) {
+ bool (*postHookFunc) (bool retVal___, struct shootpath_data *spd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_long_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_path_search_long_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, spd, &m, &x0, &y0, &x1, &y1, &cell);
+ }
+ }
+ return retVal___;
+}
+int HP_path_check_distance(int dx, int dy, int distance) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_path_check_distance_pre ) {
+ int (*preHookFunc) (int *dx, int *dy, int *distance);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_path_check_distance_pre[hIndex].func;
+ retVal___ = preHookFunc(&dx, &dy, &distance);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.path.check_distance(dx, dy, distance);
+ }
+ if( HPMHooks.count.HP_path_check_distance_post ) {
+ int (*postHookFunc) (int retVal___, int *dx, int *dy, int *distance);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_path_check_distance_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &dx, &dy, &distance);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_path_distance(int dx, int dy) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_path_distance_pre ) {
+ unsigned int (*preHookFunc) (int *dx, int *dy);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_path_distance_pre[hIndex].func;
+ retVal___ = preHookFunc(&dx, &dy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.path.distance(dx, dy);
+ }
+ if( HPMHooks.count.HP_path_distance_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, int *dx, int *dy);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_path_distance_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &dx, &dy);
+ }
+ }
+ return retVal___;
+}
+/* pc */
+void HP_pc_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.init();
+ }
+ if( HPMHooks.count.HP_pc_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_pc_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.final();
+ }
+ if( HPMHooks.count.HP_pc_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+struct map_session_data* HP_pc_get_dummy_sd(void) {
+ int hIndex = 0;
+ struct map_session_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_pc_get_dummy_sd_pre ) {
+ struct map_session_data* (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_dummy_sd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_get_dummy_sd_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.get_dummy_sd();
+ }
+ if( HPMHooks.count.HP_pc_get_dummy_sd_post ) {
+ struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_dummy_sd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_get_dummy_sd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_class2idx(int class_) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_class2idx_pre ) {
+ int (*preHookFunc) (int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_class2idx_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_class2idx_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.class2idx(class_);
+ }
+ if( HPMHooks.count.HP_pc_class2idx_post ) {
+ int (*postHookFunc) (int retVal___, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_class2idx_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_class2idx_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_get_group_level(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ 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___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_pc_can_give_items_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_give_items_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_can_give_items_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.can_give_items(sd);
+ }
+ if( HPMHooks.count.HP_pc_can_give_items_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_give_items_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_can_give_items_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_pc_can_use_command_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, const char *command);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_use_command_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_can_use_command_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, command);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.can_use_command(sd, command);
+ }
+ if( HPMHooks.count.HP_pc_can_use_command_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *command);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_use_command_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_can_use_command_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, command);
+ }
+ }
+ return retVal___;
+}
+bool HP_pc_has_permission(struct map_session_data *sd, enum e_pc_permission permission) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_pc_has_permission_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, enum e_pc_permission *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, enum e_pc_permission *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___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_set_group_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *group_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_group_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_set_group_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &group_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.set_group(sd, group_id);
+ }
+ if( HPMHooks.count.HP_pc_set_group_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *group_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_group_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_set_group_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &group_id);
+ }
+ }
+ return retVal___;
+}
+bool HP_pc_should_log_commands(struct map_session_data *sd) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_pc_should_log_commands_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_should_log_commands_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_should_log_commands_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.should_log_commands(sd);
+ }
+ if( HPMHooks.count.HP_pc_should_log_commands_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_should_log_commands_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_should_log_commands_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setrestartvalue(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setrestartvalue_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setrestartvalue_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setrestartvalue_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setrestartvalue(sd, type);
+ }
+ if( HPMHooks.count.HP_pc_setrestartvalue_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setrestartvalue_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setrestartvalue_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_makesavestatus(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_makesavestatus_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_makesavestatus_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.makesavestatus(sd);
+ }
+ if( HPMHooks.count.HP_pc_makesavestatus_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_makesavestatus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_respawn(struct map_session_data *sd, clr_type clrtype) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_respawn_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, clr_type *clrtype);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_respawn_pre[hIndex].func;
+ preHookFunc(sd, &clrtype);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.respawn(sd, clrtype);
+ }
+ if( HPMHooks.count.HP_pc_respawn_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, clr_type *clrtype);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_respawn_post[hIndex].func;
+ postHookFunc(sd, &clrtype);
+ }
+ }
+ return;
+}
+int HP_pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setnewpc_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *account_id, int *char_id, int *login_id1, unsigned int *client_tick, int *sex, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setnewpc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setnewpc_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &account_id, &char_id, &login_id1, &client_tick, &sex, &fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setnewpc(sd, account_id, char_id, login_id1, client_tick, sex, fd);
+ }
+ if( HPMHooks.count.HP_pc_setnewpc_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *account_id, int *char_id, int *login_id1, unsigned int *client_tick, int *sex, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setnewpc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setnewpc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &account_id, &char_id, &login_id1, &client_tick, &sex, &fd);
+ }
+ }
+ return retVal___;
+}
+bool HP_pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_pc_authok_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, struct mmo_charstatus *st, bool *changing_mapservers);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_authok_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &login_id2, &expiration_time, &group_id, st, &changing_mapservers);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.authok(sd, login_id2, expiration_time, group_id, st, changing_mapservers);
+ }
+ if( HPMHooks.count.HP_pc_authok_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, struct mmo_charstatus *st, bool *changing_mapservers);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_authok_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &login_id2, &expiration_time, &group_id, st, &changing_mapservers);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_authfail(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_authfail_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_authfail_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.authfail(sd);
+ }
+ if( HPMHooks.count.HP_pc_authfail_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_authfail_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_pc_reg_received(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_reg_received_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_reg_received_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_reg_received_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.reg_received(sd);
+ }
+ if( HPMHooks.count.HP_pc_reg_received_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_reg_received_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_reg_received_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_isequip(struct map_session_data *sd, int n) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_isequip_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_isequip_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.isequip(sd, n);
+ }
+ if( HPMHooks.count.HP_pc_isequip_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_isequip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_equippoint(struct map_session_data *sd, int n) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_equippoint_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equippoint_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_equippoint_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.equippoint(sd, n);
+ }
+ if( HPMHooks.count.HP_pc_equippoint_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equippoint_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_equippoint_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setinventorydata(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setinventorydata_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setinventorydata_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setinventorydata(sd);
+ }
+ if( HPMHooks.count.HP_pc_setinventorydata_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setinventorydata_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_checkskill(struct map_session_data *sd, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_checkskill_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_checkskill_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.checkskill(sd, skill_id);
+ }
+ if( HPMHooks.count.HP_pc_checkskill_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_checkskill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_checkskill2(struct map_session_data *sd, uint16 index) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_checkskill2_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_checkskill2_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &index);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.checkskill2(sd, index);
+ }
+ if( HPMHooks.count.HP_pc_checkskill2_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_checkskill2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &index);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_checkallowskill(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_checkallowskill_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_checkallowskill_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.checkallowskill(sd);
+ }
+ if( HPMHooks.count.HP_pc_checkallowskill_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_checkallowskill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_checkequip(struct map_session_data *sd, int pos) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_checkequip_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkequip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_checkequip_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.checkequip(sd, pos);
+ }
+ if( HPMHooks.count.HP_pc_checkequip_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkequip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_checkequip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &pos);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_calc_skilltree(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_calc_skilltree_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_calc_skilltree_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.calc_skilltree(sd);
+ }
+ if( HPMHooks.count.HP_pc_calc_skilltree_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_calc_skilltree_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_calc_skilltree_normalize_job(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_calc_skilltree_normalize_job_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.calc_skilltree_normalize_job(sd);
+ }
+ if( HPMHooks.count.HP_pc_calc_skilltree_normalize_job_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_normalize_job_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_calc_skilltree_normalize_job_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_clean_skilltree(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_clean_skilltree_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clean_skilltree_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_clean_skilltree_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.clean_skilltree(sd);
+ }
+ if( HPMHooks.count.HP_pc_clean_skilltree_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clean_skilltree_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_clean_skilltree_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setpos(struct map_session_data *sd, unsigned short mapindex, int x, int y, clr_type clrtype) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setpos_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, unsigned short *mapindex, 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setpos(sd, mapindex, 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);
+ 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);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setsavepoint(struct map_session_data *sd, short mapindex, int x, int y) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setsavepoint_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, short *mapindex, 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setsavepoint(sd, mapindex, x, y);
+ }
+ if( HPMHooks.count.HP_pc_setsavepoint_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *mapindex, 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);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_randomwarp_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, clr_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_randomwarp_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.randomwarp(sd, type);
+ }
+ if( HPMHooks.count.HP_pc_randomwarp_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, clr_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_randomwarp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_memo(struct map_session_data *sd, int pos) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_memo_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_memo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_memo_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.memo(sd, pos);
+ }
+ if( HPMHooks.count.HP_pc_memo_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_memo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_memo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &pos);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_checkadditem(struct map_session_data *sd, int nameid, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_checkadditem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkadditem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_checkadditem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &nameid, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.checkadditem(sd, nameid, amount);
+ }
+ if( HPMHooks.count.HP_pc_checkadditem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkadditem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_checkadditem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &nameid, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_inventoryblank(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_inventoryblank_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_inventoryblank_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.inventoryblank(sd);
+ }
+ if( HPMHooks.count.HP_pc_inventoryblank_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_inventoryblank_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_search_inventory(struct map_session_data *sd, int item_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_search_inventory_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *item_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_search_inventory_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_search_inventory_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &item_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.search_inventory(sd, item_id);
+ }
+ if( HPMHooks.count.HP_pc_search_inventory_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *item_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_search_inventory_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_search_inventory_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &item_id);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_payzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type type, struct map_session_data *tsd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_payzeny_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_payzeny_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_payzeny_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &zeny, &type, tsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.payzeny(sd, zeny, type, tsd);
+ }
+ if( HPMHooks.count.HP_pc_payzeny_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_payzeny_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_payzeny_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &zeny, &type, tsd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_additem(struct map_session_data *sd, struct item *item_data, int amount, e_log_pick_type log_type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_additem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_additem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_additem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, item_data, &amount, &log_type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.additem(sd, item_data, amount, log_type);
+ }
+ if( HPMHooks.count.HP_pc_additem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_additem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_additem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, item_data, &amount, &log_type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_getzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type type, struct map_session_data *tsd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_getzeny_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getzeny_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_getzeny_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &zeny, &type, tsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.getzeny(sd, zeny, type, tsd);
+ }
+ if( HPMHooks.count.HP_pc_getzeny_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *zeny, enum e_log_pick_type *type, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getzeny_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_getzeny_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &zeny, &type, tsd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_delitem(struct map_session_data *sd, int n, int amount, int type, short reason, e_log_pick_type log_type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_delitem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_delitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n, &amount, &type, &reason, &log_type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.delitem(sd, n, amount, type, reason, log_type);
+ }
+ if( HPMHooks.count.HP_pc_delitem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_delitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n, &amount, &type, &reason, &log_type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_paycash(struct map_session_data *sd, int price, int points) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_paycash_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *price, int *points);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_paycash_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_paycash_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &price, &points);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.paycash(sd, price, points);
+ }
+ if( HPMHooks.count.HP_pc_paycash_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *price, int *points);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_paycash_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_paycash_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &price, &points);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_getcash(struct map_session_data *sd, int cash, int points) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_getcash_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *cash, int *points);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getcash_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_getcash_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &cash, &points);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.getcash(sd, cash, points);
+ }
+ if( HPMHooks.count.HP_pc_getcash_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *cash, int *points);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getcash_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_getcash_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &cash, &points);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_cart_additem(struct map_session_data *sd, struct item *item_data, int amount, e_log_pick_type log_type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_cart_additem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_additem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_cart_additem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, item_data, &amount, &log_type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.cart_additem(sd, item_data, amount, log_type);
+ }
+ if( HPMHooks.count.HP_pc_cart_additem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item_data, int *amount, e_log_pick_type *log_type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_additem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_cart_additem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, item_data, &amount, &log_type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_cart_delitem(struct map_session_data *sd, int n, int amount, int type, e_log_pick_type log_type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_cart_delitem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount, int *type, e_log_pick_type *log_type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_delitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_cart_delitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n, &amount, &type, &log_type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.cart_delitem(sd, n, amount, type, log_type);
+ }
+ if( HPMHooks.count.HP_pc_cart_delitem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount, int *type, e_log_pick_type *log_type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_delitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_cart_delitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n, &amount, &type, &log_type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_putitemtocart(struct map_session_data *sd, int idx, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_putitemtocart_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_putitemtocart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_putitemtocart_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &idx, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.putitemtocart(sd, idx, amount);
+ }
+ if( HPMHooks.count.HP_pc_putitemtocart_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_putitemtocart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_putitemtocart_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &idx, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_getitemfromcart(struct map_session_data *sd, int idx, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_getitemfromcart_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getitemfromcart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_getitemfromcart_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &idx, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.getitemfromcart(sd, idx, amount);
+ }
+ if( HPMHooks.count.HP_pc_getitemfromcart_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getitemfromcart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_getitemfromcart_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &idx, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_cartitem_amount(struct map_session_data *sd, int idx, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_cartitem_amount_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cartitem_amount_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_cartitem_amount_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &idx, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.cartitem_amount(sd, idx, amount);
+ }
+ if( HPMHooks.count.HP_pc_cartitem_amount_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cartitem_amount_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_cartitem_amount_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &idx, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_takeitem(struct map_session_data *sd, struct flooritem_data *fitem) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_takeitem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct flooritem_data *fitem);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_takeitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_takeitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, fitem);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.takeitem(sd, fitem);
+ }
+ if( HPMHooks.count.HP_pc_takeitem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct flooritem_data *fitem);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_takeitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_takeitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, fitem);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_dropitem(struct map_session_data *sd, int n, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_dropitem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dropitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_dropitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.dropitem(sd, n, amount);
+ }
+ if( HPMHooks.count.HP_pc_dropitem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dropitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_dropitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n, &amount);
+ }
+ }
+ return retVal___;
+}
+bool HP_pc_isequipped(struct map_session_data *sd, int nameid) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_pc_isequipped_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequipped_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_isequipped_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.isequipped(sd, nameid);
+ }
+ if( HPMHooks.count.HP_pc_isequipped_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequipped_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_isequipped_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &nameid);
+ }
+ }
+ return retVal___;
+}
+bool HP_pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_pc_can_Adopt_pre ) {
+ bool (*preHookFunc) (struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_Adopt_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_can_Adopt_pre[hIndex].func;
+ retVal___ = preHookFunc(p1_sd, p2_sd, b_sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.can_Adopt(p1_sd, p2_sd, b_sd);
+ }
+ if( HPMHooks.count.HP_pc_can_Adopt_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_Adopt_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_can_Adopt_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p1_sd, p2_sd, b_sd);
+ }
+ }
+ return retVal___;
+}
+bool HP_pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_pc_adoption_pre ) {
+ bool (*preHookFunc) (struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_adoption_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_adoption_pre[hIndex].func;
+ retVal___ = preHookFunc(p1_sd, p2_sd, b_sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.adoption(p1_sd, p2_sd, b_sd);
+ }
+ if( HPMHooks.count.HP_pc_adoption_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_adoption_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_adoption_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p1_sd, p2_sd, b_sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_updateweightstatus(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_updateweightstatus_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_updateweightstatus_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.updateweightstatus(sd);
+ }
+ if( HPMHooks.count.HP_pc_updateweightstatus_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_updateweightstatus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_script, short rate, unsigned int dur, short atk_type, const char *o_script, unsigned short pos, bool onskill) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_addautobonus_pre ) {
+ int (*preHookFunc) (struct s_autobonus *bonus, char *max, const char *bonus_script, short *rate, unsigned int *dur, short *atk_type, const char *o_script, unsigned short *pos, bool *onskill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_addautobonus_pre[hIndex].func;
+ retVal___ = preHookFunc(bonus, &max, bonus_script, &rate, &dur, &atk_type, o_script, &pos, &onskill);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.addautobonus(bonus, max, bonus_script, rate, dur, atk_type, o_script, pos, onskill);
+ }
+ if( HPMHooks.count.HP_pc_addautobonus_post ) {
+ int (*postHookFunc) (int retVal___, struct s_autobonus *bonus, char *max, const char *bonus_script, short *rate, unsigned int *dur, short *atk_type, const char *o_script, unsigned short *pos, bool *onskill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_addautobonus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bonus, &max, bonus_script, &rate, &dur, &atk_type, o_script, &pos, &onskill);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_exeautobonus(struct map_session_data *sd, struct s_autobonus *bonus) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_exeautobonus_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct s_autobonus *bonus);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_exeautobonus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_exeautobonus_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, bonus);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.exeautobonus(sd, bonus);
+ }
+ if( HPMHooks.count.HP_pc_exeautobonus_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_autobonus *bonus);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_exeautobonus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_exeautobonus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, bonus);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_endautobonus(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_endautobonus_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_endautobonus_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.endautobonus(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pc_endautobonus_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_endautobonus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_delautobonus(struct map_session_data *sd, struct s_autobonus *bonus, char max, bool restore) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_delautobonus_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct s_autobonus *bonus, char *max, bool *restore);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delautobonus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_delautobonus_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, bonus, &max, &restore);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.delautobonus(sd, bonus, max, restore);
+ }
+ if( HPMHooks.count.HP_pc_delautobonus_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_autobonus *bonus, char *max, bool *restore);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delautobonus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_delautobonus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, bonus, &max, &restore);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_bonus(struct map_session_data *sd, int type, int val) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_bonus_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_bonus_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.bonus(sd, type, val);
+ }
+ if( HPMHooks.count.HP_pc_bonus_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_bonus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type, &val);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_bonus2(struct map_session_data *sd, int type, int type2, int val) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_bonus2_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_bonus2_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type, &type2, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.bonus2(sd, type, type2, val);
+ }
+ if( HPMHooks.count.HP_pc_bonus2_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_bonus2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type, &type2, &val);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_bonus3(struct map_session_data *sd, int type, int type2, int type3, int val) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_bonus3_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus3_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_bonus3_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type, &type2, &type3, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.bonus3(sd, type, type2, type3, val);
+ }
+ if( HPMHooks.count.HP_pc_bonus3_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *type3, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus3_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_bonus3_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type, &type2, &type3, &val);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_bonus4(struct map_session_data *sd, int type, int type2, int type3, int type4, int val) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_bonus4_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus4_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_bonus4_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type, &type2, &type3, &type4, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.bonus4(sd, type, type2, type3, type4, val);
+ }
+ if( HPMHooks.count.HP_pc_bonus4_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus4_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_bonus4_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type, &type2, &type3, &type4, &val);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_bonus5(struct map_session_data *sd, int type, int type2, int type3, int type4, int type5, int val) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_bonus5_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *type5, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus5_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_bonus5_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type, &type2, &type3, &type4, &type5, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.bonus5(sd, type, type2, type3, type4, type5, val);
+ }
+ if( HPMHooks.count.HP_pc_bonus5_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *type5, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus5_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_bonus5_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type, &type2, &type3, &type4, &type5, &val);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_skill(struct map_session_data *sd, int id, int level, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_skill_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *id, int *level, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_skill_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &id, &level, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.skill(sd, id, level, flag);
+ }
+ if( HPMHooks.count.HP_pc_skill_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *id, int *level, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_skill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &id, &level, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_insert_card(struct map_session_data *sd, int idx_card, int idx_equip) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_insert_card_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *idx_card, int *idx_equip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_insert_card_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_insert_card_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &idx_card, &idx_equip);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.insert_card(sd, idx_card, idx_equip);
+ }
+ if( HPMHooks.count.HP_pc_insert_card_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *idx_card, int *idx_equip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_insert_card_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_insert_card_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &idx_card, &idx_equip);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_steal_item(struct map_session_data *sd, struct block_list *bl, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_steal_item_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_item_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_steal_item_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, bl, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.steal_item(sd, bl, skill_lv);
+ }
+ if( HPMHooks.count.HP_pc_steal_item_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_item_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_steal_item_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, bl, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_steal_coin(struct map_session_data *sd, struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_steal_coin_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_coin_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_steal_coin_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.steal_coin(sd, bl);
+ }
+ if( HPMHooks.count.HP_pc_steal_coin_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_coin_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_steal_coin_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_modifybuyvalue(struct map_session_data *sd, int orig_value) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_modifybuyvalue_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *orig_value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifybuyvalue_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_modifybuyvalue_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &orig_value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.modifybuyvalue(sd, orig_value);
+ }
+ if( HPMHooks.count.HP_pc_modifybuyvalue_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *orig_value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifybuyvalue_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_modifybuyvalue_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &orig_value);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_modifysellvalue(struct map_session_data *sd, int orig_value) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_modifysellvalue_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *orig_value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifysellvalue_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_modifysellvalue_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &orig_value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.modifysellvalue(sd, orig_value);
+ }
+ if( HPMHooks.count.HP_pc_modifysellvalue_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *orig_value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifysellvalue_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_modifysellvalue_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &orig_value);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_follow(struct map_session_data *sd, int target_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_follow_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *target_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_follow_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &target_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.follow(sd, target_id);
+ }
+ if( HPMHooks.count.HP_pc_follow_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *target_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_follow_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &target_id);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_stop_following(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_stop_following_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_stop_following_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_stop_following_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.stop_following(sd);
+ }
+ if( HPMHooks.count.HP_pc_stop_following_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_stop_following_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_stop_following_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_pc_maxbaselv(struct map_session_data *sd) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_pc_maxbaselv_pre ) {
+ unsigned int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxbaselv_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_maxbaselv_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.maxbaselv(sd);
+ }
+ if( HPMHooks.count.HP_pc_maxbaselv_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxbaselv_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_maxbaselv_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_pc_maxjoblv(struct map_session_data *sd) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_pc_maxjoblv_pre ) {
+ unsigned int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxjoblv_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_maxjoblv_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.maxjoblv(sd);
+ }
+ if( HPMHooks.count.HP_pc_maxjoblv_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxjoblv_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_maxjoblv_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_checkbaselevelup(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_checkbaselevelup_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.checkbaselevelup(sd);
+ }
+ if( HPMHooks.count.HP_pc_checkbaselevelup_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_checkjoblevelup(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_checkjoblevelup_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkjoblevelup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_checkjoblevelup_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.checkjoblevelup(sd);
+ }
+ if( HPMHooks.count.HP_pc_checkjoblevelup_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkjoblevelup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_checkjoblevelup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_gainexp_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_gainexp_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, src, &base_exp, &job_exp, &is_quest);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.gainexp(sd, src, base_exp, job_exp, is_quest);
+ }
+ if( HPMHooks.count.HP_pc_gainexp_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_gainexp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, src, &base_exp, &job_exp, &is_quest);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_pc_nextbaseexp(struct map_session_data *sd) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_pc_nextbaseexp_pre ) {
+ unsigned int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_nextbaseexp_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.nextbaseexp(sd);
+ }
+ if( HPMHooks.count.HP_pc_nextbaseexp_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_nextbaseexp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_pc_thisbaseexp(struct map_session_data *sd) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_pc_thisbaseexp_pre ) {
+ unsigned int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_thisbaseexp_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.thisbaseexp(sd);
+ }
+ if( HPMHooks.count.HP_pc_thisbaseexp_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_thisbaseexp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_pc_nextjobexp(struct map_session_data *sd) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_pc_nextjobexp_pre ) {
+ unsigned int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_nextjobexp_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.nextjobexp(sd);
+ }
+ if( HPMHooks.count.HP_pc_nextjobexp_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_nextjobexp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_pc_thisjobexp(struct map_session_data *sd) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_pc_thisjobexp_pre ) {
+ unsigned int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_thisjobexp_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.thisjobexp(sd);
+ }
+ if( HPMHooks.count.HP_pc_thisjobexp_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_thisjobexp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_gets_status_point(int level) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_gets_status_point_pre ) {
+ int (*preHookFunc) (int *level);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gets_status_point_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_gets_status_point_pre[hIndex].func;
+ retVal___ = preHookFunc(&level);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.gets_status_point(level);
+ }
+ if( HPMHooks.count.HP_pc_gets_status_point_post ) {
+ int (*postHookFunc) (int retVal___, int *level);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gets_status_point_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_gets_status_point_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &level);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_need_status_point(struct map_session_data *sd, int type, int val) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_need_status_point_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_need_status_point_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_need_status_point_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.need_status_point(sd, type, val);
+ }
+ if( HPMHooks.count.HP_pc_need_status_point_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_need_status_point_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_need_status_point_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type, &val);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_statusup(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_statusup_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_statusup_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.statusup(sd, type);
+ }
+ if( HPMHooks.count.HP_pc_statusup_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_statusup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_statusup2(struct map_session_data *sd, int type, int val) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_statusup2_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_statusup2_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.statusup2(sd, type, val);
+ }
+ if( HPMHooks.count.HP_pc_statusup2_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_statusup2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type, &val);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_skillup(struct map_session_data *sd, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_skillup_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_skillup_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.skillup(sd, skill_id);
+ }
+ if( HPMHooks.count.HP_pc_skillup_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_skillup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_allskillup(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_allskillup_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_allskillup_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.allskillup(sd);
+ }
+ if( HPMHooks.count.HP_pc_allskillup_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_allskillup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_resetlvl(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_resetlvl_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetlvl_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_resetlvl_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.resetlvl(sd, type);
+ }
+ if( HPMHooks.count.HP_pc_resetlvl_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetlvl_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_resetlvl_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_resetstate(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_resetstate_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_resetstate_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.resetstate(sd);
+ }
+ if( HPMHooks.count.HP_pc_resetstate_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_resetstate_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_resetskill(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_resetskill_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_resetskill_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.resetskill(sd, flag);
+ }
+ if( HPMHooks.count.HP_pc_resetskill_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_resetskill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_resetfeel(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_resetfeel_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_resetfeel_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.resetfeel(sd);
+ }
+ if( HPMHooks.count.HP_pc_resetfeel_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_resetfeel_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_resethate(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_resethate_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_resethate_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.resethate(sd);
+ }
+ if( HPMHooks.count.HP_pc_resethate_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_resethate_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_equipitem(struct map_session_data *sd, int n, int req_pos) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_equipitem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n, int *req_pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_equipitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n, &req_pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.equipitem(sd, n, req_pos);
+ }
+ if( HPMHooks.count.HP_pc_equipitem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *req_pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_equipitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n, &req_pos);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_unequipitem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_unequipitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.unequipitem(sd, n, flag);
+ }
+ if( HPMHooks.count.HP_pc_unequipitem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_unequipitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_checkitem(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_checkitem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_checkitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.checkitem(sd);
+ }
+ if( HPMHooks.count.HP_pc_checkitem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_checkitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_useitem(struct map_session_data *sd, int n) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_useitem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_useitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_useitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.useitem(sd, n);
+ }
+ if( HPMHooks.count.HP_pc_useitem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_useitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_useitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_skillatk_bonus_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillatk_bonus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_skillatk_bonus_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.skillatk_bonus(sd, skill_id);
+ }
+ if( HPMHooks.count.HP_pc_skillatk_bonus_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillatk_bonus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_skillatk_bonus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_skillheal_bonus_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal_bonus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_skillheal_bonus_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.skillheal_bonus(sd, skill_id);
+ }
+ if( HPMHooks.count.HP_pc_skillheal_bonus_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal_bonus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_skillheal_bonus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_skillheal2_bonus(struct map_session_data *sd, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_skillheal2_bonus_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal2_bonus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_skillheal2_bonus_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.skillheal2_bonus(sd, skill_id);
+ }
+ if( HPMHooks.count.HP_pc_skillheal2_bonus_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal2_bonus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_skillheal2_bonus_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_damage(struct map_session_data *sd, struct block_list *src, unsigned int hp, unsigned int sp) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_damage_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *hp, unsigned int *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_damage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_damage_pre[hIndex].func;
+ preHookFunc(sd, src, &hp, &sp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.damage(sd, src, hp, sp);
+ }
+ if( HPMHooks.count.HP_pc_damage_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *hp, unsigned int *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_damage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_damage_post[hIndex].func;
+ postHookFunc(sd, src, &hp, &sp);
+ }
+ }
+ return;
+}
+int HP_pc_dead(struct map_session_data *sd, struct block_list *src) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_dead_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct block_list *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dead_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_dead_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.dead(sd, src);
+ }
+ if( HPMHooks.count.HP_pc_dead_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dead_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_dead_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, src);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_revive(struct map_session_data *sd, unsigned int hp, unsigned int sp) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_revive_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_revive_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_revive_pre[hIndex].func;
+ preHookFunc(sd, &hp, &sp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.revive(sd, hp, sp);
+ }
+ if( HPMHooks.count.HP_pc_revive_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_revive_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_revive_post[hIndex].func;
+ postHookFunc(sd, &hp, &sp);
+ }
+ }
+ return;
+}
+void HP_pc_heal(struct map_session_data *sd, unsigned int hp, unsigned int sp, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_heal_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_heal_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_heal_pre[hIndex].func;
+ preHookFunc(sd, &hp, &sp, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.heal(sd, hp, sp, type);
+ }
+ if( HPMHooks.count.HP_pc_heal_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned int *hp, unsigned int *sp, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_heal_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_heal_post[hIndex].func;
+ postHookFunc(sd, &hp, &sp, &type);
+ }
+ }
+ return;
+}
+int HP_pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_itemheal_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *itemid, int *hp, int *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemheal_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_itemheal_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &itemid, &hp, &sp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.itemheal(sd, itemid, hp, sp);
+ }
+ if( HPMHooks.count.HP_pc_itemheal_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *itemid, int *hp, int *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemheal_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_itemheal_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &itemid, &hp, &sp);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_percentheal(struct map_session_data *sd, int hp, int sp) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_percentheal_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *hp, int *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_percentheal_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_percentheal_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &hp, &sp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.percentheal(sd, hp, sp);
+ }
+ if( HPMHooks.count.HP_pc_percentheal_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *hp, int *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_percentheal_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_percentheal_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &hp, &sp);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_jobchange(struct map_session_data *sd, int job, int upper) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_jobchange_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *job, int *upper);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_jobchange_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &job, &upper);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.jobchange(sd, job, upper);
+ }
+ if( HPMHooks.count.HP_pc_jobchange_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *job, int *upper);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_jobchange_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &job, &upper);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setoption(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setoption_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setoption_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setoption_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setoption(sd, type);
+ }
+ if( HPMHooks.count.HP_pc_setoption_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setoption_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setoption_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setcart(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setcart_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setcart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setcart_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setcart(sd, type);
+ }
+ if( HPMHooks.count.HP_pc_setcart_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setcart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setcart_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setfalcon(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setfalcon_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setfalcon_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setfalcon(sd, flag);
+ }
+ if( HPMHooks.count.HP_pc_setfalcon_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setfalcon_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setriding(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setriding_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setriding_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setriding_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setriding(sd, flag);
+ }
+ if( HPMHooks.count.HP_pc_setriding_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setriding_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setriding_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setmadogear(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setmadogear_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setmadogear_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setmadogear(sd, flag);
+ }
+ if( HPMHooks.count.HP_pc_setmadogear_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setmadogear_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_changelook(struct map_session_data *sd, int type, int val) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_changelook_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_changelook_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_changelook_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.changelook(sd, type, val);
+ }
+ if( HPMHooks.count.HP_pc_changelook_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_changelook_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_changelook_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type, &val);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_equiplookall(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_equiplookall_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equiplookall_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_equiplookall_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.equiplookall(sd);
+ }
+ if( HPMHooks.count.HP_pc_equiplookall_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equiplookall_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_equiplookall_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_readparam(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_readparam_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_readparam_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.readparam(sd, type);
+ }
+ if( HPMHooks.count.HP_pc_readparam_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_readparam_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setparam(struct map_session_data *sd, int type, int val) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setparam_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setparam_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setparam_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setparam(sd, type, val);
+ }
+ if( HPMHooks.count.HP_pc_setparam_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setparam_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setparam_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type, &val);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_readreg(struct map_session_data *sd, int reg) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_readreg_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *reg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_readreg_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &reg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.readreg(sd, reg);
+ }
+ if( HPMHooks.count.HP_pc_readreg_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *reg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_readreg_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &reg);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setreg(struct map_session_data *sd, int reg, int val) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setreg_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *reg, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setreg_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &reg, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setreg(sd, reg, val);
+ }
+ if( HPMHooks.count.HP_pc_setreg_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *reg, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setreg_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &reg, &val);
+ }
+ }
+ return retVal___;
+}
+char* HP_pc_readregstr(struct map_session_data *sd, int reg) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_pc_readregstr_pre ) {
+ char* (*preHookFunc) (struct map_session_data *sd, int *reg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_readregstr_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &reg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.readregstr(sd, reg);
+ }
+ if( HPMHooks.count.HP_pc_readregstr_post ) {
+ char* (*postHookFunc) (char* retVal___, struct map_session_data *sd, int *reg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_readregstr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &reg);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setregstr(struct map_session_data *sd, int reg, const char *str) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setregstr_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *reg, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setregstr_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &reg, str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setregstr(sd, reg, str);
+ }
+ if( HPMHooks.count.HP_pc_setregstr_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *reg, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setregstr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &reg, str);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_readregistry(struct map_session_data *sd, const char *reg, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_readregistry_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *reg, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_readregistry_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, reg, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.readregistry(sd, reg, type);
+ }
+ if( HPMHooks.count.HP_pc_readregistry_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *reg, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_readregistry_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, reg, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setregistry(struct map_session_data *sd, const char *reg, int val, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setregistry_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *reg, int *val, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setregistry_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, reg, &val, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setregistry(sd, reg, val, type);
+ }
+ if( HPMHooks.count.HP_pc_setregistry_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *reg, int *val, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setregistry_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, reg, &val, &type);
+ }
+ }
+ return retVal___;
+}
+char* HP_pc_readregistry_str(struct map_session_data *sd, const char *reg, int type) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_pc_readregistry_str_pre ) {
+ char* (*preHookFunc) (struct map_session_data *sd, const char *reg, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_str_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_readregistry_str_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, reg, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.readregistry_str(sd, reg, type);
+ }
+ if( HPMHooks.count.HP_pc_readregistry_str_post ) {
+ char* (*postHookFunc) (char* retVal___, struct map_session_data *sd, const char *reg, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_str_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_readregistry_str_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, reg, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setregistry_str(struct map_session_data *sd, const char *reg, const char *val, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setregistry_str_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *reg, const char *val, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_str_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setregistry_str_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, reg, val, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setregistry_str(sd, reg, val, type);
+ }
+ if( HPMHooks.count.HP_pc_setregistry_str_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *reg, const char *val, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_str_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setregistry_str_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, reg, val, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_addeventtimer(struct map_session_data *sd, int tick, const char *name) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_addeventtimer_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *tick, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_addeventtimer_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &tick, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.addeventtimer(sd, tick, name);
+ }
+ if( HPMHooks.count.HP_pc_addeventtimer_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *tick, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_addeventtimer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &tick, name);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_deleventtimer(struct map_session_data *sd, const char *name) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_deleventtimer_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_deleventtimer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_deleventtimer_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.deleventtimer(sd, name);
+ }
+ if( HPMHooks.count.HP_pc_deleventtimer_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_deleventtimer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_deleventtimer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, name);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_cleareventtimer(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_cleareventtimer_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_cleareventtimer_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.cleareventtimer(sd);
+ }
+ if( HPMHooks.count.HP_pc_cleareventtimer_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_cleareventtimer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_addeventtimercount(struct map_session_data *sd, const char *name, int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_addeventtimercount_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, const char *name, int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimercount_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_addeventtimercount_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, name, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.addeventtimercount(sd, name, tick);
+ }
+ if( HPMHooks.count.HP_pc_addeventtimercount_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name, int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimercount_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_addeventtimercount_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, name, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_calc_pvprank(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_calc_pvprank_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_calc_pvprank_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.calc_pvprank(sd);
+ }
+ if( HPMHooks.count.HP_pc_calc_pvprank_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_calc_pvprank_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_calc_pvprank_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_calc_pvprank_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.calc_pvprank_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pc_calc_pvprank_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_calc_pvprank_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_ismarried(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_ismarried_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_ismarried_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.ismarried(sd);
+ }
+ if( HPMHooks.count.HP_pc_ismarried_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_ismarried_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_marriage(struct map_session_data *sd, struct map_session_data *dstsd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_marriage_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_marriage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_marriage_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, dstsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.marriage(sd, dstsd);
+ }
+ if( HPMHooks.count.HP_pc_marriage_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *dstsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_marriage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_marriage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, dstsd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_divorce(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_divorce_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_divorce_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.divorce(sd);
+ }
+ if( HPMHooks.count.HP_pc_divorce_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_divorce_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+struct map_session_data* HP_pc_get_partner(struct map_session_data *sd) {
+ int hIndex = 0;
+ struct map_session_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_pc_get_partner_pre ) {
+ struct map_session_data* (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_partner_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_get_partner_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.get_partner(sd);
+ }
+ if( HPMHooks.count.HP_pc_get_partner_post ) {
+ struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_partner_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_get_partner_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+struct map_session_data* HP_pc_get_father(struct map_session_data *sd) {
+ int hIndex = 0;
+ struct map_session_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_pc_get_father_pre ) {
+ struct map_session_data* (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_father_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_get_father_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.get_father(sd);
+ }
+ if( HPMHooks.count.HP_pc_get_father_post ) {
+ struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_father_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_get_father_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+struct map_session_data* HP_pc_get_mother(struct map_session_data *sd) {
+ int hIndex = 0;
+ struct map_session_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_pc_get_mother_pre ) {
+ struct map_session_data* (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_mother_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_get_mother_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.get_mother(sd);
+ }
+ if( HPMHooks.count.HP_pc_get_mother_post ) {
+ struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_mother_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_get_mother_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+struct map_session_data* HP_pc_get_child(struct map_session_data *sd) {
+ int hIndex = 0;
+ struct map_session_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_pc_get_child_pre ) {
+ struct map_session_data* (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_child_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_get_child_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.get_child(sd);
+ }
+ if( HPMHooks.count.HP_pc_get_child_post ) {
+ struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_child_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_get_child_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_bleeding(struct map_session_data *sd, unsigned int diff_tick) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_bleeding_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned int *diff_tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bleeding_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_bleeding_pre[hIndex].func;
+ preHookFunc(sd, &diff_tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.bleeding(sd, diff_tick);
+ }
+ if( HPMHooks.count.HP_pc_bleeding_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned int *diff_tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bleeding_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_bleeding_post[hIndex].func;
+ postHookFunc(sd, &diff_tick);
+ }
+ }
+ return;
+}
+void HP_pc_regen(struct map_session_data *sd, unsigned int diff_tick) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_regen_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned int *diff_tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_regen_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_regen_pre[hIndex].func;
+ preHookFunc(sd, &diff_tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.regen(sd, diff_tick);
+ }
+ if( HPMHooks.count.HP_pc_regen_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned int *diff_tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_regen_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_regen_post[hIndex].func;
+ postHookFunc(sd, &diff_tick);
+ }
+ }
+ return;
+}
+void HP_pc_setstand(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_setstand_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setstand_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.setstand(sd);
+ }
+ if( HPMHooks.count.HP_pc_setstand_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setstand_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_pc_candrop(struct map_session_data *sd, struct item *item) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_candrop_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct item *item);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_candrop_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_candrop_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, item);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.candrop(sd, item);
+ }
+ if( HPMHooks.count.HP_pc_candrop_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_candrop_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_candrop_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, item);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_jobid2mapid(unsigned short b_class) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_jobid2mapid_pre ) {
+ int (*preHookFunc) (unsigned short *b_class);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_jobid2mapid_pre[hIndex].func;
+ retVal___ = preHookFunc(&b_class);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.jobid2mapid(b_class);
+ }
+ if( HPMHooks.count.HP_pc_jobid2mapid_post ) {
+ int (*postHookFunc) (int retVal___, unsigned short *b_class);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_jobid2mapid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &b_class);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_mapid2jobid(unsigned short class_, int sex) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_mapid2jobid_pre ) {
+ int (*preHookFunc) (unsigned short *class_, int *sex);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_mapid2jobid_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_, &sex);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.mapid2jobid(class_, sex);
+ }
+ if( HPMHooks.count.HP_pc_mapid2jobid_post ) {
+ int (*postHookFunc) (int retVal___, unsigned short *class_, int *sex);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_mapid2jobid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_, &sex);
+ }
+ }
+ return retVal___;
+}
+const char* HP_pc_job_name(int class_) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_pc_job_name_pre ) {
+ const char* (*preHookFunc) (int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_job_name_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_job_name_pre[hIndex].func;
+ retVal___ = preHookFunc(&class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.job_name(class_);
+ }
+ if( HPMHooks.count.HP_pc_job_name_post ) {
+ const char* (*postHookFunc) (const char* retVal___, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_job_name_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_job_name_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &class_);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_setinvincibletimer(struct map_session_data *sd, int val) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_setinvincibletimer_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinvincibletimer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setinvincibletimer_pre[hIndex].func;
+ preHookFunc(sd, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.setinvincibletimer(sd, val);
+ }
+ if( HPMHooks.count.HP_pc_setinvincibletimer_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinvincibletimer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setinvincibletimer_post[hIndex].func;
+ postHookFunc(sd, &val);
+ }
+ }
+ return;
+}
+void HP_pc_delinvincibletimer(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_delinvincibletimer_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_delinvincibletimer_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.delinvincibletimer(sd);
+ }
+ if( HPMHooks.count.HP_pc_delinvincibletimer_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_delinvincibletimer_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_pc_addspiritball(struct map_session_data *sd, int interval, int max) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_addspiritball_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *interval, int *max);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_addspiritball_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &interval, &max);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.addspiritball(sd, interval, max);
+ }
+ if( HPMHooks.count.HP_pc_addspiritball_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *interval, int *max);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_addspiritball_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &interval, &max);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_delspiritball_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *count, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_delspiritball_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &count, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.delspiritball(sd, count, type);
+ }
+ if( HPMHooks.count.HP_pc_delspiritball_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *count, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_delspiritball_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &count, &type);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_addfame(struct map_session_data *sd, int count) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_addfame_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addfame_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_addfame_pre[hIndex].func;
+ preHookFunc(sd, &count);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.addfame(sd, count);
+ }
+ if( HPMHooks.count.HP_pc_addfame_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addfame_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_addfame_post[hIndex].func;
+ postHookFunc(sd, &count);
+ }
+ }
+ return;
+}
+unsigned char HP_pc_famerank(int char_id, int job) {
+ int hIndex = 0;
+ unsigned char retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned char));
+ if( HPMHooks.count.HP_pc_famerank_pre ) {
+ unsigned char (*preHookFunc) (int *char_id, int *job);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_famerank_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_famerank_pre[hIndex].func;
+ retVal___ = preHookFunc(&char_id, &job);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.famerank(char_id, job);
+ }
+ if( HPMHooks.count.HP_pc_famerank_post ) {
+ unsigned char (*postHookFunc) (unsigned char retVal___, int *char_id, int *job);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_famerank_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_famerank_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &char_id, &job);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_set_hate_mob_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *pos, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_hate_mob_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_set_hate_mob_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &pos, bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.set_hate_mob(sd, pos, bl);
+ }
+ if( HPMHooks.count.HP_pc_set_hate_mob_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *pos, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_hate_mob_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_set_hate_mob_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &pos, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_readdb(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_readdb_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_readdb_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.readdb();
+ }
+ if( HPMHooks.count.HP_pc_readdb_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_readdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_map_day_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_map_day_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_map_day_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.map_day_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pc_map_day_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_map_day_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_map_night_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_map_night_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_map_night_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.map_night_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pc_map_night_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_map_night_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_inventory_rentals(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_inventory_rentals_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_inventory_rentals_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.inventory_rentals(sd);
+ }
+ if( HPMHooks.count.HP_pc_inventory_rentals_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_inventory_rentals_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_pc_inventory_rental_clear(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_inventory_rental_clear_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_clear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_inventory_rental_clear_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.inventory_rental_clear(sd);
+ }
+ if( HPMHooks.count.HP_pc_inventory_rental_clear_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_clear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_inventory_rental_clear_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_inventory_rental_add(struct map_session_data *sd, int seconds) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_inventory_rental_add_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *seconds);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_inventory_rental_add_pre[hIndex].func;
+ preHookFunc(sd, &seconds);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.inventory_rental_add(sd, seconds);
+ }
+ if( HPMHooks.count.HP_pc_inventory_rental_add_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *seconds);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_inventory_rental_add_post[hIndex].func;
+ postHookFunc(sd, &seconds);
+ }
+ }
+ return;
+}
+int HP_pc_disguise(struct map_session_data *sd, int class_) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_disguise_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_disguise_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_disguise_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.disguise(sd, class_);
+ }
+ if( HPMHooks.count.HP_pc_disguise_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_disguise_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_disguise_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &class_);
+ }
+ }
+ return retVal___;
+}
+bool HP_pc_isautolooting(struct map_session_data *sd, int nameid) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_pc_isautolooting_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isautolooting_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_isautolooting_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.isautolooting(sd, nameid);
+ }
+ if( HPMHooks.count.HP_pc_isautolooting_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isautolooting_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_isautolooting_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &nameid);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_overheat(struct map_session_data *sd, int val) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_overheat_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_overheat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_overheat_pre[hIndex].func;
+ preHookFunc(sd, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.overheat(sd, val);
+ }
+ if( HPMHooks.count.HP_pc_overheat_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_overheat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_overheat_post[hIndex].func;
+ postHookFunc(sd, &val);
+ }
+ }
+ return;
+}
+int HP_pc_banding(struct map_session_data *sd, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_banding_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_banding_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_banding_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.banding(sd, skill_lv);
+ }
+ if( HPMHooks.count.HP_pc_banding_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_banding_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_banding_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_itemcd_do(struct map_session_data *sd, bool load) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_itemcd_do_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, bool *load);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemcd_do_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_itemcd_do_pre[hIndex].func;
+ preHookFunc(sd, &load);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.itemcd_do(sd, load);
+ }
+ if( HPMHooks.count.HP_pc_itemcd_do_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, bool *load);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemcd_do_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_itemcd_do_post[hIndex].func;
+ postHookFunc(sd, &load);
+ }
+ }
+ return;
+}
+int HP_pc_load_combo(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_load_combo_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_load_combo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_load_combo_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.load_combo(sd);
+ }
+ if( HPMHooks.count.HP_pc_load_combo_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_load_combo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_load_combo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_add_charm(struct map_session_data *sd, int interval, int max, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_add_charm_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *interval, int *max, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_add_charm_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &interval, &max, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.add_charm(sd, interval, max, type);
+ }
+ if( HPMHooks.count.HP_pc_add_charm_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *interval, int *max, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_add_charm_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &interval, &max, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_del_charm(struct map_session_data *sd, int count, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_del_charm_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *count, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_del_charm_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &count, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.del_charm(sd, count, type);
+ }
+ if( HPMHooks.count.HP_pc_del_charm_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *count, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_del_charm_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &count, &type);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_baselevelchanged(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_baselevelchanged_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_baselevelchanged_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.baselevelchanged(sd);
+ }
+ if( HPMHooks.count.HP_pc_baselevelchanged_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_baselevelchanged_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_pc_level_penalty_mod(int diff, unsigned char race, unsigned short mode, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_level_penalty_mod_pre ) {
+ int (*preHookFunc) (int *diff, unsigned char *race, unsigned short *mode, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_level_penalty_mod_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_level_penalty_mod_pre[hIndex].func;
+ retVal___ = preHookFunc(&diff, &race, &mode, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.level_penalty_mod(diff, race, mode, type);
+ }
+ if( HPMHooks.count.HP_pc_level_penalty_mod_post ) {
+ int (*postHookFunc) (int retVal___, int *diff, unsigned char *race, unsigned short *mode, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_level_penalty_mod_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_level_penalty_mod_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &diff, &race, &mode, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_calc_skillpoint(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_calc_skillpoint_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skillpoint_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_calc_skillpoint_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.calc_skillpoint(sd);
+ }
+ if( HPMHooks.count.HP_pc_calc_skillpoint_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skillpoint_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_calc_skillpoint_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_invincible_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_invincible_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_invincible_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.invincible_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pc_invincible_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_invincible_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_spiritball_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_spiritball_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_spiritball_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.spiritball_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pc_spiritball_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_spiritball_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_check_banding(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_check_banding_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_banding_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_pc_check_banding_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.pc.check_banding(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_pc_check_banding_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_banding_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_pc_check_banding_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_inventory_rental_end(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_inventory_rental_end_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_inventory_rental_end_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.inventory_rental_end(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pc_inventory_rental_end_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_inventory_rental_end_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_check_skilltree(struct map_session_data *sd, int skill_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_check_skilltree_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_skilltree_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_check_skilltree_pre[hIndex].func;
+ preHookFunc(sd, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.check_skilltree(sd, skill_id);
+ }
+ if( HPMHooks.count.HP_pc_check_skilltree_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_skilltree_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_check_skilltree_post[hIndex].func;
+ postHookFunc(sd, &skill_id);
+ }
+ }
+ return;
+}
+int HP_pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv, short rate, short flag, short card_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_bonus_autospell_pre ) {
+ int (*preHookFunc) (struct s_autospell *spell, int *max, short *id, short *lv, short *rate, short *flag, short *card_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_bonus_autospell_pre[hIndex].func;
+ retVal___ = preHookFunc(spell, &max, &id, &lv, &rate, &flag, &card_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.bonus_autospell(spell, max, id, lv, rate, flag, card_id);
+ }
+ if( HPMHooks.count.HP_pc_bonus_autospell_post ) {
+ int (*postHookFunc) (int retVal___, struct s_autospell *spell, int *max, short *id, short *lv, short *rate, short *flag, short *card_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_bonus_autospell_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, spell, &max, &id, &lv, &rate, &flag, &card_id);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, short card_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_bonus_autospell_onskill_pre ) {
+ int (*preHookFunc) (struct s_autospell *spell, int *max, short *src_skill, short *id, short *lv, short *rate, short *card_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_onskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_bonus_autospell_onskill_pre[hIndex].func;
+ retVal___ = preHookFunc(spell, &max, &src_skill, &id, &lv, &rate, &card_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.bonus_autospell_onskill(spell, max, src_skill, id, lv, rate, card_id);
+ }
+ if( HPMHooks.count.HP_pc_bonus_autospell_onskill_post ) {
+ int (*postHookFunc) (int retVal___, struct s_autospell *spell, int *max, short *src_skill, short *id, short *lv, short *rate, short *card_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_onskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_bonus_autospell_onskill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, spell, &max, &src_skill, &id, &lv, &rate, &card_id);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_bonus_addeff(struct s_addeffect *effect, int max, enum sc_type id, short rate, short arrow_rate, unsigned char flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_bonus_addeff_pre ) {
+ int (*preHookFunc) (struct s_addeffect *effect, int *max, enum sc_type *id, short *rate, short *arrow_rate, unsigned char *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_bonus_addeff_pre[hIndex].func;
+ retVal___ = preHookFunc(effect, &max, &id, &rate, &arrow_rate, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.bonus_addeff(effect, max, id, rate, arrow_rate, flag);
+ }
+ if( HPMHooks.count.HP_pc_bonus_addeff_post ) {
+ int (*postHookFunc) (int retVal___, struct s_addeffect *effect, int *max, enum sc_type *id, short *rate, short *arrow_rate, unsigned char *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_bonus_addeff_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, effect, &max, &id, &rate, &arrow_rate, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_bonus_addeff_onskill(struct s_addeffectonskill *effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_bonus_addeff_onskill_pre ) {
+ int (*preHookFunc) (struct s_addeffectonskill *effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_onskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_bonus_addeff_onskill_pre[hIndex].func;
+ retVal___ = preHookFunc(effect, &max, &id, &rate, &skill_id, &target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.bonus_addeff_onskill(effect, max, id, rate, skill_id, target);
+ }
+ if( HPMHooks.count.HP_pc_bonus_addeff_onskill_post ) {
+ int (*postHookFunc) (int retVal___, struct s_addeffectonskill *effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_onskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_bonus_addeff_onskill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, effect, &max, &id, &rate, &skill_id, &target);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, short group, int race, int rate) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_bonus_item_drop_pre ) {
+ int (*preHookFunc) (struct s_add_drop *drop, const short *max, short *id, short *group, int *race, int *rate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_bonus_item_drop_pre[hIndex].func;
+ retVal___ = preHookFunc(drop, &max, &id, &group, &race, &rate);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.bonus_item_drop(drop, max, id, group, race, rate);
+ }
+ if( HPMHooks.count.HP_pc_bonus_item_drop_post ) {
+ int (*postHookFunc) (int retVal___, struct s_add_drop *drop, const short *max, short *id, short *group, int *race, int *rate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_bonus_item_drop_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, drop, &max, &id, &group, &race, &rate);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_calcexp_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_calcexp_pre[hIndex].func;
+ preHookFunc(sd, base_exp, job_exp, src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.calcexp(sd, base_exp, job_exp, src);
+ }
+ if( HPMHooks.count.HP_pc_calcexp_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_calcexp_post[hIndex].func;
+ postHookFunc(sd, base_exp, job_exp, src);
+ }
+ }
+ return;
+}
+int HP_pc_respawn_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_respawn_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_respawn_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.respawn_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pc_respawn_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_respawn_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_jobchange_killclone(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_jobchange_killclone_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_killclone_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_pc_jobchange_killclone_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.pc.jobchange_killclone(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_pc_jobchange_killclone_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_killclone_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_pc_jobchange_killclone_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_getstat(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_getstat_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getstat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_getstat_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.getstat(sd, type);
+ }
+ if( HPMHooks.count.HP_pc_getstat_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getstat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_getstat_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_setstat(struct map_session_data *sd, int type, int val) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_setstat_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstat_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_setstat_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type, &val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.setstat(sd, type, val);
+ }
+ if( HPMHooks.count.HP_pc_setstat_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstat_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_setstat_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type, &val);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_eventtimer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_eventtimer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_eventtimer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.eventtimer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pc_eventtimer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_eventtimer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_daynight_timer_sub(struct map_session_data *sd, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_daynight_timer_sub_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_daynight_timer_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_pc_daynight_timer_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.pc.daynight_timer_sub(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_pc_daynight_timer_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_daynight_timer_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_pc_daynight_timer_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_charm_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_charm_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_charm_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.charm_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pc_charm_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_charm_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+bool HP_pc_readdb_levelpenalty(char *fields[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_pc_readdb_levelpenalty_pre ) {
+ bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_levelpenalty_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_readdb_levelpenalty_pre[hIndex].func;
+ retVal___ = preHookFunc(fields, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.readdb_levelpenalty(fields, columns, current);
+ }
+ if( HPMHooks.count.HP_pc_readdb_levelpenalty_post ) {
+ bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_levelpenalty_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_readdb_levelpenalty_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fields, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_autosave(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_autosave_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_autosave_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.autosave(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pc_autosave_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_autosave_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_follow_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_follow_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_follow_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.follow_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pc_follow_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_follow_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+void HP_pc_read_skill_tree(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_read_skill_tree_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_tree_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_read_skill_tree_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.read_skill_tree();
+ }
+ if( HPMHooks.count.HP_pc_read_skill_tree_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_tree_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_read_skill_tree_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_pc_isUseitem(struct map_session_data *sd, int n) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_isUseitem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isUseitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_isUseitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.isUseitem(sd, n);
+ }
+ if( HPMHooks.count.HP_pc_isUseitem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isUseitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_isUseitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_show_steal(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_show_steal_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_show_steal_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_pc_show_steal_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.pc.show_steal(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_pc_show_steal_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_show_steal_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_pc_show_steal_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_checkcombo(struct map_session_data *sd, struct item_data *data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_checkcombo_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkcombo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_checkcombo_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.checkcombo(sd, data);
+ }
+ if( HPMHooks.count.HP_pc_checkcombo_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkcombo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_checkcombo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, data);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_calcweapontype(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_calcweapontype_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_calcweapontype_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.calcweapontype(sd);
+ }
+ if( HPMHooks.count.HP_pc_calcweapontype_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_calcweapontype_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pc_removecombo(struct map_session_data *sd, struct item_data *data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pc_removecombo_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_removecombo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_removecombo_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.removecombo(sd, data);
+ }
+ if( HPMHooks.count.HP_pc_removecombo_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_removecombo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pc_removecombo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, data);
+ }
+ }
+ return retVal___;
+}
+/* pet */
+int HP_pet_init(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_init_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_init_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.init();
+ }
+ if( HPMHooks.count.HP_pet_init_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_final(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_final_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_final_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.final();
+ }
+ if( HPMHooks.count.HP_pet_final_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_hungry_val(struct pet_data *pd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_hungry_val_pre ) {
+ int (*preHookFunc) (struct pet_data *pd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_val_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_hungry_val_pre[hIndex].func;
+ retVal___ = preHookFunc(pd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.hungry_val(pd);
+ }
+ if( HPMHooks.count.HP_pet_hungry_val_post ) {
+ int (*postHookFunc) (int retVal___, struct pet_data *pd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_val_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_hungry_val_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pd);
+ }
+ }
+ return retVal___;
+}
+void HP_pet_set_intimate(struct pet_data *pd, int value) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pet_set_intimate_pre ) {
+ void (*preHookFunc) (struct pet_data *pd, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_set_intimate_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_set_intimate_pre[hIndex].func;
+ preHookFunc(pd, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pet.set_intimate(pd, value);
+ }
+ if( HPMHooks.count.HP_pet_set_intimate_post ) {
+ void (*postHookFunc) (struct pet_data *pd, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_set_intimate_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_set_intimate_post[hIndex].func;
+ postHookFunc(pd, &value);
+ }
+ }
+ return;
+}
+int HP_pet_create_egg(struct map_session_data *sd, int item_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_create_egg_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *item_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_create_egg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_create_egg_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &item_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.create_egg(sd, item_id);
+ }
+ if( HPMHooks.count.HP_pet_create_egg_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *item_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_create_egg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_create_egg_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &item_id);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_unlocktarget(struct pet_data *pd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_unlocktarget_pre ) {
+ int (*preHookFunc) (struct pet_data *pd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_unlocktarget_pre[hIndex].func;
+ retVal___ = preHookFunc(pd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.unlocktarget(pd);
+ }
+ if( HPMHooks.count.HP_pet_unlocktarget_post ) {
+ int (*postHookFunc) (int retVal___, struct pet_data *pd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_unlocktarget_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pd);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_attackskill(struct pet_data *pd, int target_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_attackskill_pre ) {
+ int (*preHookFunc) (struct pet_data *pd, int *target_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_attackskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_attackskill_pre[hIndex].func;
+ retVal___ = preHookFunc(pd, &target_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.attackskill(pd, target_id);
+ }
+ if( HPMHooks.count.HP_pet_attackskill_post ) {
+ int (*postHookFunc) (int retVal___, struct pet_data *pd, int *target_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_attackskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_attackskill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pd, &target_id);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_target_check(struct map_session_data *sd, struct block_list *bl, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_target_check_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_target_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_target_check_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, bl, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.target_check(sd, bl, type);
+ }
+ if( HPMHooks.count.HP_pet_target_check_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_target_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_target_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, bl, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_sc_check(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_sc_check_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_sc_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_sc_check_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.sc_check(sd, type);
+ }
+ if( HPMHooks.count.HP_pet_sc_check_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_sc_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_sc_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_hungry(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_hungry_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_hungry_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.hungry(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pet_hungry_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_hungry_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_search_petDB_index(int key, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_search_petDB_index_pre ) {
+ int (*preHookFunc) (int *key, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_search_petDB_index_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_search_petDB_index_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.search_petDB_index(key, type);
+ }
+ if( HPMHooks.count.HP_pet_search_petDB_index_post ) {
+ int (*postHookFunc) (int retVal___, int *key, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_search_petDB_index_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_search_petDB_index_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_hungry_timer_delete(struct pet_data *pd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_hungry_timer_delete_pre ) {
+ int (*preHookFunc) (struct pet_data *pd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_timer_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_hungry_timer_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(pd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.hungry_timer_delete(pd);
+ }
+ if( HPMHooks.count.HP_pet_hungry_timer_delete_post ) {
+ int (*postHookFunc) (int retVal___, struct pet_data *pd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_timer_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_hungry_timer_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pd);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_performance(struct map_session_data *sd, struct pet_data *pd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_performance_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_performance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_performance_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, pd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.performance(sd, pd);
+ }
+ if( HPMHooks.count.HP_pet_performance_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_performance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_performance_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, pd);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_return_egg(struct map_session_data *sd, struct pet_data *pd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_return_egg_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_return_egg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_return_egg_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, pd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.return_egg(sd, pd);
+ }
+ if( HPMHooks.count.HP_pet_return_egg_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_return_egg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_return_egg_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, pd);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_data_init_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct s_pet *petinfo);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_data_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_data_init_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, petinfo);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.data_init(sd, petinfo);
+ }
+ if( HPMHooks.count.HP_pet_data_init_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_data_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_data_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, petinfo);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_birth_process_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct s_pet *petinfo);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_birth_process_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_birth_process_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, petinfo);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.birth_process(sd, petinfo);
+ }
+ if( HPMHooks.count.HP_pet_birth_process_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_birth_process_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_birth_process_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, petinfo);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_recv_petdata(int account_id, struct s_pet *p, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_recv_petdata_pre ) {
+ int (*preHookFunc) (int *account_id, struct s_pet *p, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recv_petdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_recv_petdata_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, p, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.recv_petdata(account_id, p, flag);
+ }
+ if( HPMHooks.count.HP_pet_recv_petdata_post ) {
+ int (*postHookFunc) (int retVal___, int *account_id, struct s_pet *p, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recv_petdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_recv_petdata_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, p, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_select_egg(struct map_session_data *sd, short egg_index) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_select_egg_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, short *egg_index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_select_egg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_select_egg_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &egg_index);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.select_egg(sd, egg_index);
+ }
+ if( HPMHooks.count.HP_pet_select_egg_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *egg_index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_select_egg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_select_egg_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &egg_index);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_catch_process1(struct map_session_data *sd, int target_class) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_catch_process1_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *target_class);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process1_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_catch_process1_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &target_class);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.catch_process1(sd, target_class);
+ }
+ if( HPMHooks.count.HP_pet_catch_process1_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *target_class);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process1_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_catch_process1_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &target_class);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_catch_process2(struct map_session_data *sd, int target_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_catch_process2_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *target_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_catch_process2_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &target_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.catch_process2(sd, target_id);
+ }
+ if( HPMHooks.count.HP_pet_catch_process2_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *target_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_catch_process2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &target_id);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_get_egg(int account_id, int pet_id, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_get_egg_pre ) {
+ int (*preHookFunc) (int *account_id, int *pet_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_get_egg_pre[hIndex].func;
+ retVal___ = preHookFunc(&account_id, &pet_id, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.get_egg(account_id, pet_id, flag);
+ }
+ if( HPMHooks.count.HP_pet_get_egg_post ) {
+ int (*postHookFunc) (int retVal___, int *account_id, int *pet_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_get_egg_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &account_id, &pet_id, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_unequipitem(struct map_session_data *sd, struct pet_data *pd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_unequipitem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unequipitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_unequipitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, pd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.unequipitem(sd, pd);
+ }
+ if( HPMHooks.count.HP_pet_unequipitem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unequipitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_unequipitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, pd);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_food(struct map_session_data *sd, struct pet_data *pd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_food_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_food_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_food_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, pd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.food(sd, pd);
+ }
+ if( HPMHooks.count.HP_pet_food_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_food_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_food_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, pd);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_lootsearch_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.pet.ai_sub_hard_lootsearch(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_lootsearch_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_menu(struct map_session_data *sd, int menunum) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_menu_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *menunum);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_menu_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_menu_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &menunum);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.menu(sd, menunum);
+ }
+ if( HPMHooks.count.HP_pet_menu_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *menunum);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_menu_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_menu_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &menunum);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_change_name(struct map_session_data *sd, char *name) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_change_name_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_change_name_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.change_name(sd, name);
+ }
+ if( HPMHooks.count.HP_pet_change_name_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_change_name_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, name);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_change_name_ack(struct map_session_data *sd, char *name, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_change_name_ack_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, char *name, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_change_name_ack_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, name, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.change_name_ack(sd, name, flag);
+ }
+ if( HPMHooks.count.HP_pet_change_name_ack_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_change_name_ack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, name, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_equipitem(struct map_session_data *sd, int index) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_equipitem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_equipitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_equipitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &index);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.equipitem(sd, index);
+ }
+ if( HPMHooks.count.HP_pet_equipitem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_equipitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_equipitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &index);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_randomwalk(struct pet_data *pd, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_randomwalk_pre ) {
+ int (*preHookFunc) (struct pet_data *pd, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_randomwalk_pre[hIndex].func;
+ retVal___ = preHookFunc(pd, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.randomwalk(pd, tick);
+ }
+ if( HPMHooks.count.HP_pet_randomwalk_post ) {
+ int (*postHookFunc) (int retVal___, struct pet_data *pd, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_randomwalk_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pd, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_ai_sub_hard_pre ) {
+ int (*preHookFunc) (struct pet_data *pd, struct map_session_data *sd, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_pre[hIndex].func;
+ retVal___ = preHookFunc(pd, sd, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.ai_sub_hard(pd, sd, tick);
+ }
+ if( HPMHooks.count.HP_pet_ai_sub_hard_post ) {
+ int (*postHookFunc) (int retVal___, struct pet_data *pd, struct map_session_data *sd, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_ai_sub_hard_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pd, sd, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_ai_sub_foreachclient_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_foreachclient_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_pet_ai_sub_foreachclient_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.pet.ai_sub_foreachclient(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_pet_ai_sub_foreachclient_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_foreachclient_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_pet_ai_sub_foreachclient_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_ai_hard(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_ai_hard_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_ai_hard_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.ai_hard(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pet_ai_hard_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_ai_hard_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_delay_item_drop(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_delay_item_drop_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_delay_item_drop_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.delay_item_drop(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pet_delay_item_drop_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_delay_item_drop_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_lootitem_drop(struct pet_data *pd, struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_lootitem_drop_pre ) {
+ int (*preHookFunc) (struct pet_data *pd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_lootitem_drop_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_lootitem_drop_pre[hIndex].func;
+ retVal___ = preHookFunc(pd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.lootitem_drop(pd, sd);
+ }
+ if( HPMHooks.count.HP_pet_lootitem_drop_post ) {
+ int (*postHookFunc) (int retVal___, struct pet_data *pd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_lootitem_drop_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_lootitem_drop_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pd, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_skill_bonus_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_skill_bonus_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.skill_bonus_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pet_skill_bonus_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_skill_bonus_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_recovery_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_recovery_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_recovery_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.recovery_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pet_recovery_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_recovery_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_heal_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_heal_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_heal_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.heal_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pet_heal_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_heal_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_heal_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_skill_support_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_skill_support_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.skill_support_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_pet_skill_support_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_skill_support_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_pet_read_db(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_pet_read_db_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_pet_read_db_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pet.read_db();
+ }
+ if( HPMHooks.count.HP_pet_read_db_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_pet_read_db_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+/* quest */
+void HP_quest_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_quest_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_quest_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.quest.init();
+ }
+ if( HPMHooks.count.HP_quest_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_quest_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_quest_reload(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_quest_reload_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_quest_reload_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.quest.reload();
+ }
+ if( HPMHooks.count.HP_quest_reload_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_quest_reload_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_quest_search_db(int quest_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ 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;
+ retVal___ = preHookFunc(&quest_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.quest.search_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;
+ retVal___ = postHookFunc(retVal___, &quest_id);
+ }
+ }
+ return retVal___;
+}
+int HP_quest_pc_login(TBL_PC *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_quest_pc_login_pre ) {
+ int (*preHookFunc) (TBL_PC *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_pc_login_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_quest_pc_login_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.quest.pc_login(sd);
+ }
+ if( HPMHooks.count.HP_quest_pc_login_post ) {
+ int (*postHookFunc) (int retVal___, TBL_PC *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_pc_login_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_quest_pc_login_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_quest_add(TBL_PC *sd, int quest_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_quest_add_pre ) {
+ int (*preHookFunc) (TBL_PC *sd, int *quest_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_quest_add_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &quest_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.quest.add(sd, quest_id);
+ }
+ if( HPMHooks.count.HP_quest_add_post ) {
+ int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_quest_add_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &quest_id);
+ }
+ }
+ return retVal___;
+}
+int HP_quest_change(TBL_PC *sd, int qid1, int qid2) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_quest_change_pre ) {
+ int (*preHookFunc) (TBL_PC *sd, int *qid1, int *qid2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_change_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_quest_change_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &qid1, &qid2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.quest.change(sd, qid1, qid2);
+ }
+ if( HPMHooks.count.HP_quest_change_post ) {
+ int (*postHookFunc) (int retVal___, TBL_PC *sd, int *qid1, int *qid2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_change_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_quest_change_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &qid1, &qid2);
+ }
+ }
+ return retVal___;
+}
+int HP_quest_delete(TBL_PC *sd, int quest_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_quest_delete_pre ) {
+ int (*preHookFunc) (TBL_PC *sd, int *quest_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_quest_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &quest_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.quest.delete(sd, quest_id);
+ }
+ if( HPMHooks.count.HP_quest_delete_post ) {
+ int (*postHookFunc) (int retVal___, TBL_PC *sd, int *quest_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_quest_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &quest_id);
+ }
+ }
+ return retVal___;
+}
+int HP_quest_update_objective_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_quest_update_objective_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_quest_update_objective_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.quest.update_objective_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_quest_update_objective_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_quest_update_objective_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_quest_update_objective(TBL_PC *sd, int mob_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_quest_update_objective_pre ) {
+ void (*preHookFunc) (TBL_PC *sd, int *mob_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_quest_update_objective_pre[hIndex].func;
+ preHookFunc(sd, &mob_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.quest.update_objective(sd, mob_id);
+ }
+ if( HPMHooks.count.HP_quest_update_objective_post ) {
+ void (*postHookFunc) (TBL_PC *sd, int *mob_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_quest_update_objective_post[hIndex].func;
+ postHookFunc(sd, &mob_id);
+ }
+ }
+ return;
+}
+int HP_quest_update_status(TBL_PC *sd, int quest_id, quest_state qs) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_quest_update_status_pre ) {
+ int (*preHookFunc) (TBL_PC *sd, int *quest_id, 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ 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);
+ 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);
+ }
+ }
+ return retVal___;
+}
+int HP_quest_check(TBL_PC *sd, int quest_id, quest_check_type type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_quest_check_pre ) {
+ int (*preHookFunc) (TBL_PC *sd, int *quest_id, 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ 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);
+ 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);
+ }
+ }
+ return retVal___;
+}
+int HP_quest_read_db(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_quest_read_db_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_quest_read_db_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.quest.read_db();
+ }
+ if( HPMHooks.count.HP_quest_read_db_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_quest_read_db_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+/* script */
+void HP_script_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.init();
+ }
+ if( HPMHooks.count.HP_script_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_script_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.final();
+ }
+ if( HPMHooks.count.HP_script_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_script_reload(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_reload_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_reload_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.reload();
+ }
+ if( HPMHooks.count.HP_script_reload_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_reload_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+struct script_code* HP_script_parse(const char *src, const char *file, int line, int options) {
+ int hIndex = 0;
+ struct script_code* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_parse_pre ) {
+ struct script_code* (*preHookFunc) (const char *src, const char *file, int *line, int *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_parse_pre[hIndex].func;
+ retVal___ = preHookFunc(src, file, &line, &options);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.parse(src, file, line, options);
+ }
+ if( HPMHooks.count.HP_script_parse_post ) {
+ struct script_code* (*postHookFunc) (struct script_code* retVal___, const char *src, const char *file, int *line, int *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_parse_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, file, &line, &options);
+ }
+ }
+ return retVal___;
+}
+void HP_script_parse_builtin(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_parse_builtin_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_parse_builtin_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.parse_builtin();
+ }
+ if( HPMHooks.count.HP_script_parse_builtin_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_parse_builtin_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+const char* HP_script_parse_subexpr(const char *p, int limit) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_parse_subexpr_pre ) {
+ const char* (*preHookFunc) (const char *p, int *limit);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_subexpr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_parse_subexpr_pre[hIndex].func;
+ retVal___ = preHookFunc(p, &limit);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.parse_subexpr(p, limit);
+ }
+ if( HPMHooks.count.HP_script_parse_subexpr_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p, int *limit);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_subexpr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_parse_subexpr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, &limit);
+ }
+ }
+ return retVal___;
+}
+const char* HP_script_skip_space(const char *p) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_skip_space_pre ) {
+ const char* (*preHookFunc) (const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_space_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_skip_space_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.skip_space(p);
+ }
+ if( HPMHooks.count.HP_script_skip_space_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_space_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_skip_space_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+void HP_script_error(const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_error_pre ) {
+ void (*preHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_error_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_error_pre[hIndex].func;
+ preHookFunc(src, file, &start_line, error_msg, error_pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.error(src, file, start_line, error_msg, error_pos);
+ }
+ if( HPMHooks.count.HP_script_error_post ) {
+ void (*postHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_error_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_error_post[hIndex].func;
+ postHookFunc(src, file, &start_line, error_msg, error_pos);
+ }
+ }
+ return;
+}
+void HP_script_warning(const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_warning_pre ) {
+ void (*preHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_warning_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_warning_pre[hIndex].func;
+ preHookFunc(src, file, &start_line, error_msg, error_pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.warning(src, file, start_line, error_msg, error_pos);
+ }
+ if( HPMHooks.count.HP_script_warning_post ) {
+ void (*postHookFunc) (const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_warning_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_warning_post[hIndex].func;
+ postHookFunc(src, file, &start_line, error_msg, error_pos);
+ }
+ }
+ return;
+}
+bool HP_script_addScript(char *name, char *args, bool ( *func ) (struct script_state *st)) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_script_addScript_pre ) {
+ bool (*preHookFunc) (char *name, char *args, bool ( *func ) (struct script_state *st));
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addScript_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_addScript_pre[hIndex].func;
+ retVal___ = preHookFunc(name, args, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.addScript(name, args, func);
+ }
+ if( HPMHooks.count.HP_script_addScript_post ) {
+ bool (*postHookFunc) (bool retVal___, char *name, char *args, bool ( *func ) (struct script_state *st));
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addScript_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_addScript_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name, args, func);
+ }
+ }
+ return retVal___;
+}
+int HP_script_conv_num(struct script_state *st, struct script_data *data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_conv_num_pre ) {
+ int (*preHookFunc) (struct script_state *st, struct script_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_num_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_conv_num_pre[hIndex].func;
+ retVal___ = preHookFunc(st, data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.conv_num(st, data);
+ }
+ if( HPMHooks.count.HP_script_conv_num_post ) {
+ int (*postHookFunc) (int retVal___, struct script_state *st, struct script_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_num_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_conv_num_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, st, data);
+ }
+ }
+ return retVal___;
+}
+const char* HP_script_conv_str(struct script_state *st, struct script_data *data) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_conv_str_pre ) {
+ const char* (*preHookFunc) (struct script_state *st, struct script_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_str_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_conv_str_pre[hIndex].func;
+ retVal___ = preHookFunc(st, data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.conv_str(st, data);
+ }
+ if( HPMHooks.count.HP_script_conv_str_post ) {
+ const char* (*postHookFunc) (const char* retVal___, struct script_state *st, struct script_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_str_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_conv_str_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, st, data);
+ }
+ }
+ return retVal___;
+}
+TBL_PC* HP_script_rid2sd(struct script_state *st) {
+ int hIndex = 0;
+ TBL_PC* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_rid2sd_pre ) {
+ TBL_PC* (*preHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_rid2sd_pre[hIndex].func;
+ retVal___ = preHookFunc(st);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.rid2sd(st);
+ }
+ if( HPMHooks.count.HP_script_rid2sd_post ) {
+ TBL_PC* (*postHookFunc) (TBL_PC* retVal___, struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_rid2sd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, st);
+ }
+ }
+ return retVal___;
+}
+void HP_script_detach_rid(struct script_state *st) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_detach_rid_pre ) {
+ void (*preHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_detach_rid_pre[hIndex].func;
+ preHookFunc(st);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.detach_rid(st);
+ }
+ if( HPMHooks.count.HP_script_detach_rid_post ) {
+ void (*postHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_detach_rid_post[hIndex].func;
+ postHookFunc(st);
+ }
+ }
+ return;
+}
+struct script_data* HP_script_push_val(struct script_stack *stack, enum c_op type, int val, struct DBMap **ref) {
+ int hIndex = 0;
+ struct script_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_push_val_pre ) {
+ struct script_data* (*preHookFunc) (struct script_stack *stack, enum c_op *type, int *val, struct DBMap **ref);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_val_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_push_val_pre[hIndex].func;
+ retVal___ = preHookFunc(stack, &type, &val, ref);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.push_val(stack, type, val, ref);
+ }
+ if( HPMHooks.count.HP_script_push_val_post ) {
+ struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, enum c_op *type, int *val, struct DBMap **ref);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_val_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_push_val_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, stack, &type, &val, ref);
+ }
+ }
+ return retVal___;
+}
+void HP_script_get_val(struct script_state *st, struct script_data *data) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_get_val_pre ) {
+ void (*preHookFunc) (struct script_state *st, struct script_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_get_val_pre[hIndex].func;
+ preHookFunc(st, data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.get_val(st, data);
+ }
+ if( HPMHooks.count.HP_script_get_val_post ) {
+ void (*postHookFunc) (struct script_state *st, struct script_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_get_val_post[hIndex].func;
+ postHookFunc(st, data);
+ }
+ }
+ return;
+}
+void* HP_script_get_val2(struct script_state *st, int uid, struct DBMap **ref) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_get_val2_pre ) {
+ void* (*preHookFunc) (struct script_state *st, int *uid, struct DBMap **ref);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_get_val2_pre[hIndex].func;
+ retVal___ = preHookFunc(st, &uid, ref);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.get_val2(st, uid, ref);
+ }
+ if( HPMHooks.count.HP_script_get_val2_post ) {
+ void* (*postHookFunc) (void* retVal___, struct script_state *st, int *uid, struct DBMap **ref);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_get_val2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, st, &uid, ref);
+ }
+ }
+ return retVal___;
+}
+struct script_data* HP_script_push_str(struct script_stack *stack, enum c_op type, char *str) {
+ int hIndex = 0;
+ struct script_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_push_str_pre ) {
+ struct script_data* (*preHookFunc) (struct script_stack *stack, enum c_op *type, char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_str_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_push_str_pre[hIndex].func;
+ retVal___ = preHookFunc(stack, &type, str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.push_str(stack, type, str);
+ }
+ if( HPMHooks.count.HP_script_push_str_post ) {
+ struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, enum c_op *type, char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_str_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_push_str_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, stack, &type, str);
+ }
+ }
+ return retVal___;
+}
+struct script_data* HP_script_push_copy(struct script_stack *stack, int pos) {
+ int hIndex = 0;
+ struct script_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_push_copy_pre ) {
+ struct script_data* (*preHookFunc) (struct script_stack *stack, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_copy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_push_copy_pre[hIndex].func;
+ retVal___ = preHookFunc(stack, &pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.push_copy(stack, pos);
+ }
+ if( HPMHooks.count.HP_script_push_copy_post ) {
+ struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_copy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_push_copy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, stack, &pos);
+ }
+ }
+ return retVal___;
+}
+void HP_script_pop_stack(struct script_state *st, int start, int end) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_pop_stack_pre ) {
+ void (*preHookFunc) (struct script_state *st, int *start, int *end);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_stack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_pop_stack_pre[hIndex].func;
+ preHookFunc(st, &start, &end);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.pop_stack(st, start, end);
+ }
+ if( HPMHooks.count.HP_script_pop_stack_post ) {
+ void (*postHookFunc) (struct script_state *st, int *start, int *end);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_stack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_pop_stack_post[hIndex].func;
+ postHookFunc(st, &start, &end);
+ }
+ }
+ return;
+}
+void HP_script_set_constant(const char *name, int value, bool isparameter) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_set_constant_pre ) {
+ void (*preHookFunc) (const char *name, int *value, bool *isparameter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_set_constant_pre[hIndex].func;
+ preHookFunc(name, &value, &isparameter);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.set_constant(name, value, isparameter);
+ }
+ if( HPMHooks.count.HP_script_set_constant_post ) {
+ void (*postHookFunc) (const char *name, int *value, bool *isparameter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_set_constant_post[hIndex].func;
+ postHookFunc(name, &value, &isparameter);
+ }
+ }
+ return;
+}
+void HP_script_set_constant2(const char *name, int value, bool isparameter) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_set_constant2_pre ) {
+ void (*preHookFunc) (const char *name, int *value, bool *isparameter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_set_constant2_pre[hIndex].func;
+ preHookFunc(name, &value, &isparameter);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.set_constant2(name, value, isparameter);
+ }
+ if( HPMHooks.count.HP_script_set_constant2_post ) {
+ void (*postHookFunc) (const char *name, int *value, bool *isparameter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_set_constant2_post[hIndex].func;
+ postHookFunc(name, &value, &isparameter);
+ }
+ }
+ return;
+}
+void HP_script_set_constant_force(const char *name, int value, bool isparameter) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_set_constant_force_pre ) {
+ void (*preHookFunc) (const char *name, int *value, bool *isparameter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_force_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_set_constant_force_pre[hIndex].func;
+ preHookFunc(name, &value, &isparameter);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.set_constant_force(name, value, isparameter);
+ }
+ if( HPMHooks.count.HP_script_set_constant_force_post ) {
+ void (*postHookFunc) (const char *name, int *value, bool *isparameter);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_force_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_set_constant_force_post[hIndex].func;
+ postHookFunc(name, &value, &isparameter);
+ }
+ }
+ return;
+}
+bool HP_script_get_constant(const char *name, int *value) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_script_get_constant_pre ) {
+ bool (*preHookFunc) (const char *name, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_constant_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_get_constant_pre[hIndex].func;
+ retVal___ = preHookFunc(name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.get_constant(name, value);
+ }
+ if( HPMHooks.count.HP_script_get_constant_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *name, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_constant_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_get_constant_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name, value);
+ }
+ }
+ return retVal___;
+}
+void HP_script_label_add(int key, int pos) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_label_add_pre ) {
+ void (*preHookFunc) (int *key, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_label_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_label_add_pre[hIndex].func;
+ preHookFunc(&key, &pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.label_add(key, pos);
+ }
+ if( HPMHooks.count.HP_script_label_add_post ) {
+ void (*postHookFunc) (int *key, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_label_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_label_add_post[hIndex].func;
+ postHookFunc(&key, &pos);
+ }
+ }
+ return;
+}
+void HP_script_run(struct script_code *rootscript, int pos, int rid, int oid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_run_pre ) {
+ void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_pre[hIndex].func;
+ preHookFunc(rootscript, &pos, &rid, &oid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run(rootscript, pos, rid, oid);
+ }
+ if( HPMHooks.count.HP_script_run_post ) {
+ void (*postHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_post[hIndex].func;
+ postHookFunc(rootscript, &pos, &rid, &oid);
+ }
+ }
+ return;
+}
+void HP_script_run_main(struct script_state *st) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_run_main_pre ) {
+ void (*preHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_main_pre[hIndex].func;
+ preHookFunc(st);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run_main(st);
+ }
+ if( HPMHooks.count.HP_script_run_main_post ) {
+ void (*postHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_main_post[hIndex].func;
+ postHookFunc(st);
+ }
+ }
+ return;
+}
+int HP_script_run_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_run_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.run_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_script_run_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_script_set_var(struct map_session_data *sd, char *name, void *val) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_set_var_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, char *name, void *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_var_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_set_var_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, name, val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.set_var(sd, name, val);
+ }
+ if( HPMHooks.count.HP_script_set_var_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, char *name, void *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_var_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_set_var_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, name, val);
+ }
+ }
+ return retVal___;
+}
+void HP_script_stop_instances(struct script_code *code) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_stop_instances_pre ) {
+ void (*preHookFunc) (struct script_code *code);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_stop_instances_pre[hIndex].func;
+ preHookFunc(code);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.stop_instances(code);
+ }
+ if( HPMHooks.count.HP_script_stop_instances_post ) {
+ void (*postHookFunc) (struct script_code *code);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_stop_instances_post[hIndex].func;
+ postHookFunc(code);
+ }
+ }
+ return;
+}
+void HP_script_free_code(struct script_code *code) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_free_code_pre ) {
+ void (*preHookFunc) (struct script_code *code);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_free_code_pre[hIndex].func;
+ preHookFunc(code);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.free_code(code);
+ }
+ if( HPMHooks.count.HP_script_free_code_post ) {
+ void (*postHookFunc) (struct script_code *code);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_free_code_post[hIndex].func;
+ postHookFunc(code);
+ }
+ }
+ return;
+}
+void HP_script_free_vars(struct DBMap *var_storage) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_free_vars_pre ) {
+ void (*preHookFunc) (struct DBMap *var_storage);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_vars_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_free_vars_pre[hIndex].func;
+ preHookFunc(var_storage);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.free_vars(var_storage);
+ }
+ if( HPMHooks.count.HP_script_free_vars_post ) {
+ void (*postHookFunc) (struct DBMap *var_storage);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_vars_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_free_vars_post[hIndex].func;
+ postHookFunc(var_storage);
+ }
+ }
+ return;
+}
+struct script_state* HP_script_alloc_state(struct script_code *rootscript, int pos, int rid, int oid) {
+ int hIndex = 0;
+ struct script_state* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_alloc_state_pre ) {
+ struct script_state* (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_alloc_state_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_alloc_state_pre[hIndex].func;
+ retVal___ = preHookFunc(rootscript, &pos, &rid, &oid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.alloc_state(rootscript, pos, rid, oid);
+ }
+ if( HPMHooks.count.HP_script_alloc_state_post ) {
+ struct script_state* (*postHookFunc) (struct script_state* retVal___, struct script_code *rootscript, int *pos, int *rid, int *oid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_alloc_state_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_alloc_state_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, rootscript, &pos, &rid, &oid);
+ }
+ }
+ return retVal___;
+}
+void HP_script_free_state(struct script_state *st) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_free_state_pre ) {
+ void (*preHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_free_state_pre[hIndex].func;
+ preHookFunc(st);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.free_state(st);
+ }
+ if( HPMHooks.count.HP_script_free_state_post ) {
+ void (*postHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_free_state_post[hIndex].func;
+ postHookFunc(st);
+ }
+ }
+ return;
+}
+void HP_script_run_autobonus(const char *autobonus, int id, int pos) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_run_autobonus_pre ) {
+ void (*preHookFunc) (const char *autobonus, int *id, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_autobonus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_autobonus_pre[hIndex].func;
+ preHookFunc(autobonus, &id, &pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run_autobonus(autobonus, id, pos);
+ }
+ if( HPMHooks.count.HP_script_run_autobonus_post ) {
+ void (*postHookFunc) (const char *autobonus, int *id, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_autobonus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_autobonus_post[hIndex].func;
+ postHookFunc(autobonus, &id, &pos);
+ }
+ }
+ return;
+}
+void HP_script_cleararray_pc(struct map_session_data *sd, const char *varname, void *value) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_cleararray_pc_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *varname, void *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleararray_pc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_cleararray_pc_pre[hIndex].func;
+ preHookFunc(sd, varname, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.cleararray_pc(sd, varname, value);
+ }
+ if( HPMHooks.count.HP_script_cleararray_pc_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *varname, void *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleararray_pc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_cleararray_pc_post[hIndex].func;
+ postHookFunc(sd, varname, value);
+ }
+ }
+ return;
+}
+void HP_script_setarray_pc(struct map_session_data *sd, const char *varname, uint8 idx, void *value, int *refcache) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_setarray_pc_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *varname, uint8 *idx, void *value, int *refcache);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setarray_pc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_setarray_pc_pre[hIndex].func;
+ preHookFunc(sd, varname, &idx, value, refcache);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.setarray_pc(sd, varname, idx, value, refcache);
+ }
+ if( HPMHooks.count.HP_script_setarray_pc_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *varname, uint8 *idx, void *value, int *refcache);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setarray_pc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_setarray_pc_post[hIndex].func;
+ postHookFunc(sd, varname, &idx, value, refcache);
+ }
+ }
+ return;
+}
+int HP_script_config_read(char *cfgName) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_config_read_pre ) {
+ int (*preHookFunc) (char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_config_read_pre[hIndex].func;
+ retVal___ = preHookFunc(cfgName);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.config_read(cfgName);
+ }
+ if( HPMHooks.count.HP_script_config_read_post ) {
+ int (*postHookFunc) (int retVal___, char *cfgName);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_config_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, cfgName);
+ }
+ }
+ return retVal___;
+}
+int HP_script_add_str(const char *p) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_add_str_pre ) {
+ int (*preHookFunc) (const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_str_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_add_str_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.add_str(p);
+ }
+ if( HPMHooks.count.HP_script_add_str_post ) {
+ int (*postHookFunc) (int retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_str_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_add_str_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+const char* HP_script_get_str(int id) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_get_str_pre ) {
+ const char* (*preHookFunc) (int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_str_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_get_str_pre[hIndex].func;
+ retVal___ = preHookFunc(&id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.get_str(id);
+ }
+ if( HPMHooks.count.HP_script_get_str_post ) {
+ const char* (*postHookFunc) (const char* retVal___, int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_str_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_get_str_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id);
+ }
+ }
+ return retVal___;
+}
+int HP_script_search_str(const char *p) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_search_str_pre ) {
+ int (*preHookFunc) (const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_search_str_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_search_str_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.search_str(p);
+ }
+ if( HPMHooks.count.HP_script_search_str_post ) {
+ int (*postHookFunc) (int retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_search_str_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_search_str_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+void HP_script_setd_sub(struct script_state *st, struct map_session_data *sd, const char *varname, int elem, void *value, struct DBMap **ref) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_setd_sub_pre ) {
+ void (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *varname, int *elem, void *value, struct DBMap **ref);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setd_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_setd_sub_pre[hIndex].func;
+ preHookFunc(st, sd, varname, &elem, value, ref);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.setd_sub(st, sd, varname, elem, value, ref);
+ }
+ if( HPMHooks.count.HP_script_setd_sub_post ) {
+ void (*postHookFunc) (struct script_state *st, struct map_session_data *sd, const char *varname, int *elem, void *value, struct DBMap **ref);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setd_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_setd_sub_post[hIndex].func;
+ postHookFunc(st, sd, varname, &elem, value, ref);
+ }
+ }
+ return;
+}
+void HP_script_attach_state(struct script_state *st) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_attach_state_pre ) {
+ void (*preHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_attach_state_pre[hIndex].func;
+ preHookFunc(st);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.attach_state(st);
+ }
+ if( HPMHooks.count.HP_script_attach_state_post ) {
+ void (*postHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_attach_state_post[hIndex].func;
+ postHookFunc(st);
+ }
+ }
+ return;
+}
+struct hQueue* HP_script_queue(int idx) {
+ int hIndex = 0;
+ struct hQueue* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_queue_pre ) {
+ struct hQueue* (*preHookFunc) (int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_queue_pre[hIndex].func;
+ retVal___ = preHookFunc(&idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.queue(idx);
+ }
+ if( HPMHooks.count.HP_script_queue_post ) {
+ struct hQueue* (*postHookFunc) (struct hQueue* retVal___, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_queue_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &idx);
+ }
+ }
+ return retVal___;
+}
+bool HP_script_queue_add(int idx, int var) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_script_queue_add_pre ) {
+ bool (*preHookFunc) (int *idx, int *var);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_queue_add_pre[hIndex].func;
+ retVal___ = preHookFunc(&idx, &var);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.queue_add(idx, var);
+ }
+ if( HPMHooks.count.HP_script_queue_add_post ) {
+ bool (*postHookFunc) (bool retVal___, int *idx, int *var);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_queue_add_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &idx, &var);
+ }
+ }
+ return retVal___;
+}
+bool HP_script_queue_del(int idx) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_script_queue_del_pre ) {
+ bool (*preHookFunc) (int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_del_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_queue_del_pre[hIndex].func;
+ retVal___ = preHookFunc(&idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.queue_del(idx);
+ }
+ if( HPMHooks.count.HP_script_queue_del_post ) {
+ bool (*postHookFunc) (bool retVal___, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_del_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_queue_del_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &idx);
+ }
+ }
+ return retVal___;
+}
+bool HP_script_queue_remove(int idx, int var) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_script_queue_remove_pre ) {
+ bool (*preHookFunc) (int *idx, int *var);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_remove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_queue_remove_pre[hIndex].func;
+ retVal___ = preHookFunc(&idx, &var);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.queue_remove(idx, var);
+ }
+ if( HPMHooks.count.HP_script_queue_remove_post ) {
+ bool (*postHookFunc) (bool retVal___, int *idx, int *var);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_remove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_queue_remove_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &idx, &var);
+ }
+ }
+ return retVal___;
+}
+int HP_script_queue_create(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_queue_create_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_queue_create_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.queue_create();
+ }
+ if( HPMHooks.count.HP_script_queue_create_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_queue_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_script_queue_clear(int idx) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_queue_clear_pre ) {
+ void (*preHookFunc) (int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_queue_clear_pre[hIndex].func;
+ preHookFunc(&idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.queue_clear(idx);
+ }
+ if( HPMHooks.count.HP_script_queue_clear_post ) {
+ void (*postHookFunc) (int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_queue_clear_post[hIndex].func;
+ postHookFunc(&idx);
+ }
+ }
+ return;
+}
+const char* HP_script_parse_curly_close(const char *p) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_parse_curly_close_pre ) {
+ const char* (*preHookFunc) (const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_curly_close_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_parse_curly_close_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.parse_curly_close(p);
+ }
+ if( HPMHooks.count.HP_script_parse_curly_close_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_curly_close_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_parse_curly_close_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+const char* HP_script_parse_syntax_close(const char *p) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_parse_syntax_close_pre ) {
+ const char* (*preHookFunc) (const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_parse_syntax_close_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.parse_syntax_close(p);
+ }
+ if( HPMHooks.count.HP_script_parse_syntax_close_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_parse_syntax_close_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+const char* HP_script_parse_syntax_close_sub(const char *p, int *flag) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_parse_syntax_close_sub_pre ) {
+ const char* (*preHookFunc) (const char *p, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_parse_syntax_close_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(p, flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.parse_syntax_close_sub(p, flag);
+ }
+ if( HPMHooks.count.HP_script_parse_syntax_close_sub_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_parse_syntax_close_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, flag);
+ }
+ }
+ return retVal___;
+}
+const char* HP_script_parse_syntax(const char *p) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_parse_syntax_pre ) {
+ const char* (*preHookFunc) (const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_parse_syntax_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.parse_syntax(p);
+ }
+ if( HPMHooks.count.HP_script_parse_syntax_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_parse_syntax_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+c_op HP_script_get_com(unsigned char *scriptbuf, int *pos) {
+ int hIndex = 0;
+ c_op retVal___;
+ memset(&retVal___, '\0', sizeof(c_op));
+ if( HPMHooks.count.HP_script_get_com_pre ) {
+ c_op (*preHookFunc) (unsigned char *scriptbuf, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_com_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_get_com_pre[hIndex].func;
+ retVal___ = preHookFunc(scriptbuf, pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.get_com(scriptbuf, pos);
+ }
+ if( HPMHooks.count.HP_script_get_com_post ) {
+ c_op (*postHookFunc) (c_op retVal___, unsigned char *scriptbuf, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_com_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_get_com_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, scriptbuf, pos);
+ }
+ }
+ return retVal___;
+}
+int HP_script_get_num(unsigned char *scriptbuf, int *pos) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_get_num_pre ) {
+ int (*preHookFunc) (unsigned char *scriptbuf, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_num_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_get_num_pre[hIndex].func;
+ retVal___ = preHookFunc(scriptbuf, pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.get_num(scriptbuf, pos);
+ }
+ if( HPMHooks.count.HP_script_get_num_post ) {
+ int (*postHookFunc) (int retVal___, unsigned char *scriptbuf, int *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_num_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_get_num_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, scriptbuf, pos);
+ }
+ }
+ return retVal___;
+}
+const char* HP_script_op2name(int op) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_op2name_pre ) {
+ const char* (*preHookFunc) (int *op);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op2name_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_op2name_pre[hIndex].func;
+ retVal___ = preHookFunc(&op);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.op2name(op);
+ }
+ if( HPMHooks.count.HP_script_op2name_post ) {
+ const char* (*postHookFunc) (const char* retVal___, int *op);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op2name_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_op2name_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &op);
+ }
+ }
+ return retVal___;
+}
+void HP_script_reportsrc(struct script_state *st) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_reportsrc_pre ) {
+ void (*preHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_reportsrc_pre[hIndex].func;
+ preHookFunc(st);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.reportsrc(st);
+ }
+ if( HPMHooks.count.HP_script_reportsrc_post ) {
+ void (*postHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_reportsrc_post[hIndex].func;
+ postHookFunc(st);
+ }
+ }
+ return;
+}
+void HP_script_reportdata(struct script_data *data) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_reportdata_pre ) {
+ void (*preHookFunc) (struct script_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_reportdata_pre[hIndex].func;
+ preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.reportdata(data);
+ }
+ if( HPMHooks.count.HP_script_reportdata_post ) {
+ void (*postHookFunc) (struct script_data *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_reportdata_post[hIndex].func;
+ postHookFunc(data);
+ }
+ }
+ return;
+}
+void HP_script_reportfunc(struct script_state *st) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_reportfunc_pre ) {
+ void (*preHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_reportfunc_pre[hIndex].func;
+ preHookFunc(st);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.reportfunc(st);
+ }
+ if( HPMHooks.count.HP_script_reportfunc_post ) {
+ void (*postHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_reportfunc_post[hIndex].func;
+ postHookFunc(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 ) {
+ void (*preHookFunc) (const char *mes, const char *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_warning_message_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_disp_warning_message_pre[hIndex].func;
+ preHookFunc(mes, pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.disp_warning_message(mes, pos);
+ }
+ if( HPMHooks.count.HP_script_disp_warning_message_post ) {
+ void (*postHookFunc) (const char *mes, const char *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_warning_message_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_disp_warning_message_post[hIndex].func;
+ postHookFunc(mes, pos);
+ }
+ }
+ return;
+}
+void HP_script_check_event(struct script_state *st, const char *evt) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_check_event_pre ) {
+ void (*preHookFunc) (struct script_state *st, const char *evt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_event_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_check_event_pre[hIndex].func;
+ preHookFunc(st, evt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.check_event(st, evt);
+ }
+ if( HPMHooks.count.HP_script_check_event_post ) {
+ void (*postHookFunc) (struct script_state *st, const char *evt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_event_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_check_event_post[hIndex].func;
+ postHookFunc(st, evt);
+ }
+ }
+ return;
+}
+unsigned int HP_script_calc_hash(const char *p) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_script_calc_hash_pre ) {
+ unsigned int (*preHookFunc) (const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_calc_hash_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.calc_hash(p);
+ }
+ if( HPMHooks.count.HP_script_calc_hash_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_calc_hash_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+void HP_script_addb(int a) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_addb_pre ) {
+ void (*preHookFunc) (int *a);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_addb_pre[hIndex].func;
+ preHookFunc(&a);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.addb(a);
+ }
+ if( HPMHooks.count.HP_script_addb_post ) {
+ void (*postHookFunc) (int *a);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_addb_post[hIndex].func;
+ postHookFunc(&a);
+ }
+ }
+ return;
+}
+void HP_script_addc(int a) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_addc_pre ) {
+ void (*preHookFunc) (int *a);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_addc_pre[hIndex].func;
+ preHookFunc(&a);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.addc(a);
+ }
+ if( HPMHooks.count.HP_script_addc_post ) {
+ void (*postHookFunc) (int *a);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_addc_post[hIndex].func;
+ postHookFunc(&a);
+ }
+ }
+ return;
+}
+void HP_script_addi(int a) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_addi_pre ) {
+ void (*preHookFunc) (int *a);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addi_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_addi_pre[hIndex].func;
+ preHookFunc(&a);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.addi(a);
+ }
+ if( HPMHooks.count.HP_script_addi_post ) {
+ void (*postHookFunc) (int *a);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addi_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_addi_post[hIndex].func;
+ postHookFunc(&a);
+ }
+ }
+ return;
+}
+void HP_script_addl(int l) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_addl_pre ) {
+ void (*preHookFunc) (int *l);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addl_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_addl_pre[hIndex].func;
+ preHookFunc(&l);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.addl(l);
+ }
+ if( HPMHooks.count.HP_script_addl_post ) {
+ void (*postHookFunc) (int *l);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addl_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_addl_post[hIndex].func;
+ postHookFunc(&l);
+ }
+ }
+ return;
+}
+void HP_script_set_label(int l, int pos, const char *script_pos) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_set_label_pre ) {
+ void (*preHookFunc) (int *l, int *pos, const char *script_pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_label_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_set_label_pre[hIndex].func;
+ preHookFunc(&l, &pos, script_pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.set_label(l, pos, script_pos);
+ }
+ if( HPMHooks.count.HP_script_set_label_post ) {
+ void (*postHookFunc) (int *l, int *pos, const char *script_pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_label_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_set_label_post[hIndex].func;
+ postHookFunc(&l, &pos, script_pos);
+ }
+ }
+ return;
+}
+const char* HP_script_skip_word(const char *p) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_skip_word_pre ) {
+ const char* (*preHookFunc) (const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_word_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_skip_word_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.skip_word(p);
+ }
+ if( HPMHooks.count.HP_script_skip_word_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_word_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_skip_word_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+int HP_script_add_word(const char *p) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_add_word_pre ) {
+ int (*preHookFunc) (const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_word_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_add_word_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.add_word(p);
+ }
+ if( HPMHooks.count.HP_script_add_word_post ) {
+ int (*postHookFunc) (int retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_word_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_add_word_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+const char* HP_script_parse_callfunc(const char *p, int require_paren, int is_custom) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_parse_callfunc_pre ) {
+ const char* (*preHookFunc) (const char *p, int *require_paren, int *is_custom);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_callfunc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_parse_callfunc_pre[hIndex].func;
+ retVal___ = preHookFunc(p, &require_paren, &is_custom);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.parse_callfunc(p, require_paren, is_custom);
+ }
+ if( HPMHooks.count.HP_script_parse_callfunc_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p, int *require_paren, int *is_custom);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_callfunc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_parse_callfunc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, &require_paren, &is_custom);
+ }
+ }
+ return retVal___;
+}
+void HP_script_parse_nextline(bool first, const char *p) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_parse_nextline_pre ) {
+ void (*preHookFunc) (bool *first, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_nextline_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_parse_nextline_pre[hIndex].func;
+ preHookFunc(&first, p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.parse_nextline(first, p);
+ }
+ if( HPMHooks.count.HP_script_parse_nextline_post ) {
+ void (*postHookFunc) (bool *first, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_nextline_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_parse_nextline_post[hIndex].func;
+ postHookFunc(&first, p);
+ }
+ }
+ return;
+}
+const char* HP_script_parse_variable(const char *p) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_parse_variable_pre ) {
+ const char* (*preHookFunc) (const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_variable_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_parse_variable_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.parse_variable(p);
+ }
+ if( HPMHooks.count.HP_script_parse_variable_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_variable_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_parse_variable_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+const char* HP_script_parse_simpleexpr(const char *p) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_parse_simpleexpr_pre ) {
+ const char* (*preHookFunc) (const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.parse_simpleexpr(p);
+ }
+ if( HPMHooks.count.HP_script_parse_simpleexpr_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+const char* HP_script_parse_expr(const char *p) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_parse_expr_pre ) {
+ const char* (*preHookFunc) (const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_expr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_parse_expr_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.parse_expr(p);
+ }
+ if( HPMHooks.count.HP_script_parse_expr_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_expr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_parse_expr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+const char* HP_script_parse_line(const char *p) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_parse_line_pre ) {
+ const char* (*preHookFunc) (const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_line_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_parse_line_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.parse_line(p);
+ }
+ if( HPMHooks.count.HP_script_parse_line_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_line_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_parse_line_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+void HP_script_read_constdb(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_read_constdb_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_read_constdb_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.read_constdb();
+ }
+ if( HPMHooks.count.HP_script_read_constdb_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_read_constdb_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+const char* HP_script_print_line(StringBuf *buf, const char *p, const char *mark, int line) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_print_line_pre ) {
+ const char* (*preHookFunc) (StringBuf *buf, const char *p, const char *mark, int *line);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_print_line_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_print_line_pre[hIndex].func;
+ retVal___ = preHookFunc(buf, p, mark, &line);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.print_line(buf, p, mark, line);
+ }
+ if( HPMHooks.count.HP_script_print_line_post ) {
+ const char* (*postHookFunc) (const char* retVal___, StringBuf *buf, const char *p, const char *mark, int *line);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_print_line_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_print_line_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, buf, p, mark, &line);
+ }
+ }
+ return retVal___;
+}
+void HP_script_errorwarning_sub(StringBuf *buf, const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_errorwarning_sub_pre ) {
+ void (*preHookFunc) (StringBuf *buf, const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_errorwarning_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_errorwarning_sub_pre[hIndex].func;
+ preHookFunc(buf, src, file, &start_line, error_msg, error_pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.errorwarning_sub(buf, src, file, start_line, error_msg, error_pos);
+ }
+ if( HPMHooks.count.HP_script_errorwarning_sub_post ) {
+ void (*postHookFunc) (StringBuf *buf, const char *src, const char *file, int *start_line, const char *error_msg, const char *error_pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_errorwarning_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_errorwarning_sub_post[hIndex].func;
+ postHookFunc(buf, src, file, &start_line, error_msg, error_pos);
+ }
+ }
+ return;
+}
+int HP_script_set_reg(struct script_state *st, TBL_PC *sd, int num, const char *name, const void *value, struct DBMap **ref) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_set_reg_pre ) {
+ int (*preHookFunc) (struct script_state *st, TBL_PC *sd, int *num, const char *name, const void *value, struct DBMap **ref);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_set_reg_pre[hIndex].func;
+ retVal___ = preHookFunc(st, sd, &num, name, value, ref);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.set_reg(st, sd, num, name, value, ref);
+ }
+ if( HPMHooks.count.HP_script_set_reg_post ) {
+ int (*postHookFunc) (int retVal___, struct script_state *st, TBL_PC *sd, int *num, const char *name, const void *value, struct DBMap **ref);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_set_reg_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, st, sd, &num, name, value, ref);
+ }
+ }
+ return retVal___;
+}
+void HP_script_stack_expand(struct script_stack *stack) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_stack_expand_pre ) {
+ void (*preHookFunc) (struct script_stack *stack);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_stack_expand_pre[hIndex].func;
+ preHookFunc(stack);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.stack_expand(stack);
+ }
+ if( HPMHooks.count.HP_script_stack_expand_post ) {
+ void (*postHookFunc) (struct script_stack *stack);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_stack_expand_post[hIndex].func;
+ postHookFunc(stack);
+ }
+ }
+ return;
+}
+struct script_data* HP_script_push_retinfo(struct script_stack *stack, struct script_retinfo *ri, DBMap **ref) {
+ int hIndex = 0;
+ struct script_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_script_push_retinfo_pre ) {
+ struct script_data* (*preHookFunc) (struct script_stack *stack, struct script_retinfo *ri, DBMap **ref);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_retinfo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_push_retinfo_pre[hIndex].func;
+ retVal___ = preHookFunc(stack, ri, ref);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.push_retinfo(stack, ri, ref);
+ }
+ if( HPMHooks.count.HP_script_push_retinfo_post ) {
+ struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, struct script_retinfo *ri, DBMap **ref);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_retinfo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_push_retinfo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, stack, ri, ref);
+ }
+ }
+ return retVal___;
+}
+int HP_script_pop_val(struct script_state *st) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_pop_val_pre ) {
+ int (*preHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_val_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_pop_val_pre[hIndex].func;
+ retVal___ = preHookFunc(st);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.pop_val(st);
+ }
+ if( HPMHooks.count.HP_script_pop_val_post ) {
+ int (*postHookFunc) (int retVal___, struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_val_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_pop_val_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, st);
+ }
+ }
+ return retVal___;
+}
+void HP_script_op_3(struct script_state *st, int op) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_op_3_pre ) {
+ void (*preHookFunc) (struct script_state *st, int *op);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_3_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_op_3_pre[hIndex].func;
+ preHookFunc(st, &op);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.op_3(st, op);
+ }
+ if( HPMHooks.count.HP_script_op_3_post ) {
+ void (*postHookFunc) (struct script_state *st, int *op);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_3_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_op_3_post[hIndex].func;
+ postHookFunc(st, &op);
+ }
+ }
+ return;
+}
+void HP_script_op_2str(struct script_state *st, int op, const char *s1, const char *s2) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_op_2str_pre ) {
+ void (*preHookFunc) (struct script_state *st, int *op, const char *s1, const char *s2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2str_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_op_2str_pre[hIndex].func;
+ preHookFunc(st, &op, s1, s2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.op_2str(st, op, s1, s2);
+ }
+ if( HPMHooks.count.HP_script_op_2str_post ) {
+ void (*postHookFunc) (struct script_state *st, int *op, const char *s1, const char *s2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2str_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_op_2str_post[hIndex].func;
+ postHookFunc(st, &op, s1, s2);
+ }
+ }
+ return;
+}
+void HP_script_op_2num(struct script_state *st, int op, int i1, int i2) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_op_2num_pre ) {
+ void (*preHookFunc) (struct script_state *st, int *op, int *i1, int *i2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2num_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_op_2num_pre[hIndex].func;
+ preHookFunc(st, &op, &i1, &i2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.op_2num(st, op, i1, i2);
+ }
+ if( HPMHooks.count.HP_script_op_2num_post ) {
+ void (*postHookFunc) (struct script_state *st, int *op, int *i1, int *i2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2num_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_op_2num_post[hIndex].func;
+ postHookFunc(st, &op, &i1, &i2);
+ }
+ }
+ return;
+}
+void HP_script_op_2(struct script_state *st, int op) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_op_2_pre ) {
+ void (*preHookFunc) (struct script_state *st, int *op);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_op_2_pre[hIndex].func;
+ preHookFunc(st, &op);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.op_2(st, op);
+ }
+ if( HPMHooks.count.HP_script_op_2_post ) {
+ void (*postHookFunc) (struct script_state *st, int *op);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_op_2_post[hIndex].func;
+ postHookFunc(st, &op);
+ }
+ }
+ return;
+}
+void HP_script_op_1(struct script_state *st, int op) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_op_1_pre ) {
+ void (*preHookFunc) (struct script_state *st, int *op);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_1_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_op_1_pre[hIndex].func;
+ preHookFunc(st, &op);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.op_1(st, op);
+ }
+ if( HPMHooks.count.HP_script_op_1_post ) {
+ void (*postHookFunc) (struct script_state *st, int *op);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_1_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_op_1_post[hIndex].func;
+ postHookFunc(st, &op);
+ }
+ }
+ return;
+}
+void HP_script_check_buildin_argtype(struct script_state *st, int func) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_check_buildin_argtype_pre ) {
+ void (*preHookFunc) (struct script_state *st, int *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_check_buildin_argtype_pre[hIndex].func;
+ preHookFunc(st, &func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.check_buildin_argtype(st, func);
+ }
+ if( HPMHooks.count.HP_script_check_buildin_argtype_post ) {
+ void (*postHookFunc) (struct script_state *st, int *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_check_buildin_argtype_post[hIndex].func;
+ postHookFunc(st, &func);
+ }
+ }
+ return;
+}
+void HP_script_detach_state(struct script_state *st, bool dequeue_event) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_detach_state_pre ) {
+ void (*preHookFunc) (struct script_state *st, bool *dequeue_event);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_state_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_detach_state_pre[hIndex].func;
+ preHookFunc(st, &dequeue_event);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.detach_state(st, dequeue_event);
+ }
+ if( HPMHooks.count.HP_script_detach_state_post ) {
+ void (*postHookFunc) (struct script_state *st, bool *dequeue_event);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_state_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_detach_state_post[hIndex].func;
+ postHookFunc(st, &dequeue_event);
+ }
+ }
+ return;
+}
+int HP_script_db_free_code_sub(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_db_free_code_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_db_free_code_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_db_free_code_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.db_free_code_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_db_free_code_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_db_free_code_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_db_free_code_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_script_add_autobonus(const char *autobonus) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_add_autobonus_pre ) {
+ void (*preHookFunc) (const char *autobonus);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_add_autobonus_pre[hIndex].func;
+ preHookFunc(autobonus);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.add_autobonus(autobonus);
+ }
+ if( HPMHooks.count.HP_script_add_autobonus_post ) {
+ void (*postHookFunc) (const char *autobonus);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_add_autobonus_post[hIndex].func;
+ postHookFunc(autobonus);
+ }
+ }
+ return;
+}
+int HP_script_menu_countoptions(const char *str, int max_count, int *total) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_menu_countoptions_pre ) {
+ int (*preHookFunc) (const char *str, int *max_count, int *total);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_menu_countoptions_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_menu_countoptions_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &max_count, total);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.menu_countoptions(str, max_count, total);
+ }
+ if( HPMHooks.count.HP_script_menu_countoptions_post ) {
+ int (*postHookFunc) (int retVal___, const char *str, int *max_count, int *total);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_menu_countoptions_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_menu_countoptions_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &max_count, total);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_areawarp_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_areawarp_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areawarp_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_areawarp_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_areawarp_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_areawarp_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areawarp_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_areawarp_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_areapercentheal_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_areapercentheal_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_areapercentheal_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_areapercentheal_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areapercentheal_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_areapercentheal_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int32 HP_script_getarraysize(struct script_state *st, int32 id, int32 idx, int isstring, struct DBMap **ref) {
+ int hIndex = 0;
+ int32 retVal___;
+ memset(&retVal___, '\0', sizeof(int32));
+ if( HPMHooks.count.HP_script_getarraysize_pre ) {
+ int32 (*preHookFunc) (struct script_state *st, int32 *id, int32 *idx, int *isstring, struct DBMap **ref);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getarraysize_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_getarraysize_pre[hIndex].func;
+ retVal___ = preHookFunc(st, &id, &idx, &isstring, ref);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.getarraysize(st, id, idx, isstring, ref);
+ }
+ if( HPMHooks.count.HP_script_getarraysize_post ) {
+ int32 (*postHookFunc) (int32 retVal___, struct script_state *st, int32 *id, int32 *idx, int *isstring, struct DBMap **ref);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getarraysize_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_getarraysize_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, st, &id, &idx, &isstring, ref);
+ }
+ }
+ return retVal___;
+}
+void HP_script_buildin_delitem_delete(struct map_session_data *sd, int idx, int *amount, bool delete_items) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_buildin_delitem_delete_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount, bool *delete_items);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_buildin_delitem_delete_pre[hIndex].func;
+ preHookFunc(sd, &idx, amount, &delete_items);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.buildin_delitem_delete(sd, idx, amount, delete_items);
+ }
+ if( HPMHooks.count.HP_script_buildin_delitem_delete_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *idx, int *amount, bool *delete_items);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_buildin_delitem_delete_post[hIndex].func;
+ postHookFunc(sd, &idx, amount, &delete_items);
+ }
+ }
+ return;
+}
+bool HP_script_buildin_delitem_search(struct map_session_data *sd, struct item *it, bool exact_match) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_script_buildin_delitem_search_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, struct item *it, bool *exact_match);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_buildin_delitem_search_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, it, &exact_match);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.buildin_delitem_search(sd, it, exact_match);
+ }
+ if( HPMHooks.count.HP_script_buildin_delitem_search_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct item *it, bool *exact_match);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_buildin_delitem_search_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, it, &exact_match);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_killmonster_sub_strip(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_strip_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_killmonster_sub_strip(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_killmonster_sub_strip_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_strip_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_strip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_killmonster_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_killmonster_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_killmonster_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_killmonster_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_killmonster_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_killmonsterall_sub_strip(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_strip_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_killmonsterall_sub_strip(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_strip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_killmonsterall_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_killmonsterall_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_killmonsterall_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_announce_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_announce_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_announce_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_announce_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_announce_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_announce_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_announce_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_announce_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_getareausers_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_getareausers_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareausers_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_getareausers_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_getareausers_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_getareausers_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareausers_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_getareausers_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_getareadropitem_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_getareadropitem_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_getareadropitem_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_getareadropitem_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareadropitem_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_getareadropitem_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_mapflag_pvp_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_mapflag_pvp_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapflag_pvp_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_mapflag_pvp_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.mapflag_pvp_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_mapflag_pvp_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapflag_pvp_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_mapflag_pvp_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_pvpoff_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_pvpoff_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_pvpoff_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_pvpoff_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_pvpoff_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_pvpoff_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_pvpoff_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_pvpoff_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_maprespawnguildid_sub_pc(struct map_session_data *sd, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_pc_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_maprespawnguildid_sub_pc(sd, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_pc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_maprespawnguildid_sub_mob(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_mob_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_maprespawnguildid_sub_mob(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_maprespawnguildid_sub_mob_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_mobcount_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_mobcount_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobcount_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_mobcount_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_mobcount_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_mobcount_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobcount_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_mobcount_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_playBGM_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_playBGM_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playBGM_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_playBGM_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.playBGM_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_playBGM_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playBGM_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_playBGM_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_playBGM_foreachpc_sub(struct map_session_data *sd, va_list args) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_playBGM_foreachpc_sub_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playBGM_foreachpc_sub_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_script_playBGM_foreachpc_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.script.playBGM_foreachpc_sub(sd, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_script_playBGM_foreachpc_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playBGM_foreachpc_sub_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_script_playBGM_foreachpc_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_soundeffect_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_soundeffect_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_soundeffect_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_soundeffect_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.soundeffect_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_soundeffect_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_soundeffect_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_soundeffect_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_query_sql_sub(struct script_state *st, Sql *handle) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_query_sql_sub_pre ) {
+ int (*preHookFunc) (struct script_state *st, Sql *handle);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_query_sql_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_buildin_query_sql_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(st, handle);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.buildin_query_sql_sub(st, handle);
+ }
+ if( HPMHooks.count.HP_script_buildin_query_sql_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct script_state *st, Sql *handle);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_query_sql_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_buildin_query_sql_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, st, handle);
+ }
+ }
+ return retVal___;
+}
+int HP_script_axtoi(const char *hexStg) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_axtoi_pre ) {
+ int (*preHookFunc) (const char *hexStg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_axtoi_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_axtoi_pre[hIndex].func;
+ retVal___ = preHookFunc(hexStg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.axtoi(hexStg);
+ }
+ if( HPMHooks.count.HP_script_axtoi_post ) {
+ int (*postHookFunc) (int retVal___, const char *hexStg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_axtoi_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_axtoi_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hexStg);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_instance_warpall_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_instance_warpall_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_instance_warpall_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_instance_warpall_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_instance_warpall_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_instance_warpall_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_buildin_mobuseskill_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_buildin_mobuseskill_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.buildin_mobuseskill_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_buildin_mobuseskill_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobuseskill_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_buildin_mobuseskill_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_cleanfloor_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_cleanfloor_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleanfloor_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_script_cleanfloor_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.script.cleanfloor_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_script_cleanfloor_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleanfloor_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_script_cleanfloor_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_script_run_func(struct script_state *st) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_script_run_func_pre ) {
+ int (*preHookFunc) (struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_func_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_func_pre[hIndex].func;
+ retVal___ = preHookFunc(st);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.run_func(st);
+ }
+ if( HPMHooks.count.HP_script_run_func_post ) {
+ int (*postHookFunc) (int retVal___, struct script_state *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_func_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_func_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, st);
+ }
+ }
+ return retVal___;
+}
+/* searchstore */
+bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_searchstore_open_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, unsigned int *uses, unsigned short *effect);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_open_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_searchstore_open_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &uses, &effect);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.searchstore.open(sd, uses, effect);
+ }
+ if( HPMHooks.count.HP_searchstore_open_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int *uses, unsigned short *effect);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_open_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_searchstore_open_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &uses, &effect);
+ }
+ }
+ return retVal___;
+}
+void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const unsigned short *itemlist, unsigned int item_count, const unsigned short *cardlist, unsigned int card_count) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_searchstore_query_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const unsigned short *itemlist, unsigned int *item_count, const unsigned short *cardlist, unsigned int *card_count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_searchstore_query_pre[hIndex].func;
+ preHookFunc(sd, &type, &min_price, &max_price, itemlist, &item_count, cardlist, &card_count);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.searchstore.query(sd, type, min_price, max_price, itemlist, item_count, cardlist, card_count);
+ }
+ if( HPMHooks.count.HP_searchstore_query_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const unsigned short *itemlist, unsigned int *item_count, const unsigned short *cardlist, unsigned int *card_count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_searchstore_query_post[hIndex].func;
+ postHookFunc(sd, &type, &min_price, &max_price, itemlist, &item_count, cardlist, &card_count);
+ }
+ }
+ return;
+}
+bool HP_searchstore_querynext(struct map_session_data *sd) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_searchstore_querynext_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_searchstore_querynext_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.searchstore.querynext(sd);
+ }
+ if( HPMHooks.count.HP_searchstore_querynext_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_searchstore_querynext_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+void HP_searchstore_next(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_searchstore_next_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_searchstore_next_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.searchstore.next(sd);
+ }
+ if( HPMHooks.count.HP_searchstore_next_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_searchstore_next_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_searchstore_clear(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_searchstore_clear_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_searchstore_clear_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.searchstore.clear(sd);
+ }
+ if( HPMHooks.count.HP_searchstore_clear_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_searchstore_clear_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_searchstore_close(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_searchstore_close_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_searchstore_close_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.searchstore.close(sd);
+ }
+ if( HPMHooks.count.HP_searchstore_close_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_searchstore_close_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_searchstore_click(struct map_session_data *sd, int account_id, int store_id, unsigned short nameid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_searchstore_click_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *account_id, int *store_id, unsigned short *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_click_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_searchstore_click_pre[hIndex].func;
+ preHookFunc(sd, &account_id, &store_id, &nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.searchstore.click(sd, account_id, store_id, nameid);
+ }
+ if( HPMHooks.count.HP_searchstore_click_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *account_id, int *store_id, unsigned short *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_click_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_searchstore_click_post[hIndex].func;
+ postHookFunc(sd, &account_id, &store_id, &nameid);
+ }
+ }
+ return;
+}
+bool HP_searchstore_queryremote(struct map_session_data *sd, int account_id) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_searchstore_queryremote_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, int *account_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_queryremote_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_searchstore_queryremote_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &account_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.searchstore.queryremote(sd, account_id);
+ }
+ if( HPMHooks.count.HP_searchstore_queryremote_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *account_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_queryremote_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_searchstore_queryremote_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &account_id);
+ }
+ }
+ return retVal___;
+}
+void HP_searchstore_clearremote(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_searchstore_clearremote_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_searchstore_clearremote_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.searchstore.clearremote(sd);
+ }
+ if( HPMHooks.count.HP_searchstore_clearremote_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_searchstore_clearremote_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short *card, unsigned char refine) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_searchstore_result_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, unsigned int *store_id, int *account_id, const char *store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short *card, unsigned char *refine);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_searchstore_result_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &store_id, &account_id, store_name, &nameid, &amount, &price, card, &refine);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine);
+ }
+ if( HPMHooks.count.HP_searchstore_result_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int *store_id, int *account_id, const char *store_name, unsigned short *nameid, unsigned short *amount, unsigned int *price, const short *card, unsigned char *refine);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_searchstore_result_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &store_id, &account_id, store_name, &nameid, &amount, &price, card, &refine);
+ }
+ }
+ return retVal___;
+}
+/* skill */
+int HP_skill_init(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_init_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_init_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.init();
+ }
+ if( HPMHooks.count.HP_skill_init_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_final(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_final_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_final_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.final();
+ }
+ if( HPMHooks.count.HP_skill_final_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_skill_reload(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_reload_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_reload_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.reload();
+ }
+ if( HPMHooks.count.HP_skill_reload_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_reload_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_skill_read_db(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_read_db_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_read_db_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.read_db();
+ }
+ if( HPMHooks.count.HP_skill_read_db_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_read_db_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_skill_get_index(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_index_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_index_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_index_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_index(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_index_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_index_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_index_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_type(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_type_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_type_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_type(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_type_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_type_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_hit(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_hit_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_hit_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_hit(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_hit_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_hit_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_inf(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_inf_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_inf_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_inf(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_inf_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_inf_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_ele(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_ele_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ele_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_ele_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_ele(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_ele_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ele_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_ele_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_nk(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_nk_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_nk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_nk_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_nk(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_nk_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_nk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_nk_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_max(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_max_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_max_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_max_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_max(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_max_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_max_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_max_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_range(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_range_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_range_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_range(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_range_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_range_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_range2_pre ) {
+ int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_range2_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_range2(bl, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_range2_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_range2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_splash(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_splash_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_splash_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_splash_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_splash(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_splash_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_splash_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_splash_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_hp(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_hp_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_hp_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_hp(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_hp_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_hp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_mhp(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_mhp_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_mhp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_mhp_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_mhp(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_mhp_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_mhp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_mhp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_sp(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_sp_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_sp_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_sp(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_sp_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_sp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_state(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_state_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_state_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_state_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_state(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_state_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_state_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_state_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_spiritball(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_spiritball_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_spiritball_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_spiritball_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_spiritball(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_spiritball_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_spiritball_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_spiritball_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_zeny(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_zeny_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_zeny_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_zeny_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_zeny(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_zeny_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_zeny_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_zeny_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_num(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_num_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_num_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_num_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_num(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_num_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_num_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_num_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_cast(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_cast_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cast_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_cast_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_cast(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_cast_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cast_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_cast_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_delay(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_delay_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delay_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_delay_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_delay(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_delay_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delay_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_delay_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_walkdelay(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_walkdelay_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_walkdelay_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_walkdelay_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_walkdelay(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_walkdelay_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_walkdelay_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_walkdelay_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_time(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_time_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_time_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_time(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_time_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_time_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_time2(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_time2_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_time2_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_time2(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_time2_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_time2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_castnodex(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_castnodex_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castnodex_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_castnodex_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_castnodex(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_castnodex_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castnodex_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_castnodex_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_delaynodex(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_delaynodex_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delaynodex_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_delaynodex_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_delaynodex(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_delaynodex_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delaynodex_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_delaynodex_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_castdef(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_castdef_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castdef_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_castdef_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_castdef(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_castdef_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castdef_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_castdef_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_weapontype(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_weapontype_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_weapontype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_weapontype_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_weapontype(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_weapontype_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_weapontype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_weapontype_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_ammotype(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_ammotype_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammotype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_ammotype_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_ammotype(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_ammotype_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammotype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_ammotype_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_ammo_qty(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_ammo_qty_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammo_qty_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_ammo_qty_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_ammo_qty(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_ammo_qty_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammo_qty_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_ammo_qty_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_unit_id(uint16 skill_id, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_unit_id_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_unit_id_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_unit_id(skill_id, flag);
+ }
+ if( HPMHooks.count.HP_skill_get_unit_id_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_unit_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_inf2(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_inf2_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_inf2_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_inf2(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_inf2_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_inf2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_castcancel(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_castcancel_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castcancel_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_castcancel_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_castcancel(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_castcancel_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castcancel_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_castcancel_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_maxcount(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_maxcount_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_maxcount_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_maxcount_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_maxcount(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_maxcount_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_maxcount_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_maxcount_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_blewcount(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_blewcount_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_blewcount_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_blewcount_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_blewcount(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_blewcount_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_blewcount_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_blewcount_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_unit_flag(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_unit_flag_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_flag_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_unit_flag_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_unit_flag(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_unit_flag_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_flag_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_unit_flag_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_unit_target(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_unit_target_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_target_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_unit_target_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_unit_target(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_unit_target_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_target_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_unit_target_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_unit_interval(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_unit_interval_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_interval_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_unit_interval_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_unit_interval(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_unit_interval_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_interval_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_unit_interval_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_unit_bl_target(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_unit_bl_target_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_bl_target_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_unit_bl_target_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_unit_bl_target(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_unit_bl_target_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_bl_target_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_unit_bl_target_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_unit_layout_type(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_unit_layout_type_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_type_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_unit_layout_type_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_unit_layout_type(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_unit_layout_type_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_type_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_unit_layout_type_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_unit_range(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_unit_range_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_range_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_unit_range_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_unit_range(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_unit_range_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_range_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_unit_range_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_cooldown(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_cooldown_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cooldown_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_cooldown_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_cooldown(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_cooldown_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cooldown_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_cooldown_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_tree_get_max(uint16 skill_id, int b_class) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_tree_get_max_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, int *b_class);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_tree_get_max_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_tree_get_max_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &b_class);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.tree_get_max(skill_id, b_class);
+ }
+ if( HPMHooks.count.HP_skill_tree_get_max_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, int *b_class);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_tree_get_max_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_tree_get_max_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &b_class);
+ }
+ }
+ return retVal___;
+}
+const char* HP_skill_get_name(uint16 skill_id) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_skill_get_name_pre ) {
+ const char* (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_name_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_name_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_name(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_name_post ) {
+ const char* (*postHookFunc) (const char* retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_name_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_name_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+const char* HP_skill_get_desc(uint16 skill_id) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_skill_get_desc_pre ) {
+ const char* (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_desc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_desc_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_desc(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_desc_post ) {
+ const char* (*postHookFunc) (const char* retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_desc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_desc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+void HP_skill_chk(uint16 *skill_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_chk_pre ) {
+ void (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_chk_pre[hIndex].func;
+ preHookFunc(skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.chk(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_chk_post ) {
+ void (*postHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_chk_post[hIndex].func;
+ postHookFunc(skill_id);
+ }
+ }
+ return;
+}
+int HP_skill_get_casttype(uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_casttype_pre ) {
+ int (*preHookFunc) (uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_casttype_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_casttype(skill_id);
+ }
+ if( HPMHooks.count.HP_skill_get_casttype_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_casttype_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_casttype2(uint16 index) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_casttype2_pre ) {
+ int (*preHookFunc) (uint16 *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_casttype2_pre[hIndex].func;
+ retVal___ = preHookFunc(&index);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_casttype2(index);
+ }
+ if( HPMHooks.count.HP_skill_get_casttype2_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_casttype2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &index);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_name2id(const char *name) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_name2id_pre ) {
+ int (*preHookFunc) (const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_name2id_pre[hIndex].func;
+ retVal___ = preHookFunc(name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.name2id(name);
+ }
+ if( HPMHooks.count.HP_skill_name2id_post ) {
+ int (*postHookFunc) (int retVal___, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_name2id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_isammotype(struct map_session_data *sd, int skill) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_isammotype_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *skill);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_isammotype_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.isammotype(sd, skill);
+ }
+ if( HPMHooks.count.HP_skill_isammotype_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *skill);
+ 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);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_castend_id_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_castend_id_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.castend_id(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_skill_castend_id_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_castend_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_castend_pos_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_castend_pos_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.castend_pos(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_skill_castend_pos_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_castend_pos_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_castend_map(struct map_session_data *sd, uint16 skill_id, const char *mapname) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_castend_map_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, const char *mapname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_map_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_castend_map_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id, mapname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.castend_map(sd, skill_id, mapname);
+ }
+ if( HPMHooks.count.HP_skill_castend_map_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, const char *mapname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_map_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_castend_map_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id, mapname);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_cleartimerskill(struct block_list *src) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_cleartimerskill_pre ) {
+ int (*preHookFunc) (struct block_list *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_cleartimerskill_pre[hIndex].func;
+ retVal___ = preHookFunc(src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.cleartimerskill(src);
+ }
+ if( HPMHooks.count.HP_skill_cleartimerskill_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_cleartimerskill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_addtimerskill(struct block_list *src, unsigned int tick, int target, int x, int y, uint16 skill_id, uint16 skill_lv, int type, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_addtimerskill_pre ) {
+ int (*preHookFunc) (struct block_list *src, unsigned int *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_addtimerskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_addtimerskill_pre[hIndex].func;
+ retVal___ = preHookFunc(src, &tick, &target, &x, &y, &skill_id, &skill_lv, &type, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.addtimerskill(src, tick, target, x, y, skill_id, skill_lv, type, flag);
+ }
+ if( HPMHooks.count.HP_skill_addtimerskill_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, unsigned int *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_addtimerskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_addtimerskill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, &tick, &target, &x, &y, &skill_id, &skill_lv, &type, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_additional_effect(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_additional_effect_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_additional_effect_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.additional_effect(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick);
+ }
+ if( HPMHooks.count.HP_skill_additional_effect_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_additional_effect_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_counter_additional_effect(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_counter_additional_effect_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &attack_type, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.counter_additional_effect(src, bl, skill_id, skill_lv, attack_type, tick);
+ }
+ if( HPMHooks.count.HP_skill_counter_additional_effect_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &attack_type, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_blown(struct block_list *src, struct block_list *target, int count, int8 dir, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_blown_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *target, int *count, int8 *dir, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_blown_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &count, &dir, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.blown(src, target, count, dir, flag);
+ }
+ if( HPMHooks.count.HP_skill_blown_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int *count, int8 *dir, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_blown_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &count, &dir, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_break_equip(struct block_list *bl, unsigned short where, int rate, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_break_equip_pre ) {
+ int (*preHookFunc) (struct block_list *bl, unsigned short *where, int *rate, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_break_equip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_break_equip_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &where, &rate, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.break_equip(bl, where, rate, flag);
+ }
+ if( HPMHooks.count.HP_skill_break_equip_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned short *where, int *rate, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_break_equip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_break_equip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &where, &rate, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_strip_equip(struct block_list *bl, unsigned short where, int rate, int lv, int time) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_strip_equip_pre ) {
+ int (*preHookFunc) (struct block_list *bl, unsigned short *where, int *rate, int *lv, int *time);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_strip_equip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_strip_equip_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &where, &rate, &lv, &time);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.strip_equip(bl, where, rate, lv, time);
+ }
+ if( HPMHooks.count.HP_skill_strip_equip_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned short *where, int *rate, int *lv, int *time);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_strip_equip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_strip_equip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &where, &rate, &lv, &time);
+ }
+ }
+ return retVal___;
+}
+struct skill_unit_group* HP_skill_id2group(int group_id) {
+ int hIndex = 0;
+ struct skill_unit_group* retVal___ = NULL;
+ if( HPMHooks.count.HP_skill_id2group_pre ) {
+ struct skill_unit_group* (*preHookFunc) (int *group_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_id2group_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_id2group_pre[hIndex].func;
+ retVal___ = preHookFunc(&group_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.id2group(group_id);
+ }
+ if( HPMHooks.count.HP_skill_id2group_post ) {
+ struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, int *group_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_id2group_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_id2group_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &group_id);
+ }
+ }
+ return retVal___;
+}
+struct skill_unit_group* HP_skill_unitsetting(struct block_list *src, uint16 skill_id, uint16 skill_lv, short x, short y, int flag) {
+ int hIndex = 0;
+ struct skill_unit_group* retVal___ = NULL;
+ if( HPMHooks.count.HP_skill_unitsetting_pre ) {
+ struct skill_unit_group* (*preHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_unitsetting_pre[hIndex].func;
+ retVal___ = preHookFunc(src, &skill_id, &skill_lv, &x, &y, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.unitsetting(src, skill_id, skill_lv, x, y, flag);
+ }
+ if( HPMHooks.count.HP_skill_unitsetting_post ) {
+ struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, struct block_list *src, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_unitsetting_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, &skill_id, &skill_lv, &x, &y, &flag);
+ }
+ }
+ return retVal___;
+}
+struct skill_unit* HP_skill_initunit(struct skill_unit_group *group, int idx, int x, int y, int val1, int val2) {
+ int hIndex = 0;
+ struct skill_unit* retVal___ = NULL;
+ if( HPMHooks.count.HP_skill_initunit_pre ) {
+ struct skill_unit* (*preHookFunc) (struct skill_unit_group *group, int *idx, int *x, int *y, int *val1, int *val2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_initunit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_initunit_pre[hIndex].func;
+ retVal___ = preHookFunc(group, &idx, &x, &y, &val1, &val2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.initunit(group, idx, x, y, val1, val2);
+ }
+ if( HPMHooks.count.HP_skill_initunit_post ) {
+ struct skill_unit* (*postHookFunc) (struct skill_unit* retVal___, struct skill_unit_group *group, int *idx, int *x, int *y, int *val1, int *val2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_initunit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_initunit_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, group, &idx, &x, &y, &val1, &val2);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_delunit(struct skill_unit *su) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_delunit_pre ) {
+ int (*preHookFunc) (struct skill_unit *su);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_delunit_pre[hIndex].func;
+ retVal___ = preHookFunc(su);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.delunit(su);
+ }
+ if( HPMHooks.count.HP_skill_delunit_post ) {
+ int (*postHookFunc) (int retVal___, struct skill_unit *su);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_delunit_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, su);
+ }
+ }
+ return retVal___;
+}
+struct skill_unit_group* HP_skill_init_unitgroup(struct block_list *src, int count, uint16 skill_id, uint16 skill_lv, int unit_id, int limit, int interval) {
+ int hIndex = 0;
+ struct skill_unit_group* retVal___ = NULL;
+ if( HPMHooks.count.HP_skill_init_unitgroup_pre ) {
+ struct skill_unit_group* (*preHookFunc) (struct block_list *src, int *count, uint16 *skill_id, uint16 *skill_lv, int *unit_id, int *limit, int *interval);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unitgroup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_init_unitgroup_pre[hIndex].func;
+ retVal___ = preHookFunc(src, &count, &skill_id, &skill_lv, &unit_id, &limit, &interval);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.init_unitgroup(src, count, skill_id, skill_lv, unit_id, limit, interval);
+ }
+ if( HPMHooks.count.HP_skill_init_unitgroup_post ) {
+ struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, struct block_list *src, int *count, uint16 *skill_id, uint16 *skill_lv, int *unit_id, int *limit, int *interval);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unitgroup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_init_unitgroup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, &count, &skill_id, &skill_lv, &unit_id, &limit, &interval);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_del_unitgroup(struct skill_unit_group *group, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_del_unitgroup_pre ) {
+ int (*preHookFunc) (struct skill_unit_group *group, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_del_unitgroup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_del_unitgroup_pre[hIndex].func;
+ retVal___ = preHookFunc(group, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.del_unitgroup(group, file, line, func);
+ }
+ if( HPMHooks.count.HP_skill_del_unitgroup_post ) {
+ int (*postHookFunc) (int retVal___, struct skill_unit_group *group, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_del_unitgroup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_del_unitgroup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, group, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_clear_unitgroup(struct block_list *src) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_clear_unitgroup_pre ) {
+ int (*preHookFunc) (struct block_list *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_unitgroup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_clear_unitgroup_pre[hIndex].func;
+ retVal___ = preHookFunc(src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.clear_unitgroup(src);
+ }
+ if( HPMHooks.count.HP_skill_clear_unitgroup_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_unitgroup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_clear_unitgroup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_clear_group(struct block_list *bl, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_clear_group_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_group_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_clear_group_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.clear_group(bl, flag);
+ }
+ if( HPMHooks.count.HP_skill_clear_group_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_group_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_clear_group_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_unit_onplace_pre ) {
+ int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_unit_onplace_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.unit_onplace(src, bl, tick);
+ }
+ if( HPMHooks.count.HP_skill_unit_onplace_post ) {
+ int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_unit_onplace_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64 damage, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_unit_ondamaged_pre ) {
+ int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *damage, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_unit_ondamaged_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, &damage, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.unit_ondamaged(src, bl, damage, tick);
+ }
+ if( HPMHooks.count.HP_skill_unit_ondamaged_post ) {
+ int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 *damage, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_unit_ondamaged_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, &damage, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_cast_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_cast_fix_pre ) {
+ int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_cast_fix_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.cast_fix(bl, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_cast_fix_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_cast_fix_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_cast_fix_sc(struct block_list *bl, int time) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_cast_fix_sc_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *time);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_sc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_cast_fix_sc_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &time);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.cast_fix_sc(bl, time);
+ }
+ if( HPMHooks.count.HP_skill_cast_fix_sc_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *time);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_sc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_cast_fix_sc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &time);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_vf_cast_fix(struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_vf_cast_fix_pre ) {
+ int (*preHookFunc) (struct block_list *bl, double *time, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_vf_cast_fix_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_vf_cast_fix_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &time, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.vf_cast_fix(bl, time, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_vf_cast_fix_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, double *time, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_vf_cast_fix_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_vf_cast_fix_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &time, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_delay_fix_pre ) {
+ int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delay_fix_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_delay_fix_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.delay_fix(bl, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_delay_fix_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delay_fix_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_delay_fix_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_check_condition_castbegin_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.check_condition_castbegin(sd, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_check_condition_castbegin_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_check_condition_castend(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_check_condition_castend_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_check_condition_castend_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.check_condition_castend(sd, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_check_condition_castend_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_check_condition_castend_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_consume_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, short type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_consume_requirement_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, short *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_consume_requirement_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_consume_requirement_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id, &skill_lv, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.consume_requirement(sd, skill_id, skill_lv, type);
+ }
+ if( HPMHooks.count.HP_skill_consume_requirement_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, short *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_consume_requirement_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_consume_requirement_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv, &type);
+ }
+ }
+ return retVal___;
+}
+struct skill_condition HP_skill_get_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ struct skill_condition retVal___;
+ memset(&retVal___, '\0', sizeof(struct skill_condition));
+ if( HPMHooks.count.HP_skill_get_requirement_pre ) {
+ struct skill_condition (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_requirement_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_requirement(sd, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_requirement_post ) {
+ struct skill_condition (*postHookFunc) (struct skill_condition retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_requirement_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_check_pc_partner(struct map_session_data *sd, uint16 skill_id, uint16 *skill_lv, int range, int cast_flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_check_pc_partner_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, int *range, int *cast_flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_pc_partner_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_check_pc_partner_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id, skill_lv, &range, &cast_flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.check_pc_partner(sd, skill_id, skill_lv, range, cast_flag);
+ }
+ if( HPMHooks.count.HP_skill_check_pc_partner_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, int *range, int *cast_flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_pc_partner_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_check_pc_partner_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id, skill_lv, &range, &cast_flag);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_unit_move(struct block_list *bl, unsigned int tick, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_unit_move_pre ) {
+ int (*preHookFunc) (struct block_list *bl, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_unit_move_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &tick, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.unit_move(bl, tick, flag);
+ }
+ if( HPMHooks.count.HP_skill_unit_move_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_unit_move_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &tick, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_unit_onleft_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, struct block_list *bl, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_unit_onleft_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, bl, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.unit_onleft(skill_id, bl, tick);
+ }
+ if( HPMHooks.count.HP_skill_unit_onleft_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, struct block_list *bl, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_unit_onleft_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, bl, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_unit_onout(struct skill_unit *src, struct block_list *bl, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_unit_onout_pre ) {
+ int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_unit_onout_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.unit_onout(src, bl, tick);
+ }
+ if( HPMHooks.count.HP_skill_unit_onout_post ) {
+ int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_unit_onout_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16 dx, int16 dy) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_unit_move_unit_group_pre ) {
+ int (*preHookFunc) (struct skill_unit_group *group, int16 *m, int16 *dx, int16 *dy);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_unit_group_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_unit_move_unit_group_pre[hIndex].func;
+ retVal___ = preHookFunc(group, &m, &dx, &dy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.unit_move_unit_group(group, m, dx, dy);
+ }
+ if( HPMHooks.count.HP_skill_unit_move_unit_group_post ) {
+ int (*postHookFunc) (int retVal___, struct skill_unit_group *group, int16 *m, int16 *dx, int16 *dy);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_unit_group_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_unit_move_unit_group_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, group, &m, &dx, &dy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_sit(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_sit_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_sit_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.sit(sd, type);
+ }
+ if( HPMHooks.count.HP_skill_sit_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_sit_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &type);
+ }
+ }
+ return retVal___;
+}
+void HP_skill_brandishspear(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_brandishspear_pre ) {
+ void (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_brandishspear_pre[hIndex].func;
+ preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.brandishspear(src, bl, skill_id, skill_lv, tick, flag);
+ }
+ if( HPMHooks.count.HP_skill_brandishspear_post ) {
+ void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_brandishspear_post[hIndex].func;
+ postHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag);
+ }
+ }
+ return;
+}
+void HP_skill_repairweapon(struct map_session_data *sd, int idx) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_repairweapon_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_repairweapon_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_repairweapon_pre[hIndex].func;
+ preHookFunc(sd, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.repairweapon(sd, idx);
+ }
+ if( HPMHooks.count.HP_skill_repairweapon_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_repairweapon_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_repairweapon_post[hIndex].func;
+ postHookFunc(sd, &idx);
+ }
+ }
+ return;
+}
+void HP_skill_identify(struct map_session_data *sd, int idx) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_identify_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_identify_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_identify_pre[hIndex].func;
+ preHookFunc(sd, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.identify(sd, idx);
+ }
+ if( HPMHooks.count.HP_skill_identify_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_identify_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_identify_post[hIndex].func;
+ postHookFunc(sd, &idx);
+ }
+ }
+ return;
+}
+void HP_skill_weaponrefine(struct map_session_data *sd, int idx) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_weaponrefine_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_weaponrefine_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_weaponrefine_pre[hIndex].func;
+ preHookFunc(sd, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.weaponrefine(sd, idx);
+ }
+ if( HPMHooks.count.HP_skill_weaponrefine_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_weaponrefine_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_weaponrefine_post[hIndex].func;
+ postHookFunc(sd, &idx);
+ }
+ }
+ return;
+}
+int HP_skill_autospell(struct map_session_data *md, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_autospell_pre ) {
+ int (*preHookFunc) (struct map_session_data *md, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_autospell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_autospell_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.autospell(md, skill_id);
+ }
+ if( HPMHooks.count.HP_skill_autospell_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *md, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_autospell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_autospell_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_calc_heal(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, bool heal) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_calc_heal_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, bool *heal);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_calc_heal_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_calc_heal_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &heal);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.calc_heal(src, target, skill_id, skill_lv, heal);
+ }
+ if( HPMHooks.count.HP_skill_calc_heal_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, bool *heal);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_calc_heal_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_calc_heal_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &heal);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_check_cloaking(struct block_list *bl, struct status_change_entry *sce) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_check_cloaking_pre ) {
+ bool (*preHookFunc) (struct block_list *bl, struct status_change_entry *sce);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_check_cloaking_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sce);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.check_cloaking(bl, sce);
+ }
+ if( HPMHooks.count.HP_skill_check_cloaking_post ) {
+ bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct status_change_entry *sce);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_check_cloaking_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sce);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_enchant_elemental_end(struct block_list *bl, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_enchant_elemental_end_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_enchant_elemental_end_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_enchant_elemental_end_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.enchant_elemental_end(bl, type);
+ }
+ if( HPMHooks.count.HP_skill_enchant_elemental_end_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_enchant_elemental_end_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_enchant_elemental_end_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_not_ok(uint16 skill_id, struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_not_ok_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_not_ok_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.not_ok(skill_id, sd);
+ }
+ if( HPMHooks.count.HP_skill_not_ok_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_not_ok_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_not_ok_hom(uint16 skill_id, struct homun_data *hd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_not_ok_hom_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_not_ok_hom_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, hd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.not_ok_hom(skill_id, hd);
+ }
+ if( HPMHooks.count.HP_skill_not_ok_hom_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, struct homun_data *hd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_not_ok_hom_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, hd);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_not_ok_mercenary(uint16 skill_id, struct mercenary_data *md) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_not_ok_mercenary_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_mercenary_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_not_ok_mercenary_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, md);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.not_ok_mercenary(skill_id, md);
+ }
+ if( HPMHooks.count.HP_skill_not_ok_mercenary_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, struct mercenary_data *md);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_mercenary_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_not_ok_mercenary_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, md);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_chastle_mob_changetarget(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_chastle_mob_changetarget_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chastle_mob_changetarget_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_chastle_mob_changetarget_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.chastle_mob_changetarget(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_chastle_mob_changetarget_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chastle_mob_changetarget_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_chastle_mob_changetarget_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_can_produce_mix(struct map_session_data *sd, int nameid, int trigger, int qty) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_can_produce_mix_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *trigger, int *qty);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_produce_mix_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_can_produce_mix_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &nameid, &trigger, &qty);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.can_produce_mix(sd, nameid, trigger, qty);
+ }
+ if( HPMHooks.count.HP_skill_can_produce_mix_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid, int *trigger, int *qty);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_produce_mix_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_can_produce_mix_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &nameid, &trigger, &qty);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, int slot1, int slot2, int slot3, int qty) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_produce_mix_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *nameid, int *slot1, int *slot2, int *slot3, int *qty);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_produce_mix_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_produce_mix_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id, &nameid, &slot1, &slot2, &slot3, &qty);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.produce_mix(sd, skill_id, nameid, slot1, slot2, slot3, qty);
+ }
+ if( HPMHooks.count.HP_skill_produce_mix_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, int *nameid, int *slot1, int *slot2, int *slot3, int *qty);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_produce_mix_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_produce_mix_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id, &nameid, &slot1, &slot2, &slot3, &qty);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_arrow_create(struct map_session_data *sd, int nameid) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_arrow_create_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_arrow_create_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_arrow_create_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.arrow_create(sd, nameid);
+ }
+ if( HPMHooks.count.HP_skill_arrow_create_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_arrow_create_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_arrow_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &nameid);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_castend_nodamage_id_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.castend_nodamage_id(src, bl, skill_id, skill_lv, tick, flag);
+ }
+ if( HPMHooks.count.HP_skill_castend_nodamage_id_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &tick, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_castend_damage_id_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_castend_damage_id_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, &skill_id, &skill_lv, &tick, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.castend_damage_id(src, bl, skill_id, skill_lv, tick, flag);
+ }
+ if( HPMHooks.count.HP_skill_castend_damage_id_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_castend_damage_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, &skill_id, &skill_lv, &tick, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_castend_pos2_pre ) {
+ int (*preHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_castend_pos2_pre[hIndex].func;
+ retVal___ = preHookFunc(src, &x, &y, &skill_id, &skill_lv, &tick, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.castend_pos2(src, x, y, skill_id, skill_lv, tick, flag);
+ }
+ if( HPMHooks.count.HP_skill_castend_pos2_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_castend_pos2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, &x, &y, &skill_id, &skill_lv, &tick, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tick, bool load) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_blockpc_start_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *tick, bool *load);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_blockpc_start_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id, &tick, &load);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.blockpc_start(sd, skill_id, tick, load);
+ }
+ if( HPMHooks.count.HP_skill_blockpc_start_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, int *tick, bool *load);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_blockpc_start_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id, &tick, &load);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_blockhomun_start_pre ) {
+ int (*preHookFunc) (struct homun_data *hd, uint16 *skill_id, int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_start_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_blockhomun_start_pre[hIndex].func;
+ retVal___ = preHookFunc(hd, &skill_id, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.blockhomun_start(hd, skill_id, tick);
+ }
+ if( HPMHooks.count.HP_skill_blockhomun_start_post ) {
+ int (*postHookFunc) (int retVal___, struct homun_data *hd, uint16 *skill_id, int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_start_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_blockhomun_start_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd, &skill_id, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_blockmerc_start(struct mercenary_data *md, uint16 skill_id, int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_blockmerc_start_pre ) {
+ int (*preHookFunc) (struct mercenary_data *md, uint16 *skill_id, int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_start_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_blockmerc_start_pre[hIndex].func;
+ retVal___ = preHookFunc(md, &skill_id, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.blockmerc_start(md, skill_id, tick);
+ }
+ if( HPMHooks.count.HP_skill_blockmerc_start_post ) {
+ int (*postHookFunc) (int retVal___, struct mercenary_data *md, uint16 *skill_id, int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_start_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_blockmerc_start_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &skill_id, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_attack(int attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_attack_pre ) {
+ int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_attack_pre[hIndex].func;
+ retVal___ = preHookFunc(&attack_type, src, dsrc, bl, &skill_id, &skill_lv, &tick, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.attack(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag);
+ }
+ if( HPMHooks.count.HP_skill_attack_post ) {
+ int (*postHookFunc) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_attack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &attack_type, src, dsrc, bl, &skill_id, &skill_lv, &tick, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_attack_area(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_attack_area_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_area_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_attack_area_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.attack_area(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_attack_area_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_area_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_attack_area_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_area_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_area_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_area_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.area_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_area_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_area_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, unsigned int tick, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_area_sub_count_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_area_sub_count_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &skill_id, &skill_lv, &tick, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.area_sub_count(src, target, skill_id, skill_lv, tick, flag);
+ }
+ if( HPMHooks.count.HP_skill_area_sub_count_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, unsigned int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_area_sub_count_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &skill_id, &skill_lv, &tick, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_check_unit_range(struct block_list *bl, int x, int y, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_check_unit_range_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_check_unit_range_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &x, &y, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.check_unit_range(bl, x, y, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_check_unit_range_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_check_unit_range_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &x, &y, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_check_unit_range_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_check_unit_range_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_check_unit_range_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.check_unit_range_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_check_unit_range_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_check_unit_range_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_check_unit_range2(struct block_list *bl, int x, int y, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_check_unit_range2_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_check_unit_range2_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &x, &y, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.check_unit_range2(bl, x, y, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_check_unit_range2_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_check_unit_range2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &x, &y, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_check_unit_range2_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_check_unit_range2_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_check_unit_range2_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.check_unit_range2_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_check_unit_range2_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_check_unit_range2_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_skill_toggle_magicpower(struct block_list *bl, uint16 skill_id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_toggle_magicpower_pre ) {
+ void (*preHookFunc) (struct block_list *bl, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_toggle_magicpower_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_toggle_magicpower_pre[hIndex].func;
+ preHookFunc(bl, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.toggle_magicpower(bl, skill_id);
+ }
+ if( HPMHooks.count.HP_skill_toggle_magicpower_post ) {
+ void (*postHookFunc) (struct block_list *bl, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_toggle_magicpower_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_toggle_magicpower_post[hIndex].func;
+ postHookFunc(bl, &skill_id);
+ }
+ }
+ return;
+}
+int HP_skill_magic_reflect(struct block_list *src, struct block_list *bl, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_magic_reflect_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magic_reflect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_magic_reflect_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.magic_reflect(src, bl, type);
+ }
+ if( HPMHooks.count.HP_skill_magic_reflect_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magic_reflect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_magic_reflect_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint16 skill_id, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_onskillusage_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, uint16 *skill_id, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_onskillusage_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, bl, &skill_id, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.onskillusage(sd, bl, skill_id, tick);
+ }
+ if( HPMHooks.count.HP_skill_onskillusage_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 *skill_id, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_onskillusage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, bl, &skill_id, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_cell_overlap(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_cell_overlap_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cell_overlap_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_cell_overlap_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.cell_overlap(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_cell_overlap_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cell_overlap_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_cell_overlap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_timerskill_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_timerskill_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.timerskill(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_skill_timerskill_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_timerskill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_trap_splash(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_trap_splash_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_splash_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_trap_splash_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.trap_splash(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_trap_splash_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_splash_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_trap_splash_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_check_condition_mercenary_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *skill_id, int *lv, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mercenary_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_check_condition_mercenary_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &skill_id, &lv, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.check_condition_mercenary(bl, skill_id, lv, type);
+ }
+ if( HPMHooks.count.HP_skill_check_condition_mercenary_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *skill_id, int *lv, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mercenary_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_check_condition_mercenary_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &skill_id, &lv, &type);
+ }
+ }
+ return retVal___;
+}
+struct skill_unit_group* HP_skill_locate_element_field(struct block_list *bl) {
+ int hIndex = 0;
+ struct skill_unit_group* retVal___ = NULL;
+ if( HPMHooks.count.HP_skill_locate_element_field_pre ) {
+ struct skill_unit_group* (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_locate_element_field_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_locate_element_field_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.locate_element_field(bl);
+ }
+ if( HPMHooks.count.HP_skill_locate_element_field_post ) {
+ struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_locate_element_field_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_locate_element_field_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_graffitiremover(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_graffitiremover_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_graffitiremover_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_graffitiremover_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.graffitiremover(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_graffitiremover_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_graffitiremover_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_graffitiremover_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_activate_reverberation(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_activate_reverberation_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_activate_reverberation_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_activate_reverberation_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.activate_reverberation(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_activate_reverberation_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_activate_reverberation_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_activate_reverberation_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_dance_overlap_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_dance_overlap_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_dance_overlap_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.dance_overlap_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_dance_overlap_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_dance_overlap_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_dance_overlap(struct skill_unit *su, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_dance_overlap_pre ) {
+ int (*preHookFunc) (struct skill_unit *su, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_dance_overlap_pre[hIndex].func;
+ retVal___ = preHookFunc(su, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.dance_overlap(su, flag);
+ }
+ if( HPMHooks.count.HP_skill_dance_overlap_post ) {
+ int (*postHookFunc) (int retVal___, struct skill_unit *su, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_dance_overlap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, su, &flag);
+ }
+ }
+ return retVal___;
+}
+struct s_skill_unit_layout* HP_skill_get_unit_layout(uint16 skill_id, uint16 skill_lv, struct block_list *src, int x, int y) {
+ int hIndex = 0;
+ struct s_skill_unit_layout* retVal___ = NULL;
+ if( HPMHooks.count.HP_skill_get_unit_layout_pre ) {
+ struct s_skill_unit_layout* (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv, struct block_list *src, int *x, int *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_unit_layout_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv, src, &x, &y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_unit_layout(skill_id, skill_lv, src, x, y);
+ }
+ if( HPMHooks.count.HP_skill_get_unit_layout_post ) {
+ struct s_skill_unit_layout* (*postHookFunc) (struct s_skill_unit_layout* retVal___, uint16 *skill_id, uint16 *skill_lv, struct block_list *src, int *x, int *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_unit_layout_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv, src, &x, &y);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_frostjoke_scream(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_frostjoke_scream_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_frostjoke_scream_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_frostjoke_scream_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.frostjoke_scream(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_frostjoke_scream_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_frostjoke_scream_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_frostjoke_scream_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_greed(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_greed_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_greed_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_greed_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.greed(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_greed_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_greed_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_greed_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_destroy_trap(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_destroy_trap_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_destroy_trap_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_destroy_trap_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.destroy_trap(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_destroy_trap_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_destroy_trap_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_destroy_trap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_icewall_block(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_icewall_block_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_icewall_block_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_icewall_block_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.icewall_block(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_icewall_block_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_icewall_block_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_icewall_block_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_list *bl, struct skill_unit_group *group, int tick) {
+ int hIndex = 0;
+ struct skill_unit_group_tickset* retVal___ = NULL;
+ if( HPMHooks.count.HP_skill_unitgrouptickset_search_pre ) {
+ struct skill_unit_group_tickset* (*preHookFunc) (struct block_list *bl, struct skill_unit_group *group, int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_unitgrouptickset_search_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, group, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.unitgrouptickset_search(bl, group, tick);
+ }
+ if( HPMHooks.count.HP_skill_unitgrouptickset_search_post ) {
+ struct skill_unit_group_tickset* (*postHookFunc) (struct skill_unit_group_tickset* retVal___, struct block_list *bl, struct skill_unit_group *group, int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_unitgrouptickset_search_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, group, &tick);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_dance_switch(struct skill_unit *su, int flag) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_dance_switch_pre ) {
+ bool (*preHookFunc) (struct skill_unit *su, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_switch_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_dance_switch_pre[hIndex].func;
+ retVal___ = preHookFunc(su, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.dance_switch(su, flag);
+ }
+ if( HPMHooks.count.HP_skill_dance_switch_post ) {
+ bool (*postHookFunc) (bool retVal___, struct skill_unit *su, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_switch_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_dance_switch_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, su, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_check_condition_char_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_check_condition_char_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_char_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_check_condition_char_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.check_condition_char_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_check_condition_char_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_char_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_check_condition_char_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_check_condition_mob_master_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_check_condition_mob_master_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.check_condition_mob_master_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_check_condition_mob_master_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mob_master_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_check_condition_mob_master_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_brandishspear_first_pre ) {
+ void (*preHookFunc) (struct square *tc, uint8 *dir, int16 *x, int16 *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_brandishspear_first_pre[hIndex].func;
+ preHookFunc(tc, &dir, &x, &y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.brandishspear_first(tc, dir, x, y);
+ }
+ if( HPMHooks.count.HP_skill_brandishspear_first_post ) {
+ void (*postHookFunc) (struct square *tc, uint8 *dir, int16 *x, int16 *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_brandishspear_first_post[hIndex].func;
+ postHookFunc(tc, &dir, &x, &y);
+ }
+ }
+ return;
+}
+void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_brandishspear_dir_pre ) {
+ void (*preHookFunc) (struct square *tc, uint8 *dir, int *are);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_brandishspear_dir_pre[hIndex].func;
+ preHookFunc(tc, &dir, &are);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.brandishspear_dir(tc, dir, are);
+ }
+ if( HPMHooks.count.HP_skill_brandishspear_dir_post ) {
+ void (*postHookFunc) (struct square *tc, uint8 *dir, int *are);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_brandishspear_dir_post[hIndex].func;
+ postHookFunc(tc, &dir, &are);
+ }
+ }
+ return;
+}
+int HP_skill_get_fixed_cast(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_fixed_cast_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_fixed_cast_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_fixed_cast_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_fixed_cast(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_fixed_cast_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_fixed_cast_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_fixed_cast_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_sit_count(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_sit_count_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_count_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_sit_count_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.sit_count(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_sit_count_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_count_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_sit_count_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_sit_in(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_sit_in_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_in_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_sit_in_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.sit_in(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_sit_in_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_in_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_sit_in_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_sit_out(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_sit_out_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_out_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_sit_out_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.sit_out(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_sit_out_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_out_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_sit_out_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_skill_unitsetmapcell(struct skill_unit *src, uint16 skill_id, uint16 skill_lv, cell_t cell, bool flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_unitsetmapcell_pre ) {
+ void (*preHookFunc) (struct skill_unit *src, uint16 *skill_id, uint16 *skill_lv, cell_t *cell, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetmapcell_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_unitsetmapcell_pre[hIndex].func;
+ preHookFunc(src, &skill_id, &skill_lv, &cell, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.unitsetmapcell(src, skill_id, skill_lv, cell, flag);
+ }
+ if( HPMHooks.count.HP_skill_unitsetmapcell_post ) {
+ void (*postHookFunc) (struct skill_unit *src, uint16 *skill_id, uint16 *skill_lv, cell_t *cell, bool *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetmapcell_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_unitsetmapcell_post[hIndex].func;
+ postHookFunc(src, &skill_id, &skill_lv, &cell, &flag);
+ }
+ }
+ return;
+}
+int HP_skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_unit_onplace_timer_pre ) {
+ int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.unit_onplace_timer(src, bl, tick);
+ }
+ if( HPMHooks.count.HP_skill_unit_onplace_timer_post ) {
+ int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_unit_effect(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_unit_effect_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_effect_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_unit_effect_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.unit_effect(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_unit_effect_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_effect_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_unit_effect_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_unit_timer_sub_onplace(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_onplace_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.unit_timer_sub_onplace(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_unit_timer_sub_onplace_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_onplace_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_onplace_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_unit_move_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_unit_move_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_unit_move_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.unit_move_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_unit_move_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_unit_move_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_blockpc_end(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_blockpc_end_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_blockpc_end_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.blockpc_end(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_skill_blockpc_end_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_blockpc_end_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_blockhomun_end(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_blockhomun_end_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_blockhomun_end_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.blockhomun_end(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_skill_blockhomun_end_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_blockhomun_end_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_blockmerc_end(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_blockmerc_end_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_blockmerc_end_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.blockmerc_end(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_skill_blockmerc_end_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_blockmerc_end_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_split_atoi(char *str, int *val) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_split_atoi_pre ) {
+ int (*preHookFunc) (char *str, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_split_atoi_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_split_atoi_pre[hIndex].func;
+ retVal___ = preHookFunc(str, val);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.split_atoi(str, val);
+ }
+ if( HPMHooks.count.HP_skill_split_atoi_post ) {
+ int (*postHookFunc) (int retVal___, char *str, int *val);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_split_atoi_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_split_atoi_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, val);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_unit_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_unit_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_unit_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.unit_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_skill_unit_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_unit_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_unit_timer_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.unit_timer_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_unit_timer_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_unit_timer_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_skill_init_unit_layout(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_init_unit_layout_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_init_unit_layout_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.init_unit_layout();
+ }
+ if( HPMHooks.count.HP_skill_init_unit_layout_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_init_unit_layout_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_skill_parse_row_skilldb(char *split[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_parse_row_skilldb_pre ) {
+ bool (*preHookFunc) (char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_skilldb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_parse_row_skilldb_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.parse_row_skilldb(split, columns, current);
+ }
+ if( HPMHooks.count.HP_skill_parse_row_skilldb_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_skilldb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_parse_row_skilldb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_parse_row_requiredb(char *split[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_parse_row_requiredb_pre ) {
+ bool (*preHookFunc) (char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_requiredb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_parse_row_requiredb_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.parse_row_requiredb(split, columns, current);
+ }
+ if( HPMHooks.count.HP_skill_parse_row_requiredb_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_requiredb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_parse_row_requiredb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_parse_row_castdb(char *split[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_parse_row_castdb_pre ) {
+ bool (*preHookFunc) (char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_parse_row_castdb_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.parse_row_castdb(split, columns, current);
+ }
+ if( HPMHooks.count.HP_skill_parse_row_castdb_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_parse_row_castdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_parse_row_castnodexdb(char *split[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_parse_row_castnodexdb_pre ) {
+ bool (*preHookFunc) (char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castnodexdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_parse_row_castnodexdb_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.parse_row_castnodexdb(split, columns, current);
+ }
+ if( HPMHooks.count.HP_skill_parse_row_castnodexdb_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_castnodexdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_parse_row_castnodexdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_parse_row_unitdb(char *split[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_parse_row_unitdb_pre ) {
+ bool (*preHookFunc) (char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_unitdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_parse_row_unitdb_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.parse_row_unitdb(split, columns, current);
+ }
+ if( HPMHooks.count.HP_skill_parse_row_unitdb_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_unitdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_parse_row_unitdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_parse_row_producedb(char *split[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_parse_row_producedb_pre ) {
+ bool (*preHookFunc) (char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_producedb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_parse_row_producedb_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.parse_row_producedb(split, columns, current);
+ }
+ if( HPMHooks.count.HP_skill_parse_row_producedb_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_producedb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_parse_row_producedb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_parse_row_createarrowdb(char *split[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_parse_row_createarrowdb_pre ) {
+ bool (*preHookFunc) (char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_createarrowdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_parse_row_createarrowdb_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.parse_row_createarrowdb(split, columns, current);
+ }
+ if( HPMHooks.count.HP_skill_parse_row_createarrowdb_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_createarrowdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_parse_row_createarrowdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_parse_row_abradb(char *split[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_parse_row_abradb_pre ) {
+ bool (*preHookFunc) (char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_abradb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_parse_row_abradb_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.parse_row_abradb(split, columns, current);
+ }
+ if( HPMHooks.count.HP_skill_parse_row_abradb_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_abradb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_parse_row_abradb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_parse_row_spellbookdb(char *split[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_parse_row_spellbookdb_pre ) {
+ bool (*preHookFunc) (char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_spellbookdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_parse_row_spellbookdb_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.parse_row_spellbookdb(split, columns, current);
+ }
+ if( HPMHooks.count.HP_skill_parse_row_spellbookdb_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_spellbookdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_parse_row_spellbookdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_parse_row_magicmushroomdb(char *split[], int column, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre ) {
+ bool (*preHookFunc) (char *split[], int *column, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_parse_row_magicmushroomdb_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &column, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.parse_row_magicmushroomdb(split, column, current);
+ }
+ if( HPMHooks.count.HP_skill_parse_row_magicmushroomdb_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *column, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_magicmushroomdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_parse_row_magicmushroomdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &column, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_parse_row_reproducedb(char *split[], int column, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_parse_row_reproducedb_pre ) {
+ bool (*preHookFunc) (char *split[], int *column, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_reproducedb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_parse_row_reproducedb_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &column, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.parse_row_reproducedb(split, column, current);
+ }
+ if( HPMHooks.count.HP_skill_parse_row_reproducedb_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *column, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_reproducedb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_parse_row_reproducedb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &column, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_parse_row_improvisedb(char *split[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_parse_row_improvisedb_pre ) {
+ bool (*preHookFunc) (char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_improvisedb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_parse_row_improvisedb_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.parse_row_improvisedb(split, columns, current);
+ }
+ if( HPMHooks.count.HP_skill_parse_row_improvisedb_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_improvisedb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_parse_row_improvisedb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_parse_row_changematerialdb(char *split[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_parse_row_changematerialdb_pre ) {
+ bool (*preHookFunc) (char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_changematerialdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_parse_row_changematerialdb_pre[hIndex].func;
+ retVal___ = preHookFunc(split, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.parse_row_changematerialdb(split, columns, current);
+ }
+ if( HPMHooks.count.HP_skill_parse_row_changematerialdb_post ) {
+ bool (*postHookFunc) (bool retVal___, char *split[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_changematerialdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_parse_row_changematerialdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, split, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+void HP_skill_usave_add(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_usave_add_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_usave_add_pre[hIndex].func;
+ preHookFunc(sd, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.usave_add(sd, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_usave_add_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_usave_add_post[hIndex].func;
+ postHookFunc(sd, &skill_id, &skill_lv);
+ }
+ }
+ return;
+}
+void HP_skill_usave_trigger(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_usave_trigger_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_usave_trigger_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.usave_trigger(sd);
+ }
+ if( HPMHooks.count.HP_skill_usave_trigger_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_usave_trigger_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_skill_cooldown_load(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_cooldown_load_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_cooldown_load_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.cooldown_load(sd);
+ }
+ if( HPMHooks.count.HP_skill_cooldown_load_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_cooldown_load_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_skill_spellbook(struct map_session_data *sd, int nameid) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_spellbook_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_spellbook_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_spellbook_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.spellbook(sd, nameid);
+ }
+ if( HPMHooks.count.HP_skill_spellbook_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_spellbook_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_spellbook_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &nameid);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_block_check(struct block_list *bl, enum sc_type type, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_block_check_pre ) {
+ int (*preHookFunc) (struct block_list *bl, enum sc_type *type, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_block_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_block_check_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &type, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.block_check(bl, type, skill_id);
+ }
+ if( HPMHooks.count.HP_skill_block_check_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, enum sc_type *type, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_block_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_block_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &type, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_detonator(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_detonator_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_detonator_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_detonator_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.detonator(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_detonator_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_detonator_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_detonator_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+bool HP_skill_check_camouflage(struct block_list *bl, struct status_change_entry *sce) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_skill_check_camouflage_pre ) {
+ bool (*preHookFunc) (struct block_list *bl, struct status_change_entry *sce);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_camouflage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_check_camouflage_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sce);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.check_camouflage(bl, sce);
+ }
+ if( HPMHooks.count.HP_skill_check_camouflage_post ) {
+ bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct status_change_entry *sce);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_camouflage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_check_camouflage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sce);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_magicdecoy(struct map_session_data *sd, int nameid) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_magicdecoy_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magicdecoy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_magicdecoy_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.magicdecoy(sd, nameid);
+ }
+ if( HPMHooks.count.HP_skill_magicdecoy_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magicdecoy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_magicdecoy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &nameid);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_poisoningweapon(struct map_session_data *sd, int nameid) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_poisoningweapon_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_poisoningweapon_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_poisoningweapon_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.poisoningweapon(sd, nameid);
+ }
+ if( HPMHooks.count.HP_skill_poisoningweapon_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_poisoningweapon_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_poisoningweapon_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &nameid);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_select_menu(struct map_session_data *sd, uint16 skill_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_select_menu_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_select_menu_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_select_menu_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.select_menu(sd, skill_id);
+ }
+ if( HPMHooks.count.HP_skill_select_menu_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_select_menu_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_select_menu_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_elementalanalysis(struct map_session_data *sd, int n, uint16 skill_lv, unsigned short *item_list) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_elementalanalysis_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n, uint16 *skill_lv, unsigned short *item_list);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_elementalanalysis_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n, &skill_lv, item_list);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.elementalanalysis(sd, n, skill_lv, item_list);
+ }
+ if( HPMHooks.count.HP_skill_elementalanalysis_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, uint16 *skill_lv, unsigned short *item_list);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_elementalanalysis_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n, &skill_lv, item_list);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_changematerial(struct map_session_data *sd, int n, unsigned short *item_list) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_changematerial_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n, unsigned short *item_list);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_changematerial_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n, item_list);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.changematerial(sd, n, item_list);
+ }
+ if( HPMHooks.count.HP_skill_changematerial_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, unsigned short *item_list);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_changematerial_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n, item_list);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_elemental_type(uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_elemental_type_pre ) {
+ int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_elemental_type_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_elemental_type_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_elemental_type(skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_skill_get_elemental_type_post ) {
+ int (*postHookFunc) (int retVal___, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_elemental_type_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_elemental_type_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+void HP_skill_cooldown_save(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_skill_cooldown_save_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_cooldown_save_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.skill.cooldown_save(sd);
+ }
+ if( HPMHooks.count.HP_skill_cooldown_save_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_cooldown_save_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_skill_maelstrom_suction(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_maelstrom_suction_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_maelstrom_suction_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_skill_maelstrom_suction_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.skill.maelstrom_suction(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_skill_maelstrom_suction_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_maelstrom_suction_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_skill_maelstrom_suction_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_skill_get_new_group_id(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_skill_get_new_group_id_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_new_group_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_get_new_group_id_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.get_new_group_id();
+ }
+ if( HPMHooks.count.HP_skill_get_new_group_id_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_new_group_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_get_new_group_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+/* status */
+int HP_status_init(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_init_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_init_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.init();
+ }
+ if( HPMHooks.count.HP_status_init_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_status_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.final();
+ }
+ if( HPMHooks.count.HP_status_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_status_get_refine_chance(enum refine_type wlv, int refine) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_get_refine_chance_pre ) {
+ int (*preHookFunc) (enum refine_type *wlv, int *refine);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_refine_chance_pre[hIndex].func;
+ retVal___ = preHookFunc(&wlv, &refine);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_refine_chance(wlv, refine);
+ }
+ if( HPMHooks.count.HP_status_get_refine_chance_post ) {
+ int (*postHookFunc) (int retVal___, enum refine_type *wlv, int *refine);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_refine_chance_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &wlv, &refine);
+ }
+ }
+ return retVal___;
+}
+sc_type HP_status_skill2sc(int skill_id) {
+ int hIndex = 0;
+ sc_type retVal___;
+ memset(&retVal___, '\0', sizeof(sc_type));
+ if( HPMHooks.count.HP_status_skill2sc_pre ) {
+ sc_type (*preHookFunc) (int *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_skill2sc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_skill2sc_pre[hIndex].func;
+ retVal___ = preHookFunc(&skill_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.skill2sc(skill_id);
+ }
+ if( HPMHooks.count.HP_status_skill2sc_post ) {
+ sc_type (*postHookFunc) (sc_type retVal___, int *skill_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_skill2sc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_skill2sc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &skill_id);
+ }
+ }
+ return retVal___;
+}
+int HP_status_sc2skill(sc_type sc) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_sc2skill_pre ) {
+ int (*preHookFunc) (sc_type *sc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2skill_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_sc2skill_pre[hIndex].func;
+ retVal___ = preHookFunc(&sc);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.sc2skill(sc);
+ }
+ if( HPMHooks.count.HP_status_sc2skill_post ) {
+ int (*postHookFunc) (int retVal___, sc_type *sc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2skill_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_sc2skill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &sc);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_status_sc2scb_flag(sc_type sc) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_status_sc2scb_flag_pre ) {
+ unsigned int (*preHookFunc) (sc_type *sc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2scb_flag_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_sc2scb_flag_pre[hIndex].func;
+ retVal___ = preHookFunc(&sc);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.sc2scb_flag(sc);
+ }
+ if( HPMHooks.count.HP_status_sc2scb_flag_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, sc_type *sc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2scb_flag_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_sc2scb_flag_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &sc);
+ }
+ }
+ return retVal___;
+}
+int HP_status_type2relevant_bl_types(int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_type2relevant_bl_types_pre ) {
+ int (*preHookFunc) (int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_pre[hIndex].func;
+ retVal___ = preHookFunc(&type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.type2relevant_bl_types(type);
+ }
+ if( HPMHooks.count.HP_status_type2relevant_bl_types_post ) {
+ int (*postHookFunc) (int retVal___, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_status_get_sc_type(sc_type idx) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_get_sc_type_pre ) {
+ int (*preHookFunc) (sc_type *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_type_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_sc_type_pre[hIndex].func;
+ retVal___ = preHookFunc(&idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_sc_type(idx);
+ }
+ if( HPMHooks.count.HP_status_get_sc_type_post ) {
+ int (*postHookFunc) (int retVal___, sc_type *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_type_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_sc_type_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &idx);
+ }
+ }
+ return retVal___;
+}
+int HP_status_damage(struct block_list *src, struct block_list *target, int64 hp, int64 sp, int walkdelay, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_damage_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *target, int64 *hp, int64 *sp, int *walkdelay, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_damage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_damage_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &hp, &sp, &walkdelay, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.damage(src, target, hp, sp, walkdelay, flag);
+ }
+ if( HPMHooks.count.HP_status_damage_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int64 *hp, int64 *sp, int *walkdelay, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_damage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_damage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &hp, &sp, &walkdelay, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_status_charge(struct block_list *bl, int64 hp, int64 sp) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_charge_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int64 *hp, int64 *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_charge_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_charge_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &hp, &sp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.charge(bl, hp, sp);
+ }
+ if( HPMHooks.count.HP_status_charge_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int64 *hp, int64 *sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_charge_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_charge_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &hp, &sp);
+ }
+ }
+ return retVal___;
+}
+int HP_status_percent_change(struct block_list *src, struct block_list *target, signed char hp_rate, signed char sp_rate, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_percent_change_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *target, signed char *hp_rate, signed char *sp_rate, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_percent_change_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_percent_change_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &hp_rate, &sp_rate, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.percent_change(src, target, hp_rate, sp_rate, flag);
+ }
+ if( HPMHooks.count.HP_status_percent_change_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, signed char *hp_rate, signed char *sp_rate, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_percent_change_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_percent_change_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &hp_rate, &sp_rate, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_set_hp_pre ) {
+ int (*preHookFunc) (struct block_list *bl, unsigned int *hp, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_set_hp_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &hp, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.set_hp(bl, hp, flag);
+ }
+ if( HPMHooks.count.HP_status_set_hp_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *hp, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_set_hp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &hp, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_set_sp_pre ) {
+ int (*preHookFunc) (struct block_list *bl, unsigned int *sp, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_set_sp_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &sp, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.set_sp(bl, sp, flag);
+ }
+ if( HPMHooks.count.HP_status_set_sp_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *sp, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_set_sp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &sp, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_heal_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int64 *hp, int64 *sp, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_heal_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &hp, &sp, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.heal(bl, hp, sp, flag);
+ }
+ if( HPMHooks.count.HP_status_heal_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int64 *hp, int64 *sp, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_heal_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &hp, &sp, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_status_revive(struct block_list *bl, unsigned char per_hp, unsigned char per_sp) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_revive_pre ) {
+ int (*preHookFunc) (struct block_list *bl, unsigned char *per_hp, unsigned char *per_sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_revive_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_revive_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &per_hp, &per_sp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.revive(bl, per_hp, per_sp);
+ }
+ if( HPMHooks.count.HP_status_revive_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned char *per_hp, unsigned char *per_sp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_revive_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_revive_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &per_hp, &per_sp);
+ }
+ }
+ return retVal___;
+}
+struct regen_data* HP_status_get_regen_data(struct block_list *bl) {
+ int hIndex = 0;
+ struct regen_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_status_get_regen_data_pre ) {
+ struct regen_data* (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_regen_data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_regen_data_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_regen_data(bl);
+ }
+ if( HPMHooks.count.HP_status_get_regen_data_post ) {
+ struct regen_data* (*postHookFunc) (struct regen_data* retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_regen_data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_regen_data_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+struct status_data* HP_status_get_status_data(struct block_list *bl) {
+ int hIndex = 0;
+ struct status_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_status_get_status_data_pre ) {
+ struct status_data* (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_status_data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_status_data_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_status_data(bl);
+ }
+ if( HPMHooks.count.HP_status_get_status_data_post ) {
+ struct status_data* (*postHookFunc) (struct status_data* retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_status_data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_status_data_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+struct status_data* HP_status_get_base_status(struct block_list *bl) {
+ int hIndex = 0;
+ struct status_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_status_get_base_status_pre ) {
+ struct status_data* (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_status_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_base_status_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_base_status(bl);
+ }
+ if( HPMHooks.count.HP_status_get_base_status_post ) {
+ struct status_data* (*postHookFunc) (struct status_data* retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_status_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_base_status_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+const char* HP_status_get_name(struct block_list *bl) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_status_get_name_pre ) {
+ const char* (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_name_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_name_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_name(bl);
+ }
+ if( HPMHooks.count.HP_status_get_name_post ) {
+ const char* (*postHookFunc) (const char* retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_name_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_name_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_status_get_class(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_get_class_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_class_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_class_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_class(bl);
+ }
+ if( HPMHooks.count.HP_status_get_class_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_class_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_class_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_status_get_lv(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_get_lv_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_lv_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_lv_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_lv(bl);
+ }
+ if( HPMHooks.count.HP_status_get_lv_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_lv_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_lv_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+defType HP_status_get_def(struct block_list *bl) {
+ int hIndex = 0;
+ defType retVal___;
+ memset(&retVal___, '\0', sizeof(defType));
+ if( HPMHooks.count.HP_status_get_def_pre ) {
+ defType (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_def_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_def_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_def(bl);
+ }
+ if( HPMHooks.count.HP_status_get_def_post ) {
+ defType (*postHookFunc) (defType retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_def_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_def_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_get_speed(struct block_list *bl) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_get_speed_pre ) {
+ unsigned short (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_speed_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_speed_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_speed(bl);
+ }
+ if( HPMHooks.count.HP_status_get_speed_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_speed_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_speed_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+unsigned char HP_status_calc_attack_element(struct block_list *bl, struct status_change *sc, int element) {
+ int hIndex = 0;
+ unsigned char retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned char));
+ if( HPMHooks.count.HP_status_calc_attack_element_pre ) {
+ unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *element);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_attack_element_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_attack_element_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &element);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_attack_element(bl, sc, element);
+ }
+ if( HPMHooks.count.HP_status_calc_attack_element_post ) {
+ unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int *element);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_attack_element_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_attack_element_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &element);
+ }
+ }
+ return retVal___;
+}
+int HP_status_get_party_id(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_get_party_id_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_party_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_party_id_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_party_id(bl);
+ }
+ if( HPMHooks.count.HP_status_get_party_id_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_party_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_party_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_status_get_guild_id(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_get_guild_id_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_guild_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_guild_id_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_guild_id(bl);
+ }
+ if( HPMHooks.count.HP_status_get_guild_id_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_guild_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_guild_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_status_get_emblem_id(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_get_emblem_id_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_emblem_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_emblem_id_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_emblem_id(bl);
+ }
+ if( HPMHooks.count.HP_status_get_emblem_id_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_emblem_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_emblem_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_status_get_mexp(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_get_mexp_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_mexp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_mexp_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_mexp(bl);
+ }
+ if( HPMHooks.count.HP_status_get_mexp_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_mexp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_mexp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_status_get_race2(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_get_race2_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_race2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_race2_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_race2(bl);
+ }
+ if( HPMHooks.count.HP_status_get_race2_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_race2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_race2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+struct view_data* HP_status_get_viewdata(struct block_list *bl) {
+ int hIndex = 0;
+ struct view_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_status_get_viewdata_pre ) {
+ struct view_data* (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_viewdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_viewdata_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_viewdata(bl);
+ }
+ if( HPMHooks.count.HP_status_get_viewdata_post ) {
+ struct view_data* (*postHookFunc) (struct view_data* retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_viewdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_viewdata_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+void HP_status_set_viewdata(struct block_list *bl, int class_) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_set_viewdata_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_viewdata_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_set_viewdata_pre[hIndex].func;
+ preHookFunc(bl, &class_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.set_viewdata(bl, class_);
+ }
+ if( HPMHooks.count.HP_status_set_viewdata_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *class_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_viewdata_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_set_viewdata_post[hIndex].func;
+ postHookFunc(bl, &class_);
+ }
+ }
+ return;
+}
+void HP_status_change_init(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_change_init_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_change_init_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.change_init(bl);
+ }
+ if( HPMHooks.count.HP_status_change_init_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_change_init_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+struct status_change* HP_status_get_sc(struct block_list *bl) {
+ int hIndex = 0;
+ struct status_change* retVal___ = NULL;
+ if( HPMHooks.count.HP_status_get_sc_pre ) {
+ struct status_change* (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_sc_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_sc(bl);
+ }
+ if( HPMHooks.count.HP_status_get_sc_post ) {
+ struct status_change* (*postHookFunc) (struct status_change* retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_sc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_status_isdead(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_isdead_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_isdead_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.isdead(bl);
+ }
+ if( HPMHooks.count.HP_status_isdead_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_isdead_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_status_isimmune(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_isimmune_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_isimmune_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.isimmune(bl);
+ }
+ if( HPMHooks.count.HP_status_isimmune_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_isimmune_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int tick, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_get_sc_def_pre ) {
+ int (*preHookFunc) (struct block_list *bl, enum sc_type *type, int *rate, int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_def_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_sc_def_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &type, &rate, &tick, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_sc_def(bl, type, rate, tick, flag);
+ }
+ if( HPMHooks.count.HP_status_get_sc_def_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, enum sc_type *type, int *rate, int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_def_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_sc_def_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &type, &rate, &tick, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_status_change_start(struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_change_start_pre ) {
+ int (*preHookFunc) (struct block_list *bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_change_start_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.change_start(bl, type, rate, val1, val2, val3, val4, tick, flag);
+ }
+ if( HPMHooks.count.HP_status_change_start_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_change_start_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_status_change_end_(struct block_list *bl, enum sc_type type, int tid, const char *file, int line) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_change_end__pre ) {
+ int (*preHookFunc) (struct block_list *bl, enum sc_type *type, int *tid, const char *file, int *line);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_end__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_change_end__pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &type, &tid, file, &line);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.change_end_(bl, type, tid, file, line);
+ }
+ if( HPMHooks.count.HP_status_change_end__post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, enum sc_type *type, int *tid, const char *file, int *line);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_end__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_change_end__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &type, &tid, file, &line);
+ }
+ }
+ return retVal___;
+}
+int HP_status_kaahi_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_kaahi_heal_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_kaahi_heal_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.kaahi_heal_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_status_kaahi_heal_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_kaahi_heal_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_status_change_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_change_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_change_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.change_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_status_change_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_change_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_status_change_timer_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_change_timer_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_status_change_timer_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.status.change_timer_sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_status_change_timer_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_status_change_timer_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_status_change_clear(struct block_list *bl, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_change_clear_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_change_clear_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.change_clear(bl, type);
+ }
+ if( HPMHooks.count.HP_status_change_clear_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_change_clear_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_status_change_clear_buffs(struct block_list *bl, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_change_clear_buffs_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_buffs_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_change_clear_buffs_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.change_clear_buffs(bl, type);
+ }
+ if( HPMHooks.count.HP_status_change_clear_buffs_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_buffs_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_change_clear_buffs_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &type);
+ }
+ }
+ return retVal___;
+}
+void HP_status_calc_bl_(struct block_list *bl, enum scb_flag flag, bool first) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_calc_bl__pre ) {
+ void (*preHookFunc) (struct block_list *bl, enum scb_flag *flag, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_bl__pre[hIndex].func;
+ preHookFunc(bl, &flag, &first);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.calc_bl_(bl, flag, first);
+ }
+ if( HPMHooks.count.HP_status_calc_bl__post ) {
+ void (*postHookFunc) (struct block_list *bl, enum scb_flag *flag, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_bl__post[hIndex].func;
+ postHookFunc(bl, &flag, &first);
+ }
+ }
+ return;
+}
+int HP_status_calc_mob_(struct mob_data *md, bool first) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_calc_mob__pre ) {
+ int (*preHookFunc) (struct mob_data *md, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mob__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_mob__pre[hIndex].func;
+ retVal___ = preHookFunc(md, &first);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_mob_(md, first);
+ }
+ if( HPMHooks.count.HP_status_calc_mob__post ) {
+ int (*postHookFunc) (int retVal___, struct mob_data *md, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mob__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_mob__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &first);
+ }
+ }
+ return retVal___;
+}
+int HP_status_calc_pet_(struct pet_data *pd, bool first) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_calc_pet__pre ) {
+ int (*preHookFunc) (struct pet_data *pd, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pet__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_pet__pre[hIndex].func;
+ retVal___ = preHookFunc(pd, &first);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_pet_(pd, first);
+ }
+ if( HPMHooks.count.HP_status_calc_pet__post ) {
+ int (*postHookFunc) (int retVal___, struct pet_data *pd, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pet__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_pet__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pd, &first);
+ }
+ }
+ return retVal___;
+}
+int HP_status_calc_pc_(struct map_session_data *sd, bool first) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_calc_pc__pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_pc__pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &first);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_pc_(sd, first);
+ }
+ if( HPMHooks.count.HP_status_calc_pc__post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_pc__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &first);
+ }
+ }
+ return retVal___;
+}
+int HP_status_calc_homunculus_(struct homun_data *hd, bool first) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_calc_homunculus__pre ) {
+ int (*preHookFunc) (struct homun_data *hd, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_homunculus__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_homunculus__pre[hIndex].func;
+ retVal___ = preHookFunc(hd, &first);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_homunculus_(hd, first);
+ }
+ if( HPMHooks.count.HP_status_calc_homunculus__post ) {
+ int (*postHookFunc) (int retVal___, struct homun_data *hd, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_homunculus__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_homunculus__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd, &first);
+ }
+ }
+ return retVal___;
+}
+int HP_status_calc_mercenary_(struct mercenary_data *md, bool first) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_calc_mercenary__pre ) {
+ int (*preHookFunc) (struct mercenary_data *md, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mercenary__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_mercenary__pre[hIndex].func;
+ retVal___ = preHookFunc(md, &first);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_mercenary_(md, first);
+ }
+ if( HPMHooks.count.HP_status_calc_mercenary__post ) {
+ int (*postHookFunc) (int retVal___, struct mercenary_data *md, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mercenary__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_mercenary__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, md, &first);
+ }
+ }
+ return retVal___;
+}
+int HP_status_calc_elemental_(struct elemental_data *ed, bool first) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_calc_elemental__pre ) {
+ int (*preHookFunc) (struct elemental_data *ed, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_elemental__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_elemental__pre[hIndex].func;
+ retVal___ = preHookFunc(ed, &first);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_elemental_(ed, first);
+ }
+ if( HPMHooks.count.HP_status_calc_elemental__post ) {
+ int (*postHookFunc) (int retVal___, struct elemental_data *ed, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_elemental__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_elemental__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ed, &first);
+ }
+ }
+ return retVal___;
+}
+void HP_status_calc_misc(struct block_list *bl, struct status_data *status, 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);
+ 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);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.calc_misc(bl, status, level);
+ }
+ if( HPMHooks.count.HP_status_calc_misc_post ) {
+ void (*postHookFunc) (struct block_list *bl, struct status_data *status, 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);
+ }
+ }
+ return;
+}
+void HP_status_calc_regen(struct block_list *bl, struct status_data *st, struct regen_data *regen) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_calc_regen_pre ) {
+ void (*preHookFunc) (struct block_list *bl, struct status_data *st, struct regen_data *regen);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_regen_pre[hIndex].func;
+ preHookFunc(bl, st, regen);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.calc_regen(bl, st, regen);
+ }
+ if( HPMHooks.count.HP_status_calc_regen_post ) {
+ void (*postHookFunc) (struct block_list *bl, struct status_data *st, struct regen_data *regen);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_regen_post[hIndex].func;
+ postHookFunc(bl, st, regen);
+ }
+ }
+ return;
+}
+void HP_status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, struct status_change *sc) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_calc_regen_rate_pre ) {
+ void (*preHookFunc) (struct block_list *bl, struct regen_data *regen, struct status_change *sc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_rate_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_regen_rate_pre[hIndex].func;
+ preHookFunc(bl, regen, sc);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.calc_regen_rate(bl, regen, sc);
+ }
+ if( HPMHooks.count.HP_status_calc_regen_rate_post ) {
+ void (*postHookFunc) (struct block_list *bl, struct regen_data *regen, struct status_change *sc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_rate_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_regen_rate_post[hIndex].func;
+ postHookFunc(bl, regen, sc);
+ }
+ }
+ return;
+}
+int HP_status_check_skilluse(struct block_list *src, struct block_list *target, uint16 skill_id, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_check_skilluse_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_skilluse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_check_skilluse_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &skill_id, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.check_skilluse(src, target, skill_id, flag);
+ }
+ if( HPMHooks.count.HP_status_check_skilluse_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 *skill_id, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_skilluse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_check_skilluse_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &skill_id, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_status_check_visibility(struct block_list *src, struct block_list *target) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_check_visibility_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_visibility_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_check_visibility_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.check_visibility(src, target);
+ }
+ if( HPMHooks.count.HP_status_check_visibility_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_visibility_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_check_visibility_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target);
+ }
+ }
+ return retVal___;
+}
+int HP_status_change_spread(struct block_list *src, struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_change_spread_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_spread_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_change_spread_pre[hIndex].func;
+ retVal___ = preHookFunc(src, bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.change_spread(src, bl);
+ }
+ if( HPMHooks.count.HP_status_change_spread_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_spread_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_change_spread_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, bl);
+ }
+ }
+ return retVal___;
+}
+defType HP_status_calc_def(struct block_list *bl, struct status_change *sc, int def, bool viewable) {
+ int hIndex = 0;
+ defType retVal___;
+ memset(&retVal___, '\0', sizeof(defType));
+ if( HPMHooks.count.HP_status_calc_def_pre ) {
+ defType (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *def, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_def_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &def, &viewable);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_def(bl, sc, def, viewable);
+ }
+ if( HPMHooks.count.HP_status_calc_def_post ) {
+ defType (*postHookFunc) (defType retVal___, struct block_list *bl, struct status_change *sc, int *def, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_def_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &def, &viewable);
+ }
+ }
+ return retVal___;
+}
+short HP_status_calc_def2(struct block_list *bl, struct status_change *sc, int def2, bool viewable) {
+ int hIndex = 0;
+ short retVal___;
+ memset(&retVal___, '\0', sizeof(short));
+ if( HPMHooks.count.HP_status_calc_def2_pre ) {
+ short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *def2, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_def2_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &def2, &viewable);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_def2(bl, sc, def2, viewable);
+ }
+ if( HPMHooks.count.HP_status_calc_def2_post ) {
+ short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *def2, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_def2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &def2, &viewable);
+ }
+ }
+ return retVal___;
+}
+defType HP_status_calc_mdef(struct block_list *bl, struct status_change *sc, int mdef, bool viewable) {
+ int hIndex = 0;
+ defType retVal___;
+ memset(&retVal___, '\0', sizeof(defType));
+ if( HPMHooks.count.HP_status_calc_mdef_pre ) {
+ defType (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mdef, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_mdef_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &mdef, &viewable);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_mdef(bl, sc, mdef, viewable);
+ }
+ if( HPMHooks.count.HP_status_calc_mdef_post ) {
+ defType (*postHookFunc) (defType retVal___, struct block_list *bl, struct status_change *sc, int *mdef, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_mdef_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &mdef, &viewable);
+ }
+ }
+ return retVal___;
+}
+short HP_status_calc_mdef2(struct block_list *bl, struct status_change *sc, int mdef2, bool viewable) {
+ int hIndex = 0;
+ short retVal___;
+ memset(&retVal___, '\0', sizeof(short));
+ if( HPMHooks.count.HP_status_calc_mdef2_pre ) {
+ short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mdef2, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_mdef2_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &mdef2, &viewable);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_mdef2(bl, sc, mdef2, viewable);
+ }
+ if( HPMHooks.count.HP_status_calc_mdef2_post ) {
+ short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *mdef2, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_mdef2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &mdef2, &viewable);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_calc_batk_pre ) {
+ unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *batk, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_batk_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &batk, &viewable);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_batk(bl, sc, batk, viewable);
+ }
+ if( HPMHooks.count.HP_status_calc_batk_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *batk, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_batk_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &batk, &viewable);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_base_matk(const struct status_data *st, int level) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_base_matk_pre ) {
+ unsigned short (*preHookFunc) (const struct status_data *st, int *level);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_base_matk_pre[hIndex].func;
+ retVal___ = preHookFunc(st, &level);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.base_matk(st, level);
+ }
+ if( HPMHooks.count.HP_status_base_matk_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, const struct status_data *st, int *level);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_base_matk_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, st, &level);
+ }
+ }
+ return retVal___;
+}
+int HP_status_get_weapon_atk(struct block_list *src, struct weapon_atk *watk, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_get_weapon_atk_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct weapon_atk *watk, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_weapon_atk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_weapon_atk_pre[hIndex].func;
+ retVal___ = preHookFunc(src, watk, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_weapon_atk(src, watk, flag);
+ }
+ if( HPMHooks.count.HP_status_get_weapon_atk_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct weapon_atk *watk, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_weapon_atk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_weapon_atk_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, watk, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_status_get_total_mdef(struct block_list *src) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_get_total_mdef_pre ) {
+ int (*preHookFunc) (struct block_list *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_mdef_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_total_mdef_pre[hIndex].func;
+ retVal___ = preHookFunc(src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_total_mdef(src);
+ }
+ if( HPMHooks.count.HP_status_get_total_mdef_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_mdef_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_total_mdef_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src);
+ }
+ }
+ return retVal___;
+}
+int HP_status_get_total_def(struct block_list *src) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_get_total_def_pre ) {
+ int (*preHookFunc) (struct block_list *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_def_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_total_def_pre[hIndex].func;
+ retVal___ = preHookFunc(src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_total_def(src);
+ }
+ if( HPMHooks.count.HP_status_get_total_def_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_def_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_total_def_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src);
+ }
+ }
+ return retVal___;
+}
+int HP_status_get_matk(struct block_list *src, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_get_matk_pre ) {
+ int (*preHookFunc) (struct block_list *src, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_matk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_get_matk_pre[hIndex].func;
+ retVal___ = preHookFunc(src, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_matk(src, flag);
+ }
+ if( HPMHooks.count.HP_status_get_matk_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_matk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_get_matk_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_status_readdb(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_readdb_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_readdb_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.readdb();
+ }
+ if( HPMHooks.count.HP_status_readdb_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_readdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_status_initChangeTables(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_initChangeTables_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_initChangeTables_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.initChangeTables();
+ }
+ if( HPMHooks.count.HP_status_initChangeTables_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_initChangeTables_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_status_initDummyData(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_initDummyData_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_initDummyData_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.initDummyData();
+ }
+ if( HPMHooks.count.HP_status_initDummyData_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_initDummyData_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_status_base_amotion_pc(struct map_session_data *sd, struct status_data *st) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_base_amotion_pc_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct status_data *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_amotion_pc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_base_amotion_pc_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, st);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.base_amotion_pc(sd, st);
+ }
+ if( HPMHooks.count.HP_status_base_amotion_pc_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct status_data *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_amotion_pc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_base_amotion_pc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, st);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_base_atk(const struct block_list *bl, const struct status_data *st) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_base_atk_pre ) {
+ unsigned short (*preHookFunc) (const struct block_list *bl, const struct status_data *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_base_atk_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, st);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.base_atk(bl, st);
+ }
+ if( HPMHooks.count.HP_status_base_atk_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, const struct block_list *bl, const struct status_data *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_base_atk_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, st);
+ }
+ }
+ return retVal___;
+}
+void HP_status_calc_sigma(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_calc_sigma_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_sigma_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_sigma_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.calc_sigma();
+ }
+ if( HPMHooks.count.HP_status_calc_sigma_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_sigma_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_sigma_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+unsigned int HP_status_base_pc_maxhp(struct map_session_data *sd, struct status_data *st) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_status_base_pc_maxhp_pre ) {
+ unsigned int (*preHookFunc) (struct map_session_data *sd, struct status_data *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_pc_maxhp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_base_pc_maxhp_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, st);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.base_pc_maxhp(sd, st);
+ }
+ if( HPMHooks.count.HP_status_base_pc_maxhp_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, struct status_data *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_pc_maxhp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_base_pc_maxhp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, st);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_status_base_pc_maxsp(struct map_session_data *sd, struct status_data *st) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_status_base_pc_maxsp_pre ) {
+ unsigned int (*preHookFunc) (struct map_session_data *sd, struct status_data *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_pc_maxsp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_base_pc_maxsp_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, st);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.base_pc_maxsp(sd, st);
+ }
+ if( HPMHooks.count.HP_status_base_pc_maxsp_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, struct map_session_data *sd, struct status_data *st);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_pc_maxsp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_base_pc_maxsp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, st);
+ }
+ }
+ return retVal___;
+}
+int HP_status_calc_npc_(struct npc_data *nd, bool first) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_calc_npc__pre ) {
+ int (*preHookFunc) (struct npc_data *nd, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_npc__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_npc__pre[hIndex].func;
+ retVal___ = preHookFunc(nd, &first);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_npc_(nd, first);
+ }
+ if( HPMHooks.count.HP_status_calc_npc__post ) {
+ int (*postHookFunc) (int retVal___, struct npc_data *nd, bool *first);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_npc__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_npc__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, nd, &first);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_calc_str(struct block_list *bl, struct status_change *sc, int str) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_calc_str_pre ) {
+ unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_str_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_str_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_str(bl, sc, str);
+ }
+ if( HPMHooks.count.HP_status_calc_str_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_str_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_str_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &str);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_calc_agi(struct block_list *bl, struct status_change *sc, int agi) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_calc_agi_pre ) {
+ unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *agi);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_agi_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_agi_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &agi);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_agi(bl, sc, agi);
+ }
+ if( HPMHooks.count.HP_status_calc_agi_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *agi);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_agi_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_agi_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &agi);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_calc_vit(struct block_list *bl, struct status_change *sc, int vit) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_calc_vit_pre ) {
+ unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *vit);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_vit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_vit_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &vit);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_vit(bl, sc, vit);
+ }
+ if( HPMHooks.count.HP_status_calc_vit_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *vit);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_vit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_vit_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &vit);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_calc_int(struct block_list *bl, struct status_change *sc, int int_) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_calc_int_pre ) {
+ unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *int_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_int_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_int_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &int_);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_int(bl, sc, int_);
+ }
+ if( HPMHooks.count.HP_status_calc_int_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *int_);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_int_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_int_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &int_);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_calc_dex(struct block_list *bl, struct status_change *sc, int dex) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_calc_dex_pre ) {
+ unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *dex);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dex_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_dex_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &dex);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_dex(bl, sc, dex);
+ }
+ if( HPMHooks.count.HP_status_calc_dex_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *dex);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dex_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_dex_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &dex);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *sc, int luk) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_calc_luk_pre ) {
+ unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *luk);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_luk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_luk_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &luk);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_luk(bl, sc, luk);
+ }
+ if( HPMHooks.count.HP_status_calc_luk_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *luk);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_luk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_luk_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &luk);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_calc_watk_pre ) {
+ unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *watk, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_watk_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &watk, &viewable);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_watk(bl, sc, watk, viewable);
+ }
+ if( HPMHooks.count.HP_status_calc_watk_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *watk, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_watk_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &watk, &viewable);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_calc_matk_pre ) {
+ unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *matk, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_matk_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &matk, &viewable);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_matk(bl, sc, matk, viewable);
+ }
+ if( HPMHooks.count.HP_status_calc_matk_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *matk, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_matk_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &matk, &viewable);
+ }
+ }
+ return retVal___;
+}
+signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable) {
+ int hIndex = 0;
+ signed short retVal___;
+ memset(&retVal___, '\0', sizeof(signed short));
+ if( HPMHooks.count.HP_status_calc_hit_pre ) {
+ signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *hit, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_hit_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &hit, &viewable);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_hit(bl, sc, hit, viewable);
+ }
+ if( HPMHooks.count.HP_status_calc_hit_post ) {
+ signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *hit, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_hit_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &hit, &viewable);
+ }
+ }
+ return retVal___;
+}
+signed short HP_status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) {
+ int hIndex = 0;
+ signed short retVal___;
+ memset(&retVal___, '\0', sizeof(signed short));
+ if( HPMHooks.count.HP_status_calc_critical_pre ) {
+ signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *critical, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_critical_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &critical, &viewable);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_critical(bl, sc, critical, viewable);
+ }
+ if( HPMHooks.count.HP_status_calc_critical_post ) {
+ signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *critical, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_critical_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &critical, &viewable);
+ }
+ }
+ return retVal___;
+}
+signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) {
+ int hIndex = 0;
+ signed short retVal___;
+ memset(&retVal___, '\0', sizeof(signed short));
+ if( HPMHooks.count.HP_status_calc_flee_pre ) {
+ signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *flee, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_flee_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &flee, &viewable);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_flee(bl, sc, flee, viewable);
+ }
+ if( HPMHooks.count.HP_status_calc_flee_post ) {
+ signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *flee, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_flee_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &flee, &viewable);
+ }
+ }
+ return retVal___;
+}
+signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable) {
+ int hIndex = 0;
+ signed short retVal___;
+ memset(&retVal___, '\0', sizeof(signed short));
+ if( HPMHooks.count.HP_status_calc_flee2_pre ) {
+ signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *flee2, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_flee2_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &flee2, &viewable);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_flee2(bl, sc, flee2, viewable);
+ }
+ if( HPMHooks.count.HP_status_calc_flee2_post ) {
+ signed short (*postHookFunc) (signed short retVal___, struct block_list *bl, struct status_change *sc, int *flee2, bool *viewable);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_flee2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &flee2, &viewable);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_calc_speed(struct block_list *bl, struct status_change *sc, int speed) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_calc_speed_pre ) {
+ unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *speed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_speed_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_speed_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &speed);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_speed(bl, sc, speed);
+ }
+ if( HPMHooks.count.HP_status_calc_speed_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *speed);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_speed_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_speed_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &speed);
+ }
+ }
+ return retVal___;
+}
+short HP_status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int aspd_rate) {
+ int hIndex = 0;
+ short retVal___;
+ memset(&retVal___, '\0', sizeof(short));
+ if( HPMHooks.count.HP_status_calc_aspd_rate_pre ) {
+ short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *aspd_rate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_rate_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_aspd_rate_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &aspd_rate);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_aspd_rate(bl, sc, aspd_rate);
+ }
+ if( HPMHooks.count.HP_status_calc_aspd_rate_post ) {
+ short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *aspd_rate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_rate_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_aspd_rate_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &aspd_rate);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_calc_dmotion(struct block_list *bl, struct status_change *sc, int dmotion) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_calc_dmotion_pre ) {
+ unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *dmotion);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dmotion_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_dmotion_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &dmotion);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_dmotion(bl, sc, dmotion);
+ }
+ if( HPMHooks.count.HP_status_calc_dmotion_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *dmotion);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dmotion_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_dmotion_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &dmotion);
+ }
+ }
+ return retVal___;
+}
+short HP_status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag) {
+ int hIndex = 0;
+ short retVal___;
+ memset(&retVal___, '\0', sizeof(short));
+ if( HPMHooks.count.HP_status_calc_aspd_pre ) {
+ short (*preHookFunc) (struct block_list *bl, struct status_change *sc, short *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_aspd_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_aspd(bl, sc, flag);
+ }
+ if( HPMHooks.count.HP_status_calc_aspd_post ) {
+ short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, short *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_aspd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &flag);
+ }
+ }
+ return retVal___;
+}
+short HP_status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, int aspd) {
+ int hIndex = 0;
+ short retVal___;
+ memset(&retVal___, '\0', sizeof(short));
+ if( HPMHooks.count.HP_status_calc_fix_aspd_pre ) {
+ short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *aspd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_fix_aspd_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_fix_aspd_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &aspd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_fix_aspd(bl, sc, aspd);
+ }
+ if( HPMHooks.count.HP_status_calc_fix_aspd_post ) {
+ short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, int *aspd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_fix_aspd_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_fix_aspd_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &aspd);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_status_calc_maxhp(struct block_list *bl, struct status_change *sc, uint64 maxhp) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_status_calc_maxhp_pre ) {
+ unsigned int (*preHookFunc) (struct block_list *bl, struct status_change *sc, uint64 *maxhp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxhp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_maxhp_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &maxhp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_maxhp(bl, sc, maxhp);
+ }
+ if( HPMHooks.count.HP_status_calc_maxhp_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, struct block_list *bl, struct status_change *sc, uint64 *maxhp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxhp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_maxhp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &maxhp);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_status_calc_maxsp(struct block_list *bl, struct status_change *sc, unsigned int maxsp) {
+ int hIndex = 0;
+ unsigned int retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned int));
+ if( HPMHooks.count.HP_status_calc_maxsp_pre ) {
+ unsigned int (*preHookFunc) (struct block_list *bl, struct status_change *sc, unsigned int *maxsp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxsp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_maxsp_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &maxsp);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_maxsp(bl, sc, maxsp);
+ }
+ if( HPMHooks.count.HP_status_calc_maxsp_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, struct block_list *bl, struct status_change *sc, unsigned int *maxsp);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxsp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_maxsp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &maxsp);
+ }
+ }
+ return retVal___;
+}
+unsigned char HP_status_calc_element(struct block_list *bl, struct status_change *sc, int element) {
+ int hIndex = 0;
+ unsigned char retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned char));
+ if( HPMHooks.count.HP_status_calc_element_pre ) {
+ unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *element);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_element_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &element);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_element(bl, sc, element);
+ }
+ if( HPMHooks.count.HP_status_calc_element_post ) {
+ unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int *element);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_element_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &element);
+ }
+ }
+ return retVal___;
+}
+unsigned char HP_status_calc_element_lv(struct block_list *bl, struct status_change *sc, int lv) {
+ int hIndex = 0;
+ unsigned char retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned char));
+ if( HPMHooks.count.HP_status_calc_element_lv_pre ) {
+ unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_lv_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_element_lv_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_element_lv(bl, sc, lv);
+ }
+ if( HPMHooks.count.HP_status_calc_element_lv_post ) {
+ unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int *lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_lv_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_element_lv_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &lv);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_calc_mode(struct block_list *bl, struct status_change *sc, int mode) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_calc_mode_pre ) {
+ unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mode);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mode_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_mode_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &mode);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_mode(bl, sc, mode);
+ }
+ if( HPMHooks.count.HP_status_calc_mode_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *mode);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mode_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_mode_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &mode);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) {
+ int hIndex = 0;
+ unsigned short retVal___;
+ memset(&retVal___, '\0', sizeof(unsigned short));
+ if( HPMHooks.count.HP_status_calc_ematk_pre ) {
+ unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *matk);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_ematk_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sc, &matk);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.calc_ematk(bl, sc, matk);
+ }
+ if( HPMHooks.count.HP_status_calc_ematk_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *matk);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_ematk_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sc, &matk);
+ }
+ }
+ return retVal___;
+}
+void HP_status_calc_bl_main(struct block_list *bl, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_calc_bl_main_pre ) {
+ void (*preHookFunc) (struct block_list *bl, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl_main_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_bl_main_pre[hIndex].func;
+ preHookFunc(bl, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.calc_bl_main(bl, flag);
+ }
+ if( HPMHooks.count.HP_status_calc_bl_main_post ) {
+ void (*postHookFunc) (struct block_list *bl, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl_main_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_bl_main_post[hIndex].func;
+ postHookFunc(bl, &flag);
+ }
+ }
+ return;
+}
+void HP_status_display_add(struct map_session_data *sd, enum sc_type type, int dval1, int dval2, int dval3) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_display_add_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, enum sc_type *type, int *dval1, int *dval2, int *dval3);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_display_add_pre[hIndex].func;
+ preHookFunc(sd, &type, &dval1, &dval2, &dval3);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.display_add(sd, type, dval1, dval2, dval3);
+ }
+ if( HPMHooks.count.HP_status_display_add_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, enum sc_type *type, int *dval1, int *dval2, int *dval3);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_display_add_post[hIndex].func;
+ postHookFunc(sd, &type, &dval1, &dval2, &dval3);
+ }
+ }
+ return;
+}
+void HP_status_display_remove(struct map_session_data *sd, enum sc_type type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_display_remove_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, enum sc_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_remove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_display_remove_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.display_remove(sd, type);
+ }
+ if( HPMHooks.count.HP_status_display_remove_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, enum sc_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_remove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_display_remove_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+int HP_status_natural_heal(struct block_list *bl, va_list args) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_natural_heal_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_status_natural_heal_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.status.natural_heal(bl, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_status_natural_heal_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_status_natural_heal_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_status_natural_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_status_natural_heal_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_natural_heal_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.natural_heal_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_status_natural_heal_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_natural_heal_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+bool HP_status_readdb_job1(char *fields[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_status_readdb_job1_pre ) {
+ bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job1_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_readdb_job1_pre[hIndex].func;
+ retVal___ = preHookFunc(fields, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.readdb_job1(fields, columns, current);
+ }
+ if( HPMHooks.count.HP_status_readdb_job1_post ) {
+ bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job1_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_readdb_job1_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fields, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_status_readdb_job2(char *fields[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_status_readdb_job2_pre ) {
+ bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_readdb_job2_pre[hIndex].func;
+ retVal___ = preHookFunc(fields, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.readdb_job2(fields, columns, current);
+ }
+ if( HPMHooks.count.HP_status_readdb_job2_post ) {
+ bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_readdb_job2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fields, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_status_readdb_sizefix(char *fields[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_status_readdb_sizefix_pre ) {
+ bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_sizefix_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_readdb_sizefix_pre[hIndex].func;
+ retVal___ = preHookFunc(fields, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.readdb_sizefix(fields, columns, current);
+ }
+ if( HPMHooks.count.HP_status_readdb_sizefix_post ) {
+ bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_sizefix_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_readdb_sizefix_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fields, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_status_readdb_refine(char *fields[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_status_readdb_refine_pre ) {
+ bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_readdb_refine_pre[hIndex].func;
+ retVal___ = preHookFunc(fields, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.readdb_refine(fields, columns, current);
+ }
+ if( HPMHooks.count.HP_status_readdb_refine_post ) {
+ bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_readdb_refine_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fields, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+bool HP_status_readdb_scconfig(char *fields[], int columns, int current) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_status_readdb_scconfig_pre ) {
+ bool (*preHookFunc) (char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_scconfig_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_readdb_scconfig_pre[hIndex].func;
+ retVal___ = preHookFunc(fields, &columns, &current);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.readdb_scconfig(fields, columns, current);
+ }
+ if( HPMHooks.count.HP_status_readdb_scconfig_post ) {
+ bool (*postHookFunc) (bool retVal___, char *fields[], int *columns, int *current);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_scconfig_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_readdb_scconfig_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fields, &columns, &current);
+ }
+ }
+ return retVal___;
+}
+/* storage */
+void HP_storage_reconnect(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_storage_reconnect_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_storage_reconnect_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.storage.reconnect();
+ }
+ if( HPMHooks.count.HP_storage_reconnect_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_storage_reconnect_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_storage_delitem(struct map_session_data *sd, int n, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_storage_delitem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_delitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_storage_delitem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &n, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.storage.delitem(sd, n, amount);
+ }
+ if( HPMHooks.count.HP_storage_delitem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *n, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_delitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_storage_delitem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &n, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_storage_open(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_storage_open_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_storage_open_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.storage.open(sd);
+ }
+ if( HPMHooks.count.HP_storage_open_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_storage_open_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_storage_add(struct map_session_data *sd, int index, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_storage_add_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_storage_add_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &index, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.storage.add(sd, index, amount);
+ }
+ if( HPMHooks.count.HP_storage_add_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_storage_add_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &index, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_storage_get(struct map_session_data *sd, int index, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_storage_get_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_storage_get_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &index, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.storage.get(sd, index, amount);
+ }
+ if( HPMHooks.count.HP_storage_get_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_storage_get_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &index, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_storage_additem(struct map_session_data *sd, struct item *item_data, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_storage_additem_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_additem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_storage_additem_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, item_data, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.storage.additem(sd, item_data, amount);
+ }
+ if( HPMHooks.count.HP_storage_additem_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item_data, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_additem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_storage_additem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, item_data, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_storage_addfromcart(struct map_session_data *sd, int index, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_storage_addfromcart_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_addfromcart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_storage_addfromcart_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &index, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.storage.addfromcart(sd, index, amount);
+ }
+ if( HPMHooks.count.HP_storage_addfromcart_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_addfromcart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_storage_addfromcart_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &index, &amount);
+ }
+ }
+ return retVal___;
+}
+int HP_storage_gettocart(struct map_session_data *sd, int index, int amount) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_storage_gettocart_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_gettocart_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_storage_gettocart_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &index, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.storage.gettocart(sd, index, amount);
+ }
+ if( HPMHooks.count.HP_storage_gettocart_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *index, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_gettocart_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_storage_gettocart_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &index, &amount);
+ }
+ }
+ return retVal___;
+}
+void HP_storage_close(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_storage_close_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_storage_close_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.storage.close(sd);
+ }
+ if( HPMHooks.count.HP_storage_close_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_storage_close_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_storage_pc_quit(struct map_session_data *sd, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_storage_pc_quit_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_pc_quit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_storage_pc_quit_pre[hIndex].func;
+ preHookFunc(sd, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.storage.pc_quit(sd, flag);
+ }
+ if( HPMHooks.count.HP_storage_pc_quit_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_pc_quit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_storage_pc_quit_post[hIndex].func;
+ postHookFunc(sd, &flag);
+ }
+ }
+ return;
+}
+int HP_storage_comp_item(const void *_i1, const void *_i2) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_storage_comp_item_pre ) {
+ int (*preHookFunc) (const void *_i1, const void *_i2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_comp_item_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_storage_comp_item_pre[hIndex].func;
+ retVal___ = preHookFunc(_i1, _i2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.storage.comp_item(_i1, _i2);
+ }
+ if( HPMHooks.count.HP_storage_comp_item_post ) {
+ int (*postHookFunc) (int retVal___, const void *_i1, const void *_i2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_comp_item_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_storage_comp_item_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, _i1, _i2);
+ }
+ }
+ return retVal___;
+}
+void HP_storage_sortitem(struct item *items, unsigned int size) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_storage_sortitem_pre ) {
+ void (*preHookFunc) (struct item *items, unsigned int *size);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_sortitem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_storage_sortitem_pre[hIndex].func;
+ preHookFunc(items, &size);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.storage.sortitem(items, size);
+ }
+ if( HPMHooks.count.HP_storage_sortitem_post ) {
+ void (*postHookFunc) (struct item *items, unsigned int *size);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_sortitem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_storage_sortitem_post[hIndex].func;
+ postHookFunc(items, &size);
+ }
+ }
+ return;
+}
+int HP_storage_reconnect_sub(DBKey key, DBData *data, va_list ap) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_storage_reconnect_sub_pre ) {
+ int (*preHookFunc) (DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_storage_reconnect_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.storage.reconnect_sub(key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_storage_reconnect_sub_post ) {
+ int (*postHookFunc) (int retVal___, DBKey *key, DBData *data, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_storage_reconnect_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key, data, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+/* trade */
+void HP_trade_request(struct map_session_data *sd, struct map_session_data *target_sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_trade_request_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct map_session_data *target_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_request_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_trade_request_pre[hIndex].func;
+ preHookFunc(sd, target_sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.trade.request(sd, target_sd);
+ }
+ if( HPMHooks.count.HP_trade_request_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *target_sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_request_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_trade_request_post[hIndex].func;
+ postHookFunc(sd, target_sd);
+ }
+ }
+ return;
+}
+void HP_trade_ack(struct map_session_data *sd, int type) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_trade_ack_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_trade_ack_pre[hIndex].func;
+ preHookFunc(sd, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.trade.ack(sd, type);
+ }
+ if( HPMHooks.count.HP_trade_ack_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_trade_ack_post[hIndex].func;
+ postHookFunc(sd, &type);
+ }
+ }
+ return;
+}
+int HP_trade_check_impossible(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_trade_check_impossible_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_impossible_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_trade_check_impossible_pre[hIndex].func;
+ retVal___ = preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.trade.check_impossible(sd);
+ }
+ if( HPMHooks.count.HP_trade_check_impossible_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_impossible_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_trade_check_impossible_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_trade_check(struct map_session_data *sd, struct map_session_data *tsd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_trade_check_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_trade_check_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, tsd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.trade.check(sd, tsd);
+ }
+ if( HPMHooks.count.HP_trade_check_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_trade_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, tsd);
+ }
+ }
+ return retVal___;
+}
+void HP_trade_additem(struct map_session_data *sd, short index, short amount) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_trade_additem_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, short *index, short *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_additem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_trade_additem_pre[hIndex].func;
+ preHookFunc(sd, &index, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.trade.additem(sd, index, amount);
+ }
+ if( HPMHooks.count.HP_trade_additem_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, short *index, short *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_additem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_trade_additem_post[hIndex].func;
+ postHookFunc(sd, &index, &amount);
+ }
+ }
+ return;
+}
+void HP_trade_addzeny(struct map_session_data *sd, int amount) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_trade_addzeny_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_addzeny_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_trade_addzeny_pre[hIndex].func;
+ preHookFunc(sd, &amount);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.trade.addzeny(sd, amount);
+ }
+ if( HPMHooks.count.HP_trade_addzeny_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *amount);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_addzeny_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_trade_addzeny_post[hIndex].func;
+ postHookFunc(sd, &amount);
+ }
+ }
+ return;
+}
+void HP_trade_ok(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_trade_ok_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ok_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_trade_ok_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.trade.ok(sd);
+ }
+ if( HPMHooks.count.HP_trade_ok_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ok_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_trade_ok_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_trade_cancel(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_trade_cancel_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_cancel_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_trade_cancel_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.trade.cancel(sd);
+ }
+ if( HPMHooks.count.HP_trade_cancel_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_cancel_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_trade_cancel_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_trade_commit(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_trade_commit_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_commit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_trade_commit_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.trade.commit(sd);
+ }
+ if( HPMHooks.count.HP_trade_commit_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_commit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_trade_commit_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+/* unit */
+int HP_unit_init(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_init_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_init_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.init();
+ }
+ if( HPMHooks.count.HP_unit_init_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_final(void) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_final_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_final_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.final();
+ }
+ if( HPMHooks.count.HP_unit_final_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+struct unit_data* HP_unit_bl2ud(struct block_list *bl) {
+ int hIndex = 0;
+ struct unit_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_unit_bl2ud_pre ) {
+ struct unit_data* (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_bl2ud_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.bl2ud(bl);
+ }
+ if( HPMHooks.count.HP_unit_bl2ud_post ) {
+ struct unit_data* (*postHookFunc) (struct unit_data* retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_bl2ud_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+struct unit_data* HP_unit_bl2ud2(struct block_list *bl) {
+ int hIndex = 0;
+ struct unit_data* retVal___ = NULL;
+ if( HPMHooks.count.HP_unit_bl2ud2_pre ) {
+ struct unit_data* (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_bl2ud2_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.bl2ud2(bl);
+ }
+ if( HPMHooks.count.HP_unit_bl2ud2_post ) {
+ struct unit_data* (*postHookFunc) (struct unit_data* retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_bl2ud2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_attack_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_attack_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_attack_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.attack_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_unit_attack_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_attack_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_walktoxy_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_walktoxy_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.walktoxy_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_unit_walktoxy_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_walktoxy_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_walktoxy_sub(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_walktoxy_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_walktoxy_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.walktoxy_sub(bl);
+ }
+ if( HPMHooks.count.HP_unit_walktoxy_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_walktoxy_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_delay_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_delay_walktoxy_timer_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walktoxy_timer_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_delay_walktoxy_timer_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.delay_walktoxy_timer(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_unit_delay_walktoxy_timer_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walktoxy_timer_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_delay_walktoxy_timer_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_walktoxy(struct block_list *bl, short x, short y, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_walktoxy_pre ) {
+ int (*preHookFunc) (struct block_list *bl, short *x, short *y, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_walktoxy_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &x, &y, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.walktoxy(bl, x, y, flag);
+ }
+ if( HPMHooks.count.HP_unit_walktoxy_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, short *x, short *y, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_walktoxy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &x, &y, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_walktobl_sub(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_walktobl_sub_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_walktobl_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.walktobl_sub(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_unit_walktobl_sub_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_walktobl_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_walktobl_pre ) {
+ int (*preHookFunc) (struct block_list *bl, struct block_list *tbl, int *range, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_walktobl_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, tbl, &range, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.walktobl(bl, tbl, range, flag);
+ }
+ if( HPMHooks.count.HP_unit_walktobl_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, struct block_list *tbl, int *range, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_walktobl_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, tbl, &range, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_run(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_run_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_run_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.run(bl);
+ }
+ if( HPMHooks.count.HP_unit_run_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_run_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_wugdash(struct block_list *bl, struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_wugdash_pre ) {
+ int (*preHookFunc) (struct block_list *bl, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_wugdash_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_wugdash_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.wugdash(bl, sd);
+ }
+ if( HPMHooks.count.HP_unit_wugdash_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_wugdash_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_wugdash_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, sd);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_escape(struct block_list *bl, struct block_list *target, short dist) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_escape_pre ) {
+ int (*preHookFunc) (struct block_list *bl, struct block_list *target, short *dist);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_escape_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_escape_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, target, &dist);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.escape(bl, target, dist);
+ }
+ if( HPMHooks.count.HP_unit_escape_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, struct block_list *target, short *dist);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_escape_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_escape_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, target, &dist);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool checkpath) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_movepos_pre ) {
+ int (*preHookFunc) (struct block_list *bl, short *dst_x, short *dst_y, int *easy, bool *checkpath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_movepos_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_movepos_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &dst_x, &dst_y, &easy, &checkpath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.movepos(bl, dst_x, dst_y, easy, checkpath);
+ }
+ if( HPMHooks.count.HP_unit_movepos_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, short *dst_x, short *dst_y, int *easy, bool *checkpath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_movepos_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_movepos_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &dst_x, &dst_y, &easy, &checkpath);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_setdir(struct block_list *bl, unsigned char dir) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_setdir_pre ) {
+ int (*preHookFunc) (struct block_list *bl, unsigned char *dir);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_setdir_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_setdir_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &dir);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.setdir(bl, dir);
+ }
+ if( HPMHooks.count.HP_unit_setdir_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned char *dir);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_setdir_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_setdir_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &dir);
+ }
+ }
+ return retVal___;
+}
+uint8 HP_unit_getdir(struct block_list *bl) {
+ int hIndex = 0;
+ uint8 retVal___;
+ memset(&retVal___, '\0', sizeof(uint8));
+ if( HPMHooks.count.HP_unit_getdir_pre ) {
+ uint8 (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_getdir_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_getdir_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.getdir(bl);
+ }
+ if( HPMHooks.count.HP_unit_getdir_post ) {
+ uint8 (*postHookFunc) (uint8 retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_getdir_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_getdir_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_blown(struct block_list *bl, int dx, int dy, int count, int flag) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_blown_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *dx, int *dy, int *count, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_blown_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_blown_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &dx, &dy, &count, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.blown(bl, dx, dy, count, flag);
+ }
+ if( HPMHooks.count.HP_unit_blown_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *dx, int *dy, int *count, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_blown_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_blown_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &dx, &dy, &count, &flag);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_warp(struct block_list *bl, short m, short x, short y, clr_type type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_warp_pre ) {
+ int (*preHookFunc) (struct block_list *bl, short *m, short *x, short *y, clr_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_warp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_warp_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &m, &x, &y, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.warp(bl, m, x, y, type);
+ }
+ if( HPMHooks.count.HP_unit_warp_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, short *m, short *x, short *y, clr_type *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_warp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_warp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &m, &x, &y, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_stop_walking(struct block_list *bl, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_stop_walking_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_walking_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_stop_walking_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.stop_walking(bl, type);
+ }
+ if( HPMHooks.count.HP_unit_stop_walking_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_walking_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_stop_walking_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_skilluse_id_pre ) {
+ int (*preHookFunc) (struct block_list *src, int *target_id, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_skilluse_id_pre[hIndex].func;
+ retVal___ = preHookFunc(src, &target_id, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.skilluse_id(src, target_id, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_unit_skilluse_id_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, int *target_id, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_skilluse_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, &target_id, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_is_walking(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_is_walking_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_is_walking_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_is_walking_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.is_walking(bl);
+ }
+ if( HPMHooks.count.HP_unit_is_walking_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_is_walking_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_is_walking_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_can_move(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_can_move_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_move_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_can_move_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.can_move(bl);
+ }
+ if( HPMHooks.count.HP_unit_can_move_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_move_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_can_move_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_resume_running(int tid, unsigned int tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_resume_running_pre ) {
+ int (*preHookFunc) (int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_resume_running_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_resume_running_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.resume_running(tid, tick, id, data);
+ }
+ if( HPMHooks.count.HP_unit_resume_running_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, unsigned int *tick, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_resume_running_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_resume_running_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_set_walkdelay_pre ) {
+ int (*preHookFunc) (struct block_list *bl, unsigned int *tick, int *delay, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_walkdelay_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_set_walkdelay_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &tick, &delay, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.set_walkdelay(bl, tick, delay, type);
+ }
+ if( HPMHooks.count.HP_unit_set_walkdelay_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *tick, int *delay, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_walkdelay_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_set_walkdelay_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &tick, &delay, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv, int casttime, int castcancel) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_skilluse_id2_pre ) {
+ int (*preHookFunc) (struct block_list *src, int *target_id, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_id2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_skilluse_id2_pre[hIndex].func;
+ retVal___ = preHookFunc(src, &target_id, &skill_id, &skill_lv, &casttime, &castcancel);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.skilluse_id2(src, target_id, skill_id, skill_lv, casttime, castcancel);
+ }
+ if( HPMHooks.count.HP_unit_skilluse_id2_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, int *target_id, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_id2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_skilluse_id2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, &target_id, &skill_id, &skill_lv, &casttime, &castcancel);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_skilluse_pos(struct block_list *src, short skill_x, short skill_y, uint16 skill_id, uint16 skill_lv) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_skilluse_pos_pre ) {
+ int (*preHookFunc) (struct block_list *src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_pos_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_skilluse_pos_pre[hIndex].func;
+ retVal___ = preHookFunc(src, &skill_x, &skill_y, &skill_id, &skill_lv);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.skilluse_pos(src, skill_x, skill_y, skill_id, skill_lv);
+ }
+ if( HPMHooks.count.HP_unit_skilluse_pos_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_pos_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_skilluse_pos_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, &skill_x, &skill_y, &skill_id, &skill_lv);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_skilluse_pos2(struct block_list *src, short skill_x, short skill_y, uint16 skill_id, uint16 skill_lv, int casttime, int castcancel) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_skilluse_pos2_pre ) {
+ int (*preHookFunc) (struct block_list *src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_pos2_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_skilluse_pos2_pre[hIndex].func;
+ retVal___ = preHookFunc(src, &skill_x, &skill_y, &skill_id, &skill_lv, &casttime, &castcancel);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.skilluse_pos2(src, skill_x, skill_y, skill_id, skill_lv, casttime, castcancel);
+ }
+ if( HPMHooks.count.HP_unit_skilluse_pos2_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_pos2_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_skilluse_pos2_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, &skill_x, &skill_y, &skill_id, &skill_lv, &casttime, &castcancel);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_set_target(struct unit_data *ud, int target_id) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_set_target_pre ) {
+ int (*preHookFunc) (struct unit_data *ud, int *target_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_target_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_set_target_pre[hIndex].func;
+ retVal___ = preHookFunc(ud, &target_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.set_target(ud, target_id);
+ }
+ if( HPMHooks.count.HP_unit_set_target_post ) {
+ int (*postHookFunc) (int retVal___, struct unit_data *ud, int *target_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_target_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_set_target_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ud, &target_id);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_stop_attack(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_stop_attack_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_stop_attack_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.stop_attack(bl);
+ }
+ if( HPMHooks.count.HP_unit_stop_attack_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_stop_attack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_unattackable(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_unattackable_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_unattackable_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_unattackable_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.unattackable(bl);
+ }
+ if( HPMHooks.count.HP_unit_unattackable_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_unattackable_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_unattackable_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_attack(struct block_list *src, int target_id, int continuous) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_attack_pre ) {
+ int (*preHookFunc) (struct block_list *src, int *target_id, int *continuous);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_attack_pre[hIndex].func;
+ retVal___ = preHookFunc(src, &target_id, &continuous);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.attack(src, target_id, continuous);
+ }
+ if( HPMHooks.count.HP_unit_attack_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, int *target_id, int *continuous);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_attack_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, &target_id, &continuous);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_cancel_combo(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_cancel_combo_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_cancel_combo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_cancel_combo_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.cancel_combo(bl);
+ }
+ if( HPMHooks.count.HP_unit_cancel_combo_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_cancel_combo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_cancel_combo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+bool HP_unit_can_reach_pos(struct block_list *bl, int x, int y, int easy) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_unit_can_reach_pos_pre ) {
+ bool (*preHookFunc) (struct block_list *bl, int *x, int *y, int *easy);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_reach_pos_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_can_reach_pos_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &x, &y, &easy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.can_reach_pos(bl, x, y, easy);
+ }
+ if( HPMHooks.count.HP_unit_can_reach_pos_post ) {
+ bool (*postHookFunc) (bool retVal___, struct block_list *bl, int *x, int *y, int *easy);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_reach_pos_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_can_reach_pos_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &x, &y, &easy);
+ }
+ }
+ return retVal___;
+}
+bool HP_unit_can_reach_bl(struct block_list *bl, struct block_list *tbl, int range, int easy, short *x, short *y) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_unit_can_reach_bl_pre ) {
+ bool (*preHookFunc) (struct block_list *bl, struct block_list *tbl, int *range, int *easy, short *x, short *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_reach_bl_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_can_reach_bl_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, tbl, &range, &easy, x, y);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.can_reach_bl(bl, tbl, range, easy, x, y);
+ }
+ if( HPMHooks.count.HP_unit_can_reach_bl_post ) {
+ bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct block_list *tbl, int *range, int *easy, short *x, short *y);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_reach_bl_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_can_reach_bl_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, tbl, &range, &easy, x, y);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_calc_pos_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *tx, int *ty, uint8 *dir);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_calc_pos_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_calc_pos_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &tx, &ty, &dir);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.calc_pos(bl, tx, ty, dir);
+ }
+ if( HPMHooks.count.HP_unit_calc_pos_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *tx, int *ty, uint8 *dir);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_calc_pos_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_calc_pos_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &tx, &ty, &dir);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_attack_timer_sub(struct block_list *src, int tid, unsigned int tick) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_attack_timer_sub_pre ) {
+ int (*preHookFunc) (struct block_list *src, int *tid, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_attack_timer_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(src, &tid, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.attack_timer_sub(src, tid, tick);
+ }
+ if( HPMHooks.count.HP_unit_attack_timer_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, int *tid, unsigned int *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_attack_timer_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, &tid, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_skillcastcancel(struct block_list *bl, int type) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_skillcastcancel_pre ) {
+ int (*preHookFunc) (struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skillcastcancel_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_skillcastcancel_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.skillcastcancel(bl, type);
+ }
+ if( HPMHooks.count.HP_unit_skillcastcancel_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skillcastcancel_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_skillcastcancel_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &type);
+ }
+ }
+ return retVal___;
+}
+void HP_unit_dataset(struct block_list *bl) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_unit_dataset_pre ) {
+ void (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_dataset_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_dataset_pre[hIndex].func;
+ preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.unit.dataset(bl);
+ }
+ if( HPMHooks.count.HP_unit_dataset_post ) {
+ void (*postHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_dataset_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_dataset_post[hIndex].func;
+ postHookFunc(bl);
+ }
+ }
+ return;
+}
+int HP_unit_counttargeted(struct block_list *bl) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_counttargeted_pre ) {
+ int (*preHookFunc) (struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_counttargeted_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_counttargeted_pre[hIndex].func;
+ retVal___ = preHookFunc(bl);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.counttargeted(bl);
+ }
+ if( HPMHooks.count.HP_unit_counttargeted_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_counttargeted_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_counttargeted_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_fixdamage(struct block_list *src, struct block_list *target, unsigned int tick, int sdelay, int ddelay, int64 damage, int div, int type, int64 damage2) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_fixdamage_pre ) {
+ int (*preHookFunc) (struct block_list *src, struct block_list *target, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_fixdamage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_fixdamage_pre[hIndex].func;
+ retVal___ = preHookFunc(src, target, &tick, &sdelay, &ddelay, &damage, &div, &type, &damage2);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.fixdamage(src, target, tick, sdelay, ddelay, damage, div, type, damage2);
+ }
+ if( HPMHooks.count.HP_unit_fixdamage_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, unsigned int *tick, int *sdelay, int *ddelay, int64 *damage, int *div, int *type, int64 *damage2);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_fixdamage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_fixdamage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, src, target, &tick, &sdelay, &ddelay, &damage, &div, &type, &damage2);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_changeviewsize(struct block_list *bl, short size) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_changeviewsize_pre ) {
+ int (*preHookFunc) (struct block_list *bl, short *size);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_changeviewsize_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_changeviewsize_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &size);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.changeviewsize(bl, size);
+ }
+ if( HPMHooks.count.HP_unit_changeviewsize_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, short *size);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_changeviewsize_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_changeviewsize_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &size);
+ }
+ }
+ return retVal___;
+}
+int HP_unit_remove_map(struct block_list *bl, clr_type clrtype, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_remove_map_pre ) {
+ int (*preHookFunc) (struct block_list *bl, clr_type *clrtype, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_remove_map_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &clrtype, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.remove_map(bl, clrtype, file, line, func);
+ }
+ if( HPMHooks.count.HP_unit_remove_map_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, clr_type *clrtype, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_remove_map_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &clrtype, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+void HP_unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_unit_remove_map_pc_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, clr_type *clrtype);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_remove_map_pc_pre[hIndex].func;
+ preHookFunc(sd, &clrtype);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.unit.remove_map_pc(sd, clrtype);
+ }
+ if( HPMHooks.count.HP_unit_remove_map_pc_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, clr_type *clrtype);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_remove_map_pc_post[hIndex].func;
+ postHookFunc(sd, &clrtype);
+ }
+ }
+ return;
+}
+void HP_unit_free_pc(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_unit_free_pc_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_free_pc_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.unit.free_pc(sd);
+ }
+ if( HPMHooks.count.HP_unit_free_pc_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_free_pc_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+int HP_unit_free(struct block_list *bl, clr_type clrtype) {
+ int hIndex = 0;
+ int retVal___;
+ memset(&retVal___, '\0', sizeof(int));
+ if( HPMHooks.count.HP_unit_free_pre ) {
+ int (*preHookFunc) (struct block_list *bl, clr_type *clrtype);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_unit_free_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &clrtype);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.unit.free(bl, clrtype);
+ }
+ if( HPMHooks.count.HP_unit_free_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, clr_type *clrtype);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_unit_free_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &clrtype);
+ }
+ }
+ return retVal___;
+}
+/* vending */
+void HP_vending_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_vending_init_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_vending_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.vending.init();
+ }
+ if( HPMHooks.count.HP_vending_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_vending_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_vending_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_vending_final_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_vending_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.vending.final();
+ }
+ if( HPMHooks.count.HP_vending_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_vending_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_vending_close(struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_vending_close_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_close_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_vending_close_pre[hIndex].func;
+ preHookFunc(sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.vending.close(sd);
+ }
+ if( HPMHooks.count.HP_vending_close_post ) {
+ void (*postHookFunc) (struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_close_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_vending_close_post[hIndex].func;
+ postHookFunc(sd);
+ }
+ }
+ return;
+}
+void HP_vending_open(struct map_session_data *sd, const char *message, const uint8 *data, int count) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_vending_open_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, const char *message, const uint8 *data, int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_open_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_vending_open_pre[hIndex].func;
+ preHookFunc(sd, message, data, &count);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.vending.open(sd, message, data, count);
+ }
+ if( HPMHooks.count.HP_vending_open_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, const char *message, const uint8 *data, int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_open_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_vending_open_post[hIndex].func;
+ postHookFunc(sd, message, data, &count);
+ }
+ }
+ return;
+}
+void HP_vending_list(struct map_session_data *sd, unsigned int id) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_vending_list_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, unsigned int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_vending_list_pre[hIndex].func;
+ preHookFunc(sd, &id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.vending.list(sd, id);
+ }
+ if( HPMHooks.count.HP_vending_list_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, unsigned int *id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_vending_list_post[hIndex].func;
+ postHookFunc(sd, &id);
+ }
+ }
+ return;
+}
+void HP_vending_purchase(struct map_session_data *sd, int aid, unsigned int uid, const uint8 *data, int count) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_vending_purchase_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, int *aid, unsigned int *uid, const uint8 *data, int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_purchase_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_vending_purchase_pre[hIndex].func;
+ preHookFunc(sd, &aid, &uid, data, &count);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.vending.purchase(sd, aid, uid, data, count);
+ }
+ if( HPMHooks.count.HP_vending_purchase_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *aid, unsigned int *uid, const uint8 *data, int *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_purchase_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_vending_purchase_post[hIndex].func;
+ postHookFunc(sd, &aid, &uid, data, &count);
+ }
+ }
+ return;
+}
+bool HP_vending_search(struct map_session_data *sd, unsigned short nameid) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_vending_search_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_search_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_vending_search_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, &nameid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.vending.search(sd, nameid);
+ }
+ if( HPMHooks.count.HP_vending_search_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned short *nameid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_search_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_vending_search_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, &nameid);
+ }
+ }
+ return retVal___;
+}
+bool HP_vending_searchall(struct map_session_data *sd, const struct s_search_store_search *s) {
+ int hIndex = 0;
+ bool retVal___;
+ memset(&retVal___, '\0', sizeof(bool));
+ if( HPMHooks.count.HP_vending_searchall_pre ) {
+ bool (*preHookFunc) (struct map_session_data *sd, const struct s_search_store_search *s);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_searchall_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_vending_searchall_pre[hIndex].func;
+ retVal___ = preHookFunc(sd, s);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.vending.searchall(sd, s);
+ }
+ if( HPMHooks.count.HP_vending_searchall_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct s_search_store_search *s);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_searchall_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_vending_searchall_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, s);
+ }
+ }
+ return retVal___;
+}
diff --git a/src/plugins/HPMHooking/HPMHooking.sources.inc b/src/plugins/HPMHooking/HPMHooking.sources.inc
new file mode 100644
index 000000000..89a668e0c
--- /dev/null
+++ b/src/plugins/HPMHooking/HPMHooking.sources.inc
@@ -0,0 +1,37 @@
+memcpy(&HPMHooks.source.atcommand, atcommand, sizeof(struct atcommand_interface));
+memcpy(&HPMHooks.source.battle, battle, sizeof(struct battle_interface));
+memcpy(&HPMHooks.source.bg, bg, sizeof(struct battleground_interface));
+memcpy(&HPMHooks.source.buyingstore, buyingstore, sizeof(struct buyingstore_interface));
+memcpy(&HPMHooks.source.chat, chat, sizeof(struct chat_interface));
+memcpy(&HPMHooks.source.chrif, chrif, sizeof(struct chrif_interface));
+memcpy(&HPMHooks.source.clif, clif, sizeof(struct clif_interface));
+memcpy(&HPMHooks.source.duel, duel, sizeof(struct duel_interface));
+memcpy(&HPMHooks.source.elemental, elemental, sizeof(struct elemental_interface));
+memcpy(&HPMHooks.source.guild, guild, sizeof(struct guild_interface));
+memcpy(&HPMHooks.source.gstorage, gstorage, sizeof(struct guild_storage_interface));
+memcpy(&HPMHooks.source.homun, homun, sizeof(struct homunculus_interface));
+memcpy(&HPMHooks.source.instance, instance, sizeof(struct instance_interface));
+memcpy(&HPMHooks.source.intif, intif, sizeof(struct intif_interface));
+memcpy(&HPMHooks.source.ircbot, ircbot, sizeof(struct irc_bot_interface));
+memcpy(&HPMHooks.source.itemdb, itemdb, sizeof(struct itemdb_interface));
+memcpy(&HPMHooks.source.logs, logs, sizeof(struct log_interface));
+memcpy(&HPMHooks.source.mail, mail, sizeof(struct mail_interface));
+memcpy(&HPMHooks.source.map, map, sizeof(struct map_interface));
+memcpy(&HPMHooks.source.mapit, mapit, sizeof(struct mapit_interface));
+memcpy(&HPMHooks.source.mapreg, mapreg, sizeof(struct mapreg_interface));
+memcpy(&HPMHooks.source.mercenary, mercenary, sizeof(struct mercenary_interface));
+memcpy(&HPMHooks.source.mob, mob, sizeof(struct mob_interface));
+memcpy(&HPMHooks.source.npc, npc, sizeof(struct npc_interface));
+memcpy(&HPMHooks.source.party, party, sizeof(struct party_interface));
+memcpy(&HPMHooks.source.path, path, sizeof(struct path_interface));
+memcpy(&HPMHooks.source.pc, pc, sizeof(struct pc_interface));
+memcpy(&HPMHooks.source.pet, pet, sizeof(struct pet_interface));
+memcpy(&HPMHooks.source.quest, quest, sizeof(struct quest_interface));
+memcpy(&HPMHooks.source.script, script, sizeof(struct script_interface));
+memcpy(&HPMHooks.source.searchstore, searchstore, sizeof(struct searchstore_interface));
+memcpy(&HPMHooks.source.skill, skill, sizeof(struct skill_interface));
+memcpy(&HPMHooks.source.status, status, sizeof(struct status_interface));
+memcpy(&HPMHooks.source.storage, storage, sizeof(struct storage_interface));
+memcpy(&HPMHooks.source.trade, trade, sizeof(struct trade_interface));
+memcpy(&HPMHooks.source.unit, unit, sizeof(struct unit_interface));
+memcpy(&HPMHooks.source.vending, vending, sizeof(struct vending_interface));
diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in
index ff7d5b2e2..53f44a0b4 100644
--- a/src/plugins/Makefile.in
+++ b/src/plugins/Makefile.in
@@ -1,7 +1,26 @@
+################ PLUGIN CONFIGURATION ##############################
+# #
+# When you add a plugin, add its name here: #
+# Example: if you have a plugin named my_cool_plugin.c and another #
+# one named my_second_plugin.c, add them to the list like this: #
+# #
+# MYPLUGINS = my_cool_plugin my_second_plugin #
+# #
+# Note: DO NOT include the .c extension!!! #
-COMMON_H = ../common/HPMi.h ../common/cbasetypes.h
+MYPLUGINS =
-PLUGINS = sample db2sql
+# #
+######### DO NOT EDIT ANYTHING BELOW THIS LINE!!! ##################
+
+PLUGINS = sample db2sql HPMHooking $(MYPLUGINS)
+
+COMMON_H = $(shell ls ../common/*.h)
+CONFIG_H = $(shell ls ../config/*.h ../config/*/*.h)
+MAP_H = $(shell ls ../map/*.h)
+CHAR_H = $(shell ls ../char/*.h)
+LOGIN_H = $(shell ls ../login/*.h)
+ALL_H = $(COMMON_H) $(CONFIG_H) $(MAP_H) $(CHAR_H) $(LOGIN_H)
@SET_MAKE@
@@ -9,28 +28,38 @@ CC = @CC@
export CC
#####################################################################
-.PHONY: all $(PLUGINS) sample db2sql clean help
+.PHONY: all $(PLUGINS) clean buildclean help
all: $(PLUGINS) Makefile
-sample: sample@DLLEXT@
-
-db2sql: db2sql@DLLEXT@
+$(PLUGINS): %: ../../plugins/%@DLLEXT@
-clean:
- @echo " CLEAN plugins"
+buildclean:
+ @echo " CLEAN plugins (build temp files)"
@rm -rf *.o
+
+clean: buildclean
+ @echo " CLEAN plugins"
+ @rm -rf ../../plugins/*@DLLEXT@
help:
@echo "possible targets are $(PLUGINS:%='%') 'all' 'clean' 'help'"
- @echo "'sample' - sample plugin"
- @echo "'help' - outputs this message"
+ @echo ""
+ @echo "$(PLUGINS:%='%')"
+ @echo " - builds a specific plugin"
+ @echo "'all' - builds all above targets"
+ @echo "'clean' - cleans builds and objects"
+ @echo "'buildclean' - cleans build temporary (object) files, without deleting the"
+ @echo " compiled plugins"
+ @echo "'help' - outputs this message"
#####################################################################
Makefile: Makefile.in
@$(MAKE) -C ../.. src/plugins/Makefile
-%@DLLEXT@: %.c $(COMMON_H)
+.SECONDEXPANSION:
+
+../../plugins/%@DLLEXT@: %.c $(ALL_H) $$(shell ls %/* 2>/dev/null)
@echo " CC $<"
- @$(CC) @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o ../../plugins/$@ $<
+ @$(CC) @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $<
diff --git a/src/plugins/sample.c b/src/plugins/sample.c
index 4f9e34f74..d1a95c71d 100644
--- a/src/plugins/sample.c
+++ b/src/plugins/sample.c
@@ -88,6 +88,26 @@ void sample_packet0f3(int fd) {
clif->pGlobalMessage(fd,sd);
}
+int my_pc_dropitem_storage;/* storage var */
+/* my custom prehook for pc_dropitem, checks if amount of item being dropped is higher than 1 and if so cap it to 1 and store the value of how much it was */
+int my_pc_dropitem_pre(struct map_session_data *sd,int *n,int *amount) {
+ my_pc_dropitem_storage = 0;
+ if( *amount > 1 ) {
+ my_pc_dropitem_storage = *amount;
+ *amount = 1;
+ }
+ return 0;
+}
+/* postHook receive retVal as the first param, allows posthook to act accordingly to whatever the original was going to return */
+int my_pc_dropitem_post(int retVal, struct map_session_data *sd,int *n,int *amount) {
+ if( retVal != 1 ) return retVal;/* we don't do anything if pc_dropitem didn't return 1 (success) */
+ if( my_pc_dropitem_storage ) {/* signs whether pre-hook did this */
+ char output[99];
+ snprintf(output,99,"[ Warning ] you can only drop 1 item at a time, capped from %d to 1",my_pc_dropitem_storage);
+ clif->colormes(sd->fd,COLOR_RED,output);
+ }
+ return 1;
+}
/* run when server starts */
HPExport void plugin_init (void) {
char *server_type;
@@ -103,6 +123,7 @@ HPExport void plugin_init (void) {
/* map-server interfaces */
script = GET_SYMBOL("script");
clif = GET_SYMBOL("clif");
+ pc = GET_SYMBOL("pc");
/* session[] */
session = GET_SYMBOL("session");
@@ -132,7 +153,16 @@ HPExport void plugin_init (void) {
if( HPMi->addPacket != NULL ) {//link our 'sample' packet to map-server
HPMi->addPacket(0xf3,-1,sample_packet0f3,hpClif_Parse,HPMi->pid);
}
-
+
+ /* in this sample we add a PreHook to pc->dropitem */
+ /* to identify whether the item being dropped is on amount higher than 1 */
+ /* if so, it stores the amount on a variable (my_pc_dropitem_storage) and changes the amount to 1 */
+ addHookPre("pc->dropitem",my_pc_dropitem_pre);
+ /* in this sample we add a PostHook to pc->dropitem */
+ /* 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);
}
/* run when server is ready (online) */
HPExport void server_online (void) {
diff --git a/src/test/Makefile.in b/src/test/Makefile.in
index cb99e7004..0c6d15c6b 100644
--- a/src/test/Makefile.in
+++ b/src/test/Makefile.in
@@ -24,13 +24,17 @@ CC = @CC@
export CC
#####################################################################
-.PHONY: all test_spinlock
+.PHONY: all test_spinlock clean buildclean
all: test_spinlock Makefile
-clean:
+buildclean:
+ @echo " CLEAN test (build temp files)"
+ @rm -rf *.o obj
+
+clean: buildclean
@echo " CLEAN test"
- @rm -rf *.o obj ../../test_spinlock@EXEEXT@
+ @rm -rf ../../test_spinlock@EXEEXT@
#####################################################################
diff --git a/src/tool/Makefile.in b/src/tool/Makefile.in
index baf4a0327..ee448a16a 100644
--- a/src/tool/Makefile.in
+++ b/src/tool/Makefile.in
@@ -22,7 +22,7 @@ CC = @CC@
export CC
#####################################################################
-.PHONY: all mapcache clean help
+.PHONY: all mapcache clean buildclean help
all: mapcache Makefile
@@ -32,16 +32,22 @@ mapcache: ../../mapcache@EXEEXT@
@echo " LD $(notdir $@)"
@$(CC) @LDFLAGS@ $(LIBCONFIG_INCLUDE) -o ../../mapcache@EXEEXT@ $(MAPCACHE_OBJ) $(COMMON_OBJ) $(LIBCONFIG_OBJ) @LIBS@
-clean:
+buildclean:
+ @echo " CLEAN tool (build temp files)"
+ @rm -rf obj_all/*.o
+
+clean: buildclean
@echo " CLEAN tool"
- @rm -rf obj_all/*.o ../../mapcache@EXEEXT@
+ @rm -rf ../../mapcache@EXEEXT@
help:
@echo "possible targets are 'mapcache' 'all' 'clean' 'help'"
- @echo "'mapcache' - mapcache generator"
- @echo "'all' - builds all above targets"
- @echo "'clean' - cleans builds and objects"
- @echo "'help' - outputs this message"
+ @echo "'mapcache' - mapcache generator"
+ @echo "'all' - builds all above targets"
+ @echo "'clean' - cleans builds and objects"
+ @echo "'buildclean' - cleans build temporary (object) files, without deleting the"
+ @echo " executables"
+ @echo "'help' - outputs this message"
#####################################################################
diff --git a/vcproj-10/plugin-HPMHooking.vcxproj b/vcproj-10/plugin-HPMHooking.vcxproj
new file mode 100644
index 000000000..e1fa972f4
--- /dev/null
+++ b/vcproj-10/plugin-HPMHooking.vcxproj
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{E64C56D3-CDFB-483B-900B-A62D216B6D2F}</ProjectGuid>
+ <RootNamespace>plugin-HPMHooking</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>plugin-HPMHooking</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0417</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0417</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\plugins\HPMHooking.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/vcproj-12/plugin-HPMHooking.vcxproj b/vcproj-12/plugin-HPMHooking.vcxproj
new file mode 100644
index 000000000..9b69dca0b
--- /dev/null
+++ b/vcproj-12/plugin-HPMHooking.vcxproj
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{E64C56D3-CDFB-483B-900B-A62D216B6D2F}</ProjectGuid>
+ <RootNamespace>plugin-HPMHooking</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>plugin-HPMHooking</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0417</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0417</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\plugins\HPMHooking.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/vcproj-9/plugin-HPMHooking.vcproj b/vcproj-9/plugin-HPMHooking.vcproj
new file mode 100644
index 000000000..8faab8f03
--- /dev/null
+++ b/vcproj-9/plugin-HPMHooking.vcproj
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="windows-1250"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="plugin-HPMHooking"
+ ProjectGUID="{D356871D-58E1-450B-967A-E7E9646175AF}"
+ RootNamespace="plugin-HPMHooking"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\plugins"
+ IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\src\common;..\3rdparty\msinttypes\include"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_USRDLL"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ EnableFunctionLevelLinking="true"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1047"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\HPMHooking.dll"
+ LinkIncremental="1"
+ ModuleDefinitionFile=""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)\$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="..\plugins"
+ IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
+ Optimization="2"
+ AdditionalIncludeDirectories="..\src\common;..\3rdparty\msinttypes\include"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_USRDLL"
+ RuntimeLibrary="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1047"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\HPMHooking.dll"
+ LinkIncremental="1"
+ ModuleDefinitionFile=""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)\$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="..\src\plugins\HPMHooking.c"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject> \ No newline at end of file